diff options
| author | Benno Schulenberg <bensberg@telfort.nl> | 2024-03-05 11:31:48 +0100 |
|---|---|---|
| committer | Benno Schulenberg <bensberg@telfort.nl> | 2024-03-05 11:31:48 +0100 |
| commit | a13cd6a1775b03c20b5f6e9feb0060ced8768efb (patch) | |
| tree | 19a0f23175b8abea9b464d7aeb723fc5a1e13e5c | |
| parent | f60c6b25ad6bbb105a6c1186dbd833c32ab38ddb (diff) | |
| download | nano-a13cd6a1.tar.gz | |
execute: show "Older" and "Newer" in the help lines, to allow rebinding
Since commits c8363a0d and a75bf0a1 from seven years ago, the Execute
menu permits retrieving previously executed commands, but the help text
and help lines never showed the corresponding keystrokes.
Four years ago commit d3954901 made the Execute menu directly accessible,
but I preferred to not mention the ^P/^N keystrokes in the help lines,
to leave as much space as possible for the executable functions (added
in subsequent commits), thinking that no one would want to rebind those
keystrokes anyway, as the Up/Down arrows seem more logical and easier.
The issue was reported by Ivan Vorontsov:
https://lists.gnu.org/archive/html/help-nano/2024-02/msg00003.html
| -rw-r--r-- | src/global.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/global.c b/src/global.c index c4d0d31..4c5f0ab 100644 --- a/src/global.c +++ b/src/global.c @@ -670,6 +670,10 @@ void shortcut_init(void) const char *execute_gist = N_("Execute a function or an external command"); const char *pipe_gist = N_("Pipe the current buffer (or marked region) to the command"); +#ifdef ENABLE_HISTORIES + const char *older_command_gist = N_("Recall the previous command"); + const char *newer_command_gist = N_("Recall the next command"); +#endif const char *convert_gist = N_("Do not convert from DOS/Mac format"); #endif #ifdef ENABLE_MULTIBUFFER @@ -841,6 +845,12 @@ void shortcut_init(void) N_("Older"), WHENHELP(older_gist), TOGETHER); add_to_funcs(get_newer_item, MWHEREIS|MREPLACE|MREPLACEWITH|MWHEREISFILE, N_("Newer"), WHENHELP(newer_gist), BLANKAFTER); +#ifndef NANO_TINY + add_to_funcs(get_older_item, MEXECUTE, + N_("Older"), WHENHELP(older_command_gist), TOGETHER); + add_to_funcs(get_newer_item, MEXECUTE, + N_("Newer"), WHENHELP(newer_command_gist), BLANKAFTER); +#endif #endif #ifdef ENABLE_BROWSER |
