]> git.eshelyaron.com Git - emacs.git/commitdiff
* src/xdisp.c (redisplay_window): Small optimization.
authorGregory Heytings <gregory@heytings.org>
Wed, 20 Jul 2022 19:53:36 +0000 (19:53 +0000)
committerGregory Heytings <gregory@heytings.org>
Wed, 20 Jul 2022 19:54:39 +0000 (21:54 +0200)
src/xdisp.c

index 4701e2b2459a471d64ab4f1a4db6cc2be1f6019c..2a6f32aa61f14509697019b3c4e8c39e0eb40514 100644 (file)
@@ -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;
     }