commit 61dee21466fe7a326f57c10321af2ee2c0029190
parent 820f68f1473fb6e864a168532bf2fdf768b75e4b
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Mon, 28 Apr 2025 12:27:05 +0200
bindings: let ^L just center the cursor, not cycle it -- let M-% cycle it
In my experience the default cycling behavior of ^L was puzzling:
hitting ^L twice left me wondering sometimes: where is the cursor?
Inspired-by: Peter Michaux <petermichaux@gmail.com>
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/global.c b/src/global.c
@@ -1437,7 +1437,8 @@ void shortcut_init(void)
add_to_sclist(MEXECUTE, "^J", 0, do_full_justify, 0);
#endif
#ifndef NANO_TINY
- add_to_sclist(MMAIN, "^L", 0, do_cycle, 0);
+ add_to_sclist(MMAIN, "^L", 0, do_center, 0);
+ add_to_sclist(MMAIN, "M-%", 0, do_cycle, 0);
add_to_sclist((MMOST|MBROWSER|MHELP|MYESNO)&~MMAIN, "^L", 0, full_refresh, 0);
#else
add_to_sclist(MMOST|MBROWSER|MHELP|MYESNO, "^L", 0, full_refresh, 0);