[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master bf96464: Fix current-line hscrolling in buffers wit
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] master bf96464: Fix current-line hscrolling in buffers with header-line |
Date: |
Mon, 22 May 2017 14:17:35 -0400 (EDT) |
branch: master
commit bf96464e2f731c9b7a9f9589b2de001a03ed3f2f
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Fix current-line hscrolling in buffers with header-line
* src/xdisp.c (display_line): When testing the glyph row's
vertical position against the cursor position, account for header
line, if any. (Bug#27014)
---
src/xdisp.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/xdisp.c b/src/xdisp.c
index 0588061..ddb26b8 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -20671,7 +20671,9 @@ display_line (struct it *it, int cursor_vpos)
ptrdiff_t min_pos = ZV + 1, max_pos = 0;
ptrdiff_t min_bpos UNINIT, max_bpos UNINIT;
bool pending_handle_line_prefix = false;
- bool hscroll_this_line = (cursor_vpos >= 0 && it->vpos == cursor_vpos
+ int header_line = WINDOW_WANTS_HEADER_LINE_P (it->w);
+ bool hscroll_this_line = (cursor_vpos >= 0
+ && it->vpos == cursor_vpos - header_line
&& hscrolling_current_line_p (it->w));
int first_visible_x = it->first_visible_x;
int last_visible_x = it->last_visible_x;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master bf96464: Fix current-line hscrolling in buffers with header-line,
Eli Zaretskii <=