]> git.eshelyaron.com Git - emacs.git/commitdiff
Improve detection of very long lines
authorEli Zaretskii <eliz@gnu.org>
Thu, 1 Dec 2022 22:07:53 +0000 (00:07 +0200)
committerEli Zaretskii <eliz@gnu.org>
Thu, 1 Dec 2022 22:07:53 +0000 (00:07 +0200)
* src/xdisp.c (redisplay_window): Recheck for long lines if the
restriction has changed.  (Bug#56682)

src/xdisp.c

index 171c6ccaa0233860d50a964fa0eb9067a93baaf9..255851b9213430e58d58e0c5cf4f64389b4328d1 100644 (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);