nano

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

commit 37712fb1206c80b1fc9dc69c28537108bb8e1fd7
parent 5765e9675f21f7fbc40fb74387557e2e4bfba36d
Author: Benno Schulenberg <bensberg@justemail.net>
Date:   Sun,  3 Jan 2016 16:21:04 +0000

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

Diffstat:
MChangeLog | 3+++
Msrc/nano.c | 9+--------
2 files changed, 4 insertions(+), 8 deletions(-)

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