nano

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

commit 34db8682b37a57c3840a7af729efb58e2ce37edd
parent 61dee21466fe7a326f57c10321af2ee2c0029190
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sat,  3 May 2025 09:01:44 +0200

moving: make cycling (M-%) independent from centering (^L)

The first strike of M-% should always try to center the cursor,
also when the preceding keystroke was ^L.

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

diff --git a/src/move.c b/src/move.c @@ -227,7 +227,9 @@ void do_cycle(void) /* Scroll the line with the cursor to the center of the screen. */ void do_center(void) { - do_cycle(); /* The main loop has set 'cycling_aim' to zero. */ + adjust_viewport(CENTERING); + draw_all_subwindows(); + full_refresh(); } #endif /* !NANO_TINY */