Not showing ^R and ^T in the help lines in restricted mode (if possible),

to give visual feedback.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5329 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
Benno Schulenberg 2015-07-30 10:37:28 +00:00
parent efbf7b6ef3
commit 2ee18d635f
2 changed files with 21 additions and 5 deletions

View File

@ -1,3 +1,7 @@
2015-07-30 Benno Schulenberg <bensberg@justemail.net>
* src/global.c (shortcut_init): Don't show ^R and ^T in the help lines
in restricted mode (if possible), to give visual feedback.
2015-07-29 Benno Schulenberg <bensberg@justemail.net>
* src/text.c (do_linter): When the linter is called in restricted mode
(possible when nano was built with --disable-speller), it is better to

View File

@ -685,18 +685,28 @@ void shortcut_init(void)
add_to_funcs(do_writeout_void, MMAIN,
N_("Write Out"), IFSCHELP(nano_writeout_msg), TOGETHER, NOVIEW);
/* We allow inserting files in view mode if multibuffers are
* available, so that we can view multiple files. If we're using
* restricted mode, inserting files is disabled, since it allows
* reading from or writing to files not specified on the command
* line. */
#ifndef DISABLE_JUSTIFY
if (!ISSET(RESTRICTED)) {
#else
/* If we can't replace Insert with Justify, show Insert anyway, to
* keep the help items nicely paired also in restricted mode. */
if (TRUE) {
#endif
add_to_funcs(do_insertfile_void, MMAIN,
read_file_tag, IFSCHELP(nano_insert_msg), BLANKAFTER,
/* We allow inserting files in view mode if multibuffer mode
* is switched on, so that we can view multiple files. */
#ifndef DISABLE_MULTIBUFFER
VIEW);
#else
NOVIEW);
#endif
} else {
#ifndef DISABLE_JUSTIFY
add_to_funcs(do_justify_void, MMAIN,
N_("Justify"), IFSCHELP(nano_justify_msg), BLANKAFTER, NOVIEW);
#endif
}
add_to_funcs(do_search, MMAIN,
whereis_tag, IFSCHELP(nano_whereis_msg), TOGETHER, VIEW);
@ -731,6 +741,7 @@ void shortcut_init(void)
/* Remember the entry for Uncut, to be able to replace it with Unjustify. */
uncutfunc = tailfunc;
if (!ISSET(RESTRICTED)) {
#ifndef DISABLE_JUSTIFY
add_to_funcs(do_justify_void, MMAIN,
N_("Justify"), IFSCHELP(nano_justify_msg), TOGETHER, NOVIEW);
@ -749,6 +760,7 @@ void shortcut_init(void)
N_("Formatter"), IFSCHELP(nano_formatter_msg), BLANKAFTER, NOVIEW);
#endif
#endif
}
#ifndef NANO_TINY
add_to_funcs(case_sens_void, MWHEREIS|MREPLACE,