commit 6b0864837753767cb80aefb57c5f849f7b8bbc15
parent 8c456423e9307a8aaa4e221fbc1a588f1b315139
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Fri, 12 Oct 2018 11:58:45 +0200
feedback: give proper message for ^R when combining --view & --restricted
When using --view --multibuffer --restricted, it is the latter option
that forbids reading in another file, so that is what the status bar
should say.
This fixes https://savannah.gnu.org/bugs/?54824.
Bug existed since version 2.9.5, commit 8b8c6bb8.
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/nano.c b/src/nano.c
@@ -1644,12 +1644,12 @@ bool wanted_to_move(void (*func)(void))
func == to_first_line || func == to_last_line;
}
-/* Return TRUE when the given shortcut is valid in view mode. */
+/* Return TRUE when the given shortcut is admissible in view mode. */
bool okay_for_view(const sc *shortcut)
{
const subnfunc *func = sctofunc(shortcut);
- return (func != NULL && func->viewok);
+ return (func == NULL || func->viewok);
}
/* Read in a keystroke. Act on the keystroke if it is a shortcut or a toggle;