[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-26 081d218: Fix 'line-number-display-width' in hscro
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] emacs-26 081d218: Fix 'line-number-display-width' in hscrolled windows |
Date: |
Mon, 16 Oct 2017 11:53:00 -0400 (EDT) |
branch: emacs-26
commit 081d2187c4b8b54e8415b304fffafedc4ecfe446
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Fix 'line-number-display-width' in hscrolled windows
* src/indent.c (line_number_display_width): Make sure a line
number is generated even when the first line of the window is
completely hscrolled out of view. (Bug#28854)
---
src/indent.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/indent.c b/src/indent.c
index 26507b5..be86766 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -1974,6 +1974,11 @@ line_number_display_width (struct window *w, int *width,
int *pixel_width)
saved_restriction = true;
}
start_display (&it, w, wstart);
+ /* The call to move_it_by_lines below will not generate a line
+ number if the first line shown in the window is hscrolled
+ such that all of its display elements are out of view. So we
+ pretend the hscroll doesn't exist. */
+ it.first_visible_x = 0;
move_it_by_lines (&it, 1);
*width = it.lnum_width;
*pixel_width = it.lnum_pixel_width;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-26 081d218: Fix 'line-number-display-width' in hscrolled windows,
Eli Zaretskii <=