display: keep the cursor switched on when resizing the screen

This fixes https://savannah.gnu.org/bugs/?52149.
Reported-by: David Lawrence Ramsey <pooka109@gmail.com>
master
Benno Schulenberg 2017-10-04 21:37:35 +02:00
parent 762fb4bec5
commit 1bd17c44b0
1 changed files with 5 additions and 3 deletions

View File

@ -128,8 +128,6 @@ void get_key_buffer(WINDOW *win)
/* Read in the first character using whatever mode we're in. */
input = wgetch(win);
curs_set(0);
#ifndef NANO_TINY
if (the_window_resized) {
ungetch(input);
@ -138,8 +136,10 @@ void get_key_buffer(WINDOW *win)
}
#endif
if (input == ERR && !waiting_mode)
if (input == ERR && !waiting_mode) {
curs_set(0);
return;
}
while (input == ERR) {
/* If we've failed to get a character MAX_BUF_SIZE times in a row,
@ -159,6 +159,8 @@ void get_key_buffer(WINDOW *win)
input = wgetch(win);
}
curs_set(0);
/* Increment the length of the keystroke buffer, and save the value
* of the keystroke at the end of it. */
key_buffer_len++;