1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-03 08:30:09 +00:00

Improve detection of very long lines

* src/xdisp.c (redisplay_window): Recheck for long lines if the
restriction has changed.  (Bug#56682)
This commit is contained in:
Eli Zaretskii 2022-12-02 00:07:53 +02:00
parent 9c58ea37af
commit 368c7c7d8e

View File

@ -19535,7 +19535,8 @@ redisplay_window (Lisp_Object window, bool just_this_one_p)
/* Check whether the buffer to be displayed contains long lines. */
if (!NILP (Vlong_line_threshold)
&& !current_buffer->long_line_optimizations_p
&& CHARS_MODIFF - CHARS_UNCHANGED_MODIFIED > 8)
&& (CHARS_MODIFF - CHARS_UNCHANGED_MODIFIED > 8
|| current_buffer->clip_changed))
{
ptrdiff_t cur, next, found, max = 0, threshold;
threshold = XFIXNUM (Vlong_line_threshold);