diff options
| author | Eli Zaretskii <eliz@gnu.org> | 2022-06-25 10:46:10 +0300 |
|---|---|---|
| committer | Eli Zaretskii <eliz@gnu.org> | 2022-06-25 10:46:10 +0300 |
| commit | 473affe5c6f44973725dd5bfb6990e089657e81e (patch) | |
| tree | 138daffdef332ce1c1b8e70a8d1fd9561b7f3aef /src/regex-emacs.c | |
| parent | 230891d9f33644146cf1e962824618256374eadc (diff) | |
| download | emacs-473affe5c6f44973725dd5bfb6990e089657e81e.tar.gz | |
Minor optimization of the "abort redisplay" feature
* src/xdisp.c (init_iterator, set_iterator_to_next)
(redisplay_internal):
* src/syntax.c (scan_sexps_forward):
* src/regex-emacs.c (re_match_2_internal):
* src/bidi.c (bidi_fetch_char, bidi_paragraph_init)
(bidi_find_bracket_pairs, bidi_find_other_level_edge): Don't call
'update_redisplay_ticks' if aborting too-long redisplay is
disabled. (Bug#45898)
Diffstat (limited to 'src/regex-emacs.c')
| -rw-r--r-- | src/regex-emacs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/regex-emacs.c b/src/regex-emacs.c index 4d87418eeaf..9b2c14c413d 100644 --- a/src/regex-emacs.c +++ b/src/regex-emacs.c @@ -4217,7 +4217,7 @@ re_match_2_internal (struct re_pattern_buffer *bufp, means we consider 50 buffer positions examined by this function roughly equivalent to the display engine iterating over a single buffer position. */ - if (nchars > 0) + if (max_redisplay_ticks > 0 && nchars > 0) update_redisplay_ticks (nchars / 50 + 1, NULL); return dcnt; } @@ -5087,7 +5087,7 @@ re_match_2_internal (struct re_pattern_buffer *bufp, unbind_to (count, Qnil); SAFE_FREE (); - if (nchars > 0) + if (max_redisplay_ticks > 0 && nchars > 0) update_redisplay_ticks (nchars / 50 + 1, NULL); return -1; /* Failure to match. */ |
