nano

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

commit 1d7c17760620ec207972493d4e24a0269f5860a8
parent 2ae490cd8f106fe0e6e9078d6697878954167015
Author: Benno Schulenberg <bensberg@justemail.net>
Date:   Wed, 29 Jun 2016 15:53:08 +0200

input: don't drop a keystroke on the floor when the terminal resizes

This fixes the first part of https://savannah.gnu.org/bugs/?48331.

Reported-by: Mike Frysinger <vapier@gentoo.org>

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

diff --git a/src/winio.c b/src/winio.c @@ -141,8 +141,10 @@ void get_key_buffer(WINDOW *win) input = wgetch(win); #ifndef NANO_TINY - if (the_window_resized()) + if (the_window_resized()) { + ungetch(input); input = KEY_WINCH; + } #endif if (input == ERR && nodelay_mode)