diff -uNr mc-4.8.4.orig/src/editor/edit.c mc-4.8.4/src/editor/edit.c
old
|
new
|
|
90 | 90 | int option_cursor_beyond_eol = 0; |
91 | 91 | int option_line_state = 0; |
92 | 92 | int option_line_state_width = 0; |
| 93 | int option_supertab = 0; |
93 | 94 | |
94 | 95 | int option_edit_right_extreme = 0; |
95 | 96 | int option_edit_left_extreme = 0; |
… |
… |
|
3924 | 3925 | edit_mark_cmd (edit, 0); |
3925 | 3926 | edit_move_block_to_right (edit); |
3926 | 3927 | } |
| 3928 | //if we are neither at the bol nor after space characters |
| 3929 | else if (option_supertab && !isspace (edit_get_byte (edit, edit->curs1 - 1))) |
| 3930 | { |
| 3931 | edit_complete_word_cmd (edit); |
| 3932 | } |
3927 | 3933 | else |
3928 | 3934 | { |
3929 | 3935 | if (option_cursor_beyond_eol) |
… |
… |
|
4118 | 4124 | { |
4119 | 4125 | edit_move_block_to_left (edit); |
4120 | 4126 | } |
| 4127 | else if (option_supertab) |
| 4128 | { |
| 4129 | if (option_cursor_beyond_eol) |
| 4130 | edit_insert_over (edit); |
| 4131 | edit_tab_cmd (edit); |
| 4132 | if (option_auto_para_formatting) |
| 4133 | { |
| 4134 | format_paragraph (edit, 0); |
| 4135 | edit->force |= REDRAW_PAGE; |
| 4136 | } |
| 4137 | else |
| 4138 | { |
| 4139 | check_and_wrap_line (edit); |
| 4140 | } |
| 4141 | } |
4121 | 4142 | else |
4122 | 4143 | { |
4123 | 4144 | edit_complete_word_cmd (edit); |
diff -uNr mc-4.8.4.orig/src/editor/edit.h mc-4.8.4/src/editor/edit.h
old
|
new
|
|
45 | 45 | extern int option_save_position; |
46 | 46 | extern int option_syntax_highlighting; |
47 | 47 | extern int option_group_undo; |
| 48 | extern int option_supertab; |
48 | 49 | extern char *option_backup_ext; |
49 | 50 | |
50 | 51 | extern int edit_confirm_save; |
diff -uNr mc-4.8.4.orig/src/editor/editoptions.c mc-4.8.4/src/editor/editoptions.c
old
|
new
|
|
46 | 46 | |
47 | 47 | /*** file scope macro definitions ****************************************************************/ |
48 | 48 | |
49 | | #define OPT_DLG_H 17 |
| 49 | #define OPT_DLG_H 18 |
50 | 50 | #define OPT_DLG_W 74 |
51 | 51 | |
52 | 52 | /*** file scope type declarations ****************************************************************/ |
… |
… |
|
127 | 127 | QuickWidget quick_widgets[] = { |
128 | 128 | /* 0 */ QUICK_BUTTON (6, 10, OPT_DLG_H - 3, OPT_DLG_H, N_("&Cancel"), B_CANCEL, NULL), |
129 | 129 | /* 1 */ QUICK_BUTTON (2, 10, OPT_DLG_H - 3, OPT_DLG_H, N_("&OK"), B_ENTER, NULL), |
130 | | /* 2 */ QUICK_LABEL (OPT_DLG_W / 2 + 1, OPT_DLG_W, 12, OPT_DLG_H, |
| 130 | /* 2 */ QUICK_LABEL (OPT_DLG_W / 2 + 1, OPT_DLG_W, 13, OPT_DLG_H, |
131 | 131 | N_("Word wrap line length:")), |
132 | | /* 3 */ QUICK_INPUT (OPT_DLG_W / 2 + 25, OPT_DLG_W, 12, OPT_DLG_H, |
| 132 | /* 3 */ QUICK_INPUT (OPT_DLG_W / 2 + 25, OPT_DLG_W, 13, OPT_DLG_H, |
133 | 133 | wrap_length, OPT_DLG_W / 2 - 4 - 24, 0, "edit-word-wrap", &p), |
| 134 | QUICK_CHECKBOX (OPT_DLG_W / 2 + 1, OPT_DLG_W, 12, OPT_DLG_H, |
| 135 | N_("&Tab completion"), &option_supertab), |
134 | 136 | /* 4 */ QUICK_CHECKBOX (OPT_DLG_W / 2 + 1, OPT_DLG_W, 11, OPT_DLG_H, |
135 | 137 | N_("&Group undo"), &option_group_undo), |
136 | 138 | /* 5 */ QUICK_CHECKBOX (OPT_DLG_W / 2 + 1, OPT_DLG_W, 10, OPT_DLG_H, |
diff -uNr mc-4.8.4.orig/src/setup.c mc-4.8.4/src/setup.c
old
|
new
|
|
307 | 307 | { "editor_option_save_position", &option_save_position }, |
308 | 308 | { "editor_option_auto_para_formatting", &option_auto_para_formatting }, |
309 | 309 | { "editor_option_typewriter_wrap", &option_typewriter_wrap }, |
| 310 | { "editor_option_supertab", &option_supertab }, |
310 | 311 | { "editor_edit_confirm_save", &edit_confirm_save }, |
311 | 312 | { "editor_syntax_highlighting", &option_syntax_highlighting }, |
312 | 313 | { "editor_persistent_selections", &option_persistent_selections }, |