tweaks: check the multiline regexes only for Delete and Backspace

The checking for all functions that are marked as not-okay-for-view-mode
was excessive and unneeded.  It had been inherited from commit d47d8cd4
from thirteen years ago, and was never verified for correctness.

This addresses the main part of https://savannah.gnu.org/bugs/?62903.
This commit is contained in:
Benno Schulenberg 2022-08-16 16:18:56 +02:00
parent 271bd5d3ba
commit 0bcbd0015f

View File

@ -1666,12 +1666,14 @@ void process_a_keystroke(void)
also_the_last = FALSE; also_the_last = FALSE;
} }
#endif #endif
if (!refresh_needed && (function == do_delete || function == do_backspace)) {
#ifdef ENABLE_COLOR #ifdef ENABLE_COLOR
if (!refresh_needed && changes_something(function))
check_the_multis(openfile->current); check_the_multis(openfile->current);
if (!refresh_needed)
#endif #endif
if (!refresh_needed && (function == do_delete || function == do_backspace)) update_line(openfile->current, openfile->current_x);
update_line(openfile->current, openfile->current_x); }
#ifndef NANO_TINY #ifndef NANO_TINY
if (bracketed_paste) if (bracketed_paste)