tweaks: swap two fragments of code, to allow unwrapping a line

This commit is contained in:
Benno Schulenberg 2025-03-08 11:01:07 +01:00
parent 9c6a62d319
commit 31a2cc9d76

View File

@ -1455,16 +1455,15 @@ void suck_up_input_and_paste_it(void)
if (were_waiting == 0 && waiting_keycodes() == 0)
bracketed_paste = FALSE;
if (input == '\r' || input == '\n') {
if ((0x20 <= input && input <= 0xFF && input != DEL_CODE) || input == '\t') {
line->data = nrealloc(line->data, index + 2);
line->data[index++] = (char)input;
line->data[index] = '\0';
} else if (input == '\r' || input == '\n') {
line->next = make_new_node(line);
line = line->next;
line->data = copy_of("");
index = 0;
} else if ((0x20 <= input && input <= 0xFF && input != DEL_CODE) ||
input == '\t') {
line->data = nrealloc(line->data, index + 2);
line->data[index++] = (char)input;
line->data[index] = '\0';
} else if (input != BRACKETED_PASTE_MARKER)
bracketed_paste = FALSE;
}