emacs-diffs
[Top][All Lists]
Advanced

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

feature/long-lines-improvements d0e4ec3c29: Fix forgotten initialization


From: Gregory Heytings
Subject: feature/long-lines-improvements d0e4ec3c29: Fix forgotten initialization for long line optimizations.
Date: Mon, 1 Aug 2022 09:28:44 -0400 (EDT)

branch: feature/long-lines-improvements
commit d0e4ec3c29abc61a92c40d89fc7d3e3cc452e934
Author: Gregory Heytings <gregory@heytings.org>
Commit: Gregory Heytings <gregory@heytings.org>

    Fix forgotten initialization for long line optimizations.
    
    * src/xdisp.c (init_iterator): Initialize the 'narrowed_begv'
    field.
    
    * src/buffer.c (syms_of_buffer): Docstring clarification.
---
 src/buffer.c | 5 ++++-
 src/xdisp.c  | 3 +++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/buffer.c b/src/buffer.c
index a07194aef7..e5601af505 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -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);
diff --git a/src/xdisp.c b/src/xdisp.c
index 8a19b3bda9..9574d06bd5 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -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);
     }



reply via email to

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