nano

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

commit aff9f4742cc1f4caaa7df9c61debb497788ae7e8
parent 31a2cc9d76b800dcc15d50eaf0ffa077f6f7e8f8
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sat,  8 Mar 2025 11:02:15 +0100

input: remove single-keycode detection from the bracketed-paste routine

It interferes with an upcoming change.

Diffstat:
Msrc/nano.c | 8+-------
1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/src/nano.c b/src/nano.c @@ -1440,7 +1440,6 @@ void suck_up_input_and_paste_it(void) { linestruct *was_cutbuffer = cutbuffer; linestruct *line = make_new_node(NULL); - size_t were_waiting = 0; size_t index = 0; int input = ERR; @@ -1448,13 +1447,8 @@ void suck_up_input_and_paste_it(void) cutbuffer = line; while (bracketed_paste) { - were_waiting = waiting_keycodes(); input = get_kbinput(midwin, BLIND); - /* If key codes come singly, something is wrong. */ - if (were_waiting == 0 && waiting_keycodes() == 0) - bracketed_paste = FALSE; - if ((0x20 <= input && input <= 0xFF && input != DEL_CODE) || input == '\t') { line->data = nrealloc(line->data, index + 2); line->data[index++] = (char)input; @@ -1473,7 +1467,7 @@ void suck_up_input_and_paste_it(void) else paste_text(); - if (were_waiting == 0 || input == FOREIGN_SEQUENCE) + if (input == FOREIGN_SEQUENCE) statusline(ALERT, _("Flawed paste")); free_lines(cutbuffer);