Commit 1bd17c44 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

display: keep the cursor switched on when resizing the screen

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

.
Reported-by: default avatarDavid Lawrence Ramsey <pooka109@gmail.com>
No related merge requests found
Showing with 5 additions and 3 deletions
+5 -3
......@@ -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++;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment