emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

feature/fix-the-long-lines-display-bug 9a894206f6: Improve the heuristic


From: Gregory Heytings
Subject: feature/fix-the-long-lines-display-bug 9a894206f6: Improve the heuristic for long lines detection again.
Date: Tue, 19 Jul 2022 09:36:18 -0400 (EDT)

branch: feature/fix-the-long-lines-display-bug
commit 9a894206f6990eb5e0edc464dae02700a33d2348
Author: Gregory Heytings <gregory@heytings.org>
Commit: Gregory Heytings <gregory@heytings.org>

    Improve the heuristic for long lines detection again.
    
    * src/xdisp.c (redisplay_window): Improve the heuristic again.
---
 src/xdisp.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/xdisp.c b/src/xdisp.c
index 05fb008ff1..ee34487a44 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -19294,7 +19294,9 @@ 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
-      && Z - BEG - BUF_UNCHANGED_SIZE (current_buffer) <= 1)
+      && (MODIFF - UNCHANGED_MODIFIED > 4
+         || Z - BEG - BUF_UNCHANGED_SIZE (current_buffer) > 1
+         || Z - BEG - BUF_UNCHANGED_SIZE (current_buffer) < -1))
     {
       ptrdiff_t cur, next, found, max = 0;
       for (cur = 1; cur < Z; cur = next)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]