mirror of
git://git.sv.gnu.org/nano.git
synced 2025-02-16 21:34:26 +03:00
if color support is enabled, we only need to call edit_refresh() to
properly paint multi-line color regexes when COLOR_SYNTAX is set git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1621 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
c53a92d973
commit
760a2dc9b2
@ -1,4 +1,9 @@
|
||||
CVS code -
|
||||
- General:
|
||||
- Change instances in the code that refresh the entire edit
|
||||
window when color support is enabled (in order to properly
|
||||
handle multi-line color regexes) to only do so when
|
||||
it's necessary, i.e, when COLOR_SYNTAX is set. (DLR)
|
||||
- nano.c:
|
||||
main()
|
||||
- Move the call to raw() on systems that don't define
|
||||
|
@ -62,7 +62,8 @@ void load_file(int update)
|
||||
|
||||
#ifdef ENABLE_COLOR
|
||||
update_color();
|
||||
edit_refresh();
|
||||
if (ISSET(COLOR_SYNTAX))
|
||||
edit_refresh();
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -100,7 +101,8 @@ void new_file(void)
|
||||
|
||||
#ifdef ENABLE_COLOR
|
||||
update_color();
|
||||
edit_refresh();
|
||||
if (ISSET(COLOR_SYNTAX))
|
||||
edit_refresh();
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -1647,7 +1649,8 @@ int write_file(const char *name, int tmp, int append, int nonamechange)
|
||||
filename = mallocstrcpy(filename, realname);
|
||||
#ifdef ENABLE_COLOR
|
||||
update_color();
|
||||
edit_refresh();
|
||||
if (ISSET(COLOR_SYNTAX))
|
||||
edit_refresh();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -988,7 +988,8 @@ void do_char(char ch)
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_COLOR
|
||||
refresh = 1;
|
||||
if (ISSET(COLOR_SYNTAX))
|
||||
refresh = 1;
|
||||
#endif
|
||||
|
||||
#if !defined(DISABLE_WRAPPING) || defined(ENABLE_COLOR)
|
||||
@ -1067,7 +1068,8 @@ int do_delete(void)
|
||||
|
||||
align(¤t->data);
|
||||
#ifdef ENABLE_COLOR
|
||||
refresh = 1;
|
||||
if (ISSET(COLOR_SYNTAX))
|
||||
refresh = 1;
|
||||
#endif
|
||||
} else if (current->next != NULL && (current->next != filebot || blbf)) {
|
||||
/* We can delete the line before filebot only if it is blank: it
|
||||
|
Loading…
x
Reference in New Issue
Block a user