nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 294051769caba7f145137ad265ef4c450fc9ab12
parent 7157f5a3ce7a89a020b67e079ef4941a1980a795
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sat, 25 Jul 2020 13:37:16 +0200

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.

Diffstat:
Msrc/winio.c | 4----
1 file changed, 0 insertions(+), 4 deletions(-)

diff --git a/src/winio.c b/src/winio.c @@ -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));