bindings: add ^Z (Suspend) to the "Execute Command" menu
This makes suspension more discoverable, and allows the user to rebind ^Z in the main menu without losing the ability to suspend nano. This drops the ^X (Flip Execute) toggle from the menu -- keeping it would make an ugly uneven number and would reduce the space for each menu item too much (clipping "Full Justify" and "Cut Till End") -- but it is still present as a blind toggle.master
parent
d3954901a9
commit
7bad92c50b
|
@ -1109,11 +1109,11 @@ void shortcut_init(void)
|
|||
add_to_funcs(flip_pipe, MEXECUTE,
|
||||
N_("Pipe Text"), WITHORSANS(pipe_gist), BLANKAFTER, NOVIEW);
|
||||
|
||||
add_to_funcs(flip_execute, MEXECUTE,
|
||||
N_("Read File"), WITHORSANS(readfile_gist), BLANKAFTER, NOVIEW);
|
||||
|
||||
add_to_funcs(cut_till_eof, MEXECUTE,
|
||||
N_("Cut Till End"), WITHORSANS(cuttilleof_gist), BLANKAFTER, NOVIEW);
|
||||
|
||||
add_to_funcs(do_suspend_void, MEXECUTE,
|
||||
N_("Suspend"), WITHORSANS(suspend_gist), BLANKAFTER, VIEW);
|
||||
}
|
||||
#endif
|
||||
#ifdef ENABLE_BROWSER
|
||||
|
@ -1341,7 +1341,7 @@ void shortcut_init(void)
|
|||
add_to_sclist(MMAIN|MBROWSER|MHELP, "^L", 0, total_refresh, 0);
|
||||
else
|
||||
add_to_sclist(MMAIN|MBROWSER, "^L", 0, total_refresh, 0);
|
||||
add_to_sclist(MMAIN, "^Z", 0, do_suspend_void, 0);
|
||||
add_to_sclist(MMAIN|MEXECUTE, "^Z", 0, do_suspend_void, 0);
|
||||
|
||||
#ifndef NANO_TINY
|
||||
/* Group of "Appearance" toggles. */
|
||||
|
|
|
@ -965,6 +965,8 @@ void do_suspend_void(void)
|
|||
statusbar(_("Suspension is not enabled"));
|
||||
beep();
|
||||
}
|
||||
|
||||
ran_a_tool = TRUE;
|
||||
}
|
||||
|
||||
/* Handler for SIGCONT (continue after suspend). */
|
||||
|
|
Loading…
Reference in New Issue