]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix forgotten initialization for long line optimizations.
authorGregory Heytings <gregory@heytings.org>
Mon, 1 Aug 2022 13:27:02 +0000 (13:27 +0000)
committerGregory Heytings <gregory@heytings.org>
Mon, 1 Aug 2022 13:28:25 +0000 (15:28 +0200)
* src/xdisp.c (init_iterator): Initialize the 'narrowed_begv'
field.

* src/buffer.c (syms_of_buffer): Docstring clarification.

src/buffer.c
src/xdisp.c

index a07194aef7227987b07328f846968e92f10343a3..e5601af5051c3bce1860c61bc2116aa8416fe28c 100644 (file)
@@ -6431,12 +6431,15 @@ will run for `clone-indirect-buffer' calls as well.  */);
 
   DEFVAR_LISP ("long-line-threshold", Vlong_line_threshold,
     doc: /* Line length above which to use redisplay shortcuts.
+
 The value should be a positive integer or nil.
 If the value is an integer, shortcuts in the display code intended
 to speed up redisplay for long lines will automatically be enabled
 in buffers which contain one or more lines whose length is above
 this threshold.
-If nil, these display shortcuts will always remain disabled.  */);
+If nil, these display shortcuts will always remain disabled.
+
+There is no reason to change that value except for debugging purposes.  */);
   XSETFASTINT (Vlong_line_threshold, 10000);
 
   defsubr (&Sbuffer_live_p);
index 8a19b3bda97f18d3cbf90ce1300b9732098a647f..9574d06bd5cd8265013051d7072a707262b07a9c 100644 (file)
@@ -3472,6 +3472,9 @@ init_iterator (struct it *it, struct window *w,
                        &it->bidi_it);
        }
 
+      if (current_buffer->long_line_optimizations_p)
+       it->narrowed_begv = 0;
+
       /* Compute faces etc.  */
       reseat (it, it->current.pos, true);
     }