nano

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

commit 9ae84071eb645beb8898469845b2f1a8dab9d901
parent c2b4c2ae0e2751fbef747e57100fa2dae8127e24
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Fri, 22 Mar 2024 16:04:21 +0100

input: store key codes in the macro buffer as they come in from ncurses

Otherwise the leading ESC of keystrokes like M-A does not get recorded.

This reverts commit 191cf671 from three weeks ago.

This fixes https://savannah.gnu.org/bugs/?65507.

Diffstat:
Msrc/winio.c | 9++++-----
1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/winio.c b/src/winio.c @@ -290,6 +290,10 @@ void read_keys_from(WINDOW *frame) napms(20); while (TRUE) { +#ifndef NANO_TINY + if (recording) + add_to_macrobuffer(input); +#endif input = wgetch(frame); /* If there aren't any more characters, stop reading. */ @@ -1369,11 +1373,6 @@ int get_kbinput(WINDOW *frame, bool showcursor) while (kbinput == ERR) kbinput = parse_kbinput(frame); -#ifndef NANO_TINY - if (recording) - add_to_macrobuffer(kbinput); -#endif - /* If we read from the edit window, blank the status bar when it's time. */ if (frame == midwin) blank_it_when_expired();