tweaks: remove a superfluous check on the length of the key buffer

None of the calls of get_input() ask for more codes than those which
already were or will now have become available in the key buffer.
This commit is contained in:
Benno Schulenberg 2020-07-25 13:37:16 +02:00
parent 7157f5a3ce
commit 294051769c

View File

@ -300,10 +300,6 @@ int *get_input(WINDOW *win, size_t input_len)
if (key_buffer_len == 0)
return NULL;
/* Limit the request to the number of available codes in the buffer. */
if (input_len > key_buffer_len)
input_len = key_buffer_len;
/* Copy input_len codes from the head of the keystroke buffer. */
input = (int *)nmalloc(input_len * sizeof(int));
memcpy(input, key_buffer, input_len * sizeof(int));