commit a13cd6a1775b03c20b5f6e9feb0060ced8768efb
parent f60c6b25ad6bbb105a6c1186dbd833c32ab38ddb
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Tue, 5 Mar 2024 11:31:48 +0100
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
Diffstat:
1 file changed, 10 insertions(+), 0 deletions(-)
diff --git 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