commit 1bd17c44b086a21629b587c418609e18a38463af
parent 762fb4bec55fcd728fa58ad1a1498b5937f70436
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Wed, 4 Oct 2017 21:37:35 +0200
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>
Diffstat:
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/winio.c b/src/winio.c
@@ -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++;