From: Eli Zaretskii Date: Mon, 22 May 2017 18:15:17 +0000 (+0300) Subject: Fix current-line hscrolling in buffers with header-line X-Git-Tag: emacs-26.0.90~521^2~306 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bf96464e2f731c9b7a9f9589b2de001a03ed3f2f;p=emacs.git 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) --- diff --git a/src/xdisp.c b/src/xdisp.c index 05880617385..ddb26b8defd 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;