Aborting reset_multis() when there are zero multiline regexes.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5525 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Этот коммит содержится в:
родитель
37712fb120
Коммит
a5bc70a541
@ -5,6 +5,7 @@
|
|||||||
* src/nano.c (do_output): Let reset_multis() figure out whether after
|
* src/nano.c (do_output): Let reset_multis() figure out whether after
|
||||||
an addition a full refresh is needed (for multiline-regexes' sake),
|
an addition a full refresh is needed (for multiline-regexes' sake),
|
||||||
instead of doing it always.
|
instead of doing it always.
|
||||||
|
* src/color.c (reset_multis): Abort when having no multiline regexes.
|
||||||
|
|
||||||
2016-01-02 Benno Schulenberg <bensberg@justemail.net>
|
2016-01-02 Benno Schulenberg <bensberg@justemail.net>
|
||||||
* src/text.c (do_spell, do_formatter): Plug three tiny memory leaks.
|
* src/text.c (do_spell, do_formatter): Plug three tiny memory leaks.
|
||||||
|
@ -417,7 +417,8 @@ void reset_multis(filestruct *fileptr, bool force)
|
|||||||
regmatch_t startmatch, endmatch;
|
regmatch_t startmatch, endmatch;
|
||||||
const colortype *tmpcolor = openfile->colorstrings;
|
const colortype *tmpcolor = openfile->colorstrings;
|
||||||
|
|
||||||
if (!openfile->syntax)
|
/* If there is no syntax or no multiline regex, there is nothing to do. */
|
||||||
|
if (openfile->syntax == NULL || openfile->syntax->nmultis == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (; tmpcolor != NULL; tmpcolor = tmpcolor->next) {
|
for (; tmpcolor != NULL; tmpcolor = tmpcolor->next) {
|
||||||
|
@ -1728,8 +1728,7 @@ int do_input(bool allow_funcs)
|
|||||||
/* Execute the function of the shortcut. */
|
/* Execute the function of the shortcut. */
|
||||||
s->scfunc();
|
s->scfunc();
|
||||||
#ifndef DISABLE_COLOR
|
#ifndef DISABLE_COLOR
|
||||||
if (f && !f->viewok && openfile->syntax != NULL
|
if (f && !f->viewok)
|
||||||
&& openfile->syntax->nmultis > 0)
|
|
||||||
reset_multis(openfile->current, FALSE);
|
reset_multis(openfile->current, FALSE);
|
||||||
#endif
|
#endif
|
||||||
if (edit_refresh_needed) {
|
if (edit_refresh_needed) {
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user