help: show the keystroke <Ctrl+Shift+Delete> as "Sh-^Del"
And in the bargain always return a fixed code instead of searching for a keystroke that is bound to 'cutwordleft' (which might fail).master
parent
fe6cb6e516
commit
e998814bbc
|
@ -1156,6 +1156,7 @@ void shortcut_init(void)
|
||||||
add_to_sclist(MMAIN, "M-U", 0, do_undo, 0);
|
add_to_sclist(MMAIN, "M-U", 0, do_undo, 0);
|
||||||
add_to_sclist(MMAIN, "M-E", 0, do_redo, 0);
|
add_to_sclist(MMAIN, "M-E", 0, do_redo, 0);
|
||||||
add_to_sclist(MMAIN, "M-|", 0, do_cut_prev_word, 0);
|
add_to_sclist(MMAIN, "M-|", 0, do_cut_prev_word, 0);
|
||||||
|
add_to_sclist(MMAIN, "Sh-^Del", CONTROL_SHIFT_DELETE, do_cut_prev_word, 0);
|
||||||
add_to_sclist(MMAIN, "^Del", CONTROL_DELETE, do_cut_next_word, 0);
|
add_to_sclist(MMAIN, "^Del", CONTROL_DELETE, do_cut_next_word, 0);
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_WORDCOMPLETION
|
#ifdef ENABLE_WORDCOMPLETION
|
||||||
|
|
|
@ -542,7 +542,7 @@ int parse_kbinput(WINDOW *win)
|
||||||
return CONTROL_DELETE;
|
return CONTROL_DELETE;
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
else if (retval == controlshiftdelete)
|
else if (retval == controlshiftdelete)
|
||||||
return the_code_for(do_cut_prev_word, KEY_BACKSPACE);
|
return CONTROL_SHIFT_DELETE;
|
||||||
else if (retval == shiftcontrolleft) {
|
else if (retval == shiftcontrolleft) {
|
||||||
shift_held = TRUE;
|
shift_held = TRUE;
|
||||||
return CONTROL_LEFT;
|
return CONTROL_LEFT;
|
||||||
|
@ -601,7 +601,7 @@ int parse_kbinput(WINDOW *win)
|
||||||
#endif
|
#endif
|
||||||
/* Are both Shift and Ctrl being held while Delete is pressed? */
|
/* Are both Shift and Ctrl being held while Delete is pressed? */
|
||||||
if ((modifiers & 0x05) == 0x05 && retval == KEY_DC)
|
if ((modifiers & 0x05) == 0x05 && retval == KEY_DC)
|
||||||
return the_code_for(do_cut_prev_word, KEY_BACKSPACE);
|
return CONTROL_SHIFT_DELETE;
|
||||||
/* Is Ctrl being held? */
|
/* Is Ctrl being held? */
|
||||||
if (modifiers & 0x04) {
|
if (modifiers & 0x04) {
|
||||||
if (retval == KEY_UP)
|
if (retval == KEY_UP)
|
||||||
|
|
Loading…
Reference in New Issue