+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
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);
/* 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);
N_("Formatter"), IFSCHELP(nano_formatter_msg), BLANKAFTER, NOVIEW);
#endif
#endif
+}
#ifndef NANO_TINY
add_to_funcs(case_sens_void, MWHEREIS|MREPLACE,