diff options
| author | Eli Zaretskii | 2022-02-21 22:12:57 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2022-02-21 22:12:57 +0200 |
| commit | 666e40a109ea6c0079467e72c806bb04191ff4cc (patch) | |
| tree | 6190c5d946840798e7cd966ef7ca5df2b13f8cd3 /src | |
| parent | 68d134cf0f784601e50cefc4056eb0ace510a982 (diff) | |
| download | emacs-666e40a109ea6c0079467e72c806bb04191ff4cc.tar.gz emacs-666e40a109ea6c0079467e72c806bb04191ff4cc.zip | |
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)
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index aa70b933f14..3f283d6732a 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -15860,6 +15860,14 @@ redisplay_internal (void) | |||
| 15860 | /* Point must be on the line that we have info recorded about. */ | 15860 | /* Point must be on the line that we have info recorded about. */ |
| 15861 | && PT >= CHARPOS (tlbufpos) | 15861 | && PT >= CHARPOS (tlbufpos) |
| 15862 | && PT <= Z - CHARPOS (tlendpos) | 15862 | && PT <= Z - CHARPOS (tlendpos) |
| 15863 | /* FIXME: The following condition is only needed when | ||
| 15864 | significant parts of the buffer are hidden (e.g., under | ||
| 15865 | hs-minor-mode), but there doesn't seem to be a simple way of | ||
| 15866 | detecting that, so we always disable the one-line redisplay | ||
| 15867 | optimizations whenever display-line-numbers-mode is turned on | ||
| 15868 | in the buffer. */ | ||
| 15869 | && (NILP (Vdisplay_line_numbers) | ||
| 15870 | || EQ (Vdisplay_line_numbers, Qvisual)) | ||
| 15863 | /* All text outside that line, including its final newline, | 15871 | /* All text outside that line, including its final newline, |
| 15864 | must be unchanged. */ | 15872 | must be unchanged. */ |
| 15865 | && text_outside_line_unchanged_p (w, CHARPOS (tlbufpos), | 15873 | && text_outside_line_unchanged_p (w, CHARPOS (tlbufpos), |