diff --git a/ChangeLog b/ChangeLog index abc65feaebfc9e5cb7f0e1c34e36e684c0c2b813..bd995521b26d5dbeaca773ee289ffc22206341bc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,9 @@ * src/text.c (do_deletion), src/nano.c (do_input): Let reset_multis() figure out whether after a deletion a full refresh is needed, before doing a redraw of the current line. This fixes Savannah bug #46794. + * src/nano.c (do_output): Let reset_multis() figure out whether after + an addition a full refresh is needed (for multiline-regexes' sake), + instead of doing it always. 2016-01-02 Benno Schulenberg <bensberg@justemail.net> * src/text.c (do_spell, do_formatter): Plug three tiny memory leaks. diff --git a/src/nano.c b/src/nano.c index e7af9b067ac9363de2583fde1bd46941065c4592..43903453ec85c8bc0ee7f005ec07ecc84a62b239 100644 --- a/src/nano.c +++ b/src/nano.c @@ -1946,14 +1946,6 @@ void do_output(char *output, size_t output_len, bool allow_cntrls) #endif } -#ifndef DISABLE_COLOR - /* If syntax highlighting is turned on and there are multiline regexes, - * the edit window will need to be refreshed. */ - if (!ISSET(NO_COLOR_SYNTAX) && openfile->syntax && - openfile->syntax->nmultis > 0) - edit_refresh_needed = TRUE; -#endif - #ifndef NANO_TINY /* Well, we might also need a full refresh if we've changed the * line length to be a new multiple of COLS. */ @@ -1969,6 +1961,7 @@ void do_output(char *output, size_t output_len, bool allow_cntrls) #ifndef DISABLE_COLOR reset_multis(openfile->current, FALSE); #endif + if (edit_refresh_needed == TRUE) { edit_refresh(); edit_refresh_needed = FALSE;