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)
This commit is contained in:
parent
68d134cf0f
commit
666e40a109
1 changed files with 8 additions and 0 deletions
|
@ -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),
|
||||
|
|
Loading…
Add table
Reference in a new issue