emacs-diffs
[Top][All Lists]
Advanced

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

emacs-28 666e40a109: Fix 'display-line-numbers-mode' in hide-show buffer


From: Eli Zaretskii
Subject: emacs-28 666e40a109: Fix 'display-line-numbers-mode' in hide-show buffers
Date: Mon, 21 Feb 2022 15:14:08 -0500 (EST)

branch: emacs-28
commit 666e40a109ea6c0079467e72c806bb04191ff4cc
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Fix 'display-line-numbers-mode' in hide-show buffers
    
    * src/xdisp.c (redisplay_internal): Disable redisplay
    optimizations that consider just the current line, when
    'display-line-numbers-mode' is turned on in the buffer.
    (Bug#54091)
---
 src/xdisp.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/xdisp.c b/src/xdisp.c
index aa70b933f1..3f283d6732 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -15860,6 +15860,14 @@ redisplay_internal (void)
       /* Point must be on the line that we have info recorded about.  */
       && PT >= CHARPOS (tlbufpos)
       && PT <= Z - CHARPOS (tlendpos)
+      /* FIXME: The following condition is only needed when
+        significant parts of the buffer are hidden (e.g., under
+        hs-minor-mode), but there doesn't seem to be a simple way of
+        detecting that, so we always disable the one-line redisplay
+        optimizations whenever display-line-numbers-mode is turned on
+        in the buffer.  */
+      && (NILP (Vdisplay_line_numbers)
+         || EQ (Vdisplay_line_numbers, Qvisual))
       /* All text outside that line, including its final newline,
         must be unchanged.  */
       && text_outside_line_unchanged_p (w, CHARPOS (tlbufpos),



reply via email to

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