diff --git a/src/proto.h b/src/proto.h index e9ff05f2c9fea84badb8f3063e8f24157ee7f033..d82d0cbd85e5ed0b86b15ffd9218b180252a55e9 100644 --- a/src/proto.h +++ b/src/proto.h @@ -624,7 +624,6 @@ void dump_filestruct(const filestruct *inptr); /* Most functions in winio.c. */ void record_macro(void); void run_macro(void); -void get_key_buffer(WINDOW *win); size_t get_key_buffer_len(void); void unget_kbinput(int kbinput, bool metakey); int get_kbinput(WINDOW *win, bool showcursor); diff --git a/src/winio.c b/src/winio.c index 35e68ce9c80d730ad51375960b34e6191e9e116d..1e40f7069e53d293e9489408e5a4aac34c4af762 100644 --- a/src/winio.c +++ b/src/winio.c @@ -169,15 +169,11 @@ void run_macro(void) /* Read in a sequence of keystrokes from the given window and save them * in the keystroke buffer. */ -void get_key_buffer(WINDOW *win) +void read_keys_from(WINDOW *win) { int input = ERR; size_t errcount = 0; - /* If the keystroke buffer isn't empty, get out. */ - if (key_buffer != NULL) - return; - /* Before reading the first keycode, display any pending screen updates. */ doupdate(); @@ -309,7 +305,7 @@ int *get_input(WINDOW *win, size_t input_len) int *input; if (key_buffer_len == 0 && win != NULL) - get_key_buffer(win); + read_keys_from(win); if (key_buffer_len == 0) return NULL;