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>master
parent
2ae490cd8f
commit
1d7c177606
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue