nano

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

commit d3fbc4d498f5e3d324bb7891a18c2c1229f6d7ad
parent a8e2a24f60c304d071ba16dd103ec2a8741ffa82
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Fri, 29 Jan 2021 16:34:04 +0100

tweaks: remove an old fix that was made superfluous by a recent fix

Commit 43d94692 fixed a miscoloring bug [1] by doing proper backtracking
for multiline regexes.  But this change also solves an older miscoloring
issue [2] without needing to recalculate all the multiline data.  So...
just drop the old fix.  (This isn't perfect: it's probably possible to
cook up a replacement scheme where things get miscolored, but... until
then, this is good enough.)

  [1] https://savannah.gnu.org/bugs/?59948
  [2] https://savannah.gnu.org/bugs/?58481

Also, there is no need to set 'refresh_needed' in do_replace_loop(),
because each replacement prompt will call edit_refresh() anyway, and
the functions that call do_replace_loop() will set it afterward.

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

diff --git a/src/search.c b/src/search.c @@ -669,13 +669,6 @@ ssize_t do_replace_loop(const char *needle, bool whole_word_only, if (ISSET(SOFTWRAP)) openfile->current->extrarows = extra_chunks_in(openfile->current); #endif -#ifdef ENABLE_COLOR - /* Check whether the replacement requires a change in the coloring. */ - check_the_multis(openfile->current); - - if (refresh_needed && !replaceall) - precalc_multicolorinfo(); -#endif set_modified(); as_an_at = TRUE; numreplaced++; @@ -685,11 +678,6 @@ ssize_t do_replace_loop(const char *needle, bool whole_word_only, if (numreplaced == -1) not_found_msg(needle); -#ifdef ENABLE_COLOR - if (refresh_needed) - precalc_multicolorinfo(); -#endif - #ifndef NANO_TINY openfile->mark = was_mark; #endif