input: disallow bracketed pastes when in view mode

When in view mode, nothing shouldbe allowed to be entered into
(or deleted from) the buffer.

This fixes https://savannah.gnu.org/bugs/?63616.
Reported-by: Timothy Liu <liuxf19@163.com>

Bug existed since version 4.8, commit 0e6d693d.
This commit is contained in:
Benno Schulenberg 2023-01-04 11:02:52 +01:00
parent f8ec08a928
commit 264f305d94

View File

@ -1443,7 +1443,10 @@ void suck_up_input_and_paste_it(void)
beep();
}
paste_text();
if (ISSET(VIEW_MODE))
print_view_warning();
else
paste_text();
free_lines(cutbuffer);
cutbuffer = was_cutbuffer;