nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit fe3a72ce3ea66a568acfdc31ede3b136a20612c9
parent 6cd53e7f4461de24e9d489ebf72a91ec70f9f908
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Wed, 12 Sep 2018 19:34:21 +0200

main: allow toggling all editor features when in view mode

Most of these toggles just change the appearance of things, and
all of them are harmless -- none of them modify the contents of
the buffer.

This fixes https://savannah.gnu.org/bugs/?54650.
Reported-by: Liu Hao <lh_mouse@126.com>

Bug existed since version 2.9.4, commit 54103d8e.

(The offending commit meant in the previous commit was 60f1090d.
My mistake.)

Diffstat:
Msrc/nano.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/nano.c b/src/nano.c @@ -1753,7 +1753,8 @@ int do_input(bool allow_funcs) if (shortcut == NULL) pletion_line = NULL; else { - if (ISSET(VIEW_MODE) && !okay_for_view(shortcut)) { + if (ISSET(VIEW_MODE) && shortcut->func != do_toggle_void && + !okay_for_view(shortcut)) { print_view_warning(); return ERR; }