diff -uNr mc-4.8.6.orig/src/editor/edit.c mc-4.8.6/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; |
… |
… |
|
3922 | 3923 | edit_mark_cmd (edit, FALSE); |
3923 | 3924 | edit_move_block_to_right (edit); |
3924 | 3925 | } |
| 3926 | //if we are neither at the bol nor after space characters |
| 3927 | else if (option_supertab && !isspace (edit_get_byte (edit, edit->curs1 - 1))) |
| 3928 | edit_complete_word_cmd (edit); |
3925 | 3929 | else |
3926 | 3930 | { |
| 3931 | ck_tab: |
3927 | 3932 | if (option_cursor_beyond_eol) |
3928 | 3933 | edit_insert_over (edit); |
3929 | 3934 | edit_tab_cmd (edit); |
… |
… |
|
4111 | 4116 | /* if text marked shift block */ |
4112 | 4117 | if (edit->mark1 != edit->mark2 && !option_persistent_selections) |
4113 | 4118 | edit_move_block_to_left (edit); |
| 4119 | else if (option_supertab) |
| 4120 | goto ck_tab; |
4114 | 4121 | else |
4115 | 4122 | edit_complete_word_cmd (edit); |
4116 | 4123 | break; |
diff -uNr mc-4.8.6.orig/src/editor/edit.h mc-4.8.6/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.6.orig/src/editor/editoptions.c mc-4.8.6/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.6.orig/src/setup.c mc-4.8.6/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 }, |