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 e09c056a44: * src/xdisp.c (redisp


From: Gregory Heytings
Subject: feature/fix-the-long-lines-display-bug e09c056a44: * src/xdisp.c (redisplay_window): Small optimization.
Date: Wed, 20 Jul 2022 15:55:49 -0400 (EDT)

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

    * src/xdisp.c (redisplay_window): Small optimization.
---
 src/xdisp.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/xdisp.c b/src/xdisp.c
index 4701e2b245..2a6f32aa61 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -19295,15 +19295,16 @@ redisplay_window (Lisp_Object window, bool 
just_this_one_p)
       && !current_buffer->long_line_optimizations_p
       && MODIFF - UNCHANGED_MODIFIED > 8)
     {
-      ptrdiff_t cur, next, found, max = 0;
+      ptrdiff_t cur, next, found, max = 0, threshold;
+      threshold = XFIXNUM (Vlong_line_threshold);
       for (cur = 1; cur < Z; cur = next)
        {
          next = find_newline1 (cur, CHAR_TO_BYTE (cur), 0, -1, 1,
                                &found, NULL, true);
          if (next - cur > max) max = next - cur;
-         if (!found || max > XFIXNUM (Vlong_line_threshold)) break;
+         if (!found || max > threshold) break;
        }
-      if (max > XFIXNUM (Vlong_line_threshold))
+      if (max > threshold)
        current_buffer->long_line_optimizations_p = true;
     }
 



reply via email to

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