Letting reset_multis() figure out whether after an addition a full refresh is

needed (for the sake of multiline regexes), instead of doing it always.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5524 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
Benno Schulenberg 2016-01-03 16:21:04 +00:00
parent 5765e9675f
commit 37712fb120
2 changed files with 4 additions and 8 deletions

View File

@ -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.

View File

@ -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;