nano

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

commit 5a98a511735a6ffec4057c91019336094488d8e3
parent 2eaba21a4cc2c99875a57924b4d4a4902136e5d6
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Fri, 10 Jan 2020 17:24:29 +0100

bindings: do not show the Full-Justify keystroke when in View mode

The file may not be modified when in View mode, so it makes no sense
to prominently show the M-J keystroke in the Search menu when in that
mode, especially since the keystroke does not really belong there.

This addresses https://savannah.gnu.org/bugs/?57574.

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

diff --git a/src/global.c b/src/global.c @@ -1255,7 +1255,8 @@ void shortcut_init(void) add_to_sclist(MMAIN, "M-D", 0, do_wordlinechar_count, 0); #endif #ifdef ENABLE_JUSTIFY - add_to_sclist(MMAIN|MWHEREIS, "M-J", 0, do_full_justify, 0); + if (!ISSET(VIEW_MODE)) + add_to_sclist(MMAIN|MWHEREIS, "M-J", 0, do_full_justify, 0); #endif if (!ISSET(PRESERVE)) add_to_sclist(MMAIN|MHELP|MBROWSER, "^L", 0, total_refresh, 0);