diff options
| author | Eli Zaretskii | 2017-05-22 21:15:17 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2017-05-22 21:15:17 +0300 |
| commit | bf96464e2f731c9b7a9f9589b2de001a03ed3f2f (patch) | |
| tree | 94b7e4e3b09534a609f9da38f742826e08ae13f6 | |
| parent | e7b9a6fc4adc584b1c89a8e7502734d063fab2cd (diff) | |
| download | emacs-bf96464e2f731c9b7a9f9589b2de001a03ed3f2f.tar.gz emacs-bf96464e2f731c9b7a9f9589b2de001a03ed3f2f.zip | |
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)
| -rw-r--r-- | src/xdisp.c | 4 |
1 files changed, 3 insertions, 1 deletions
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) | |||
| 20671 | ptrdiff_t min_pos = ZV + 1, max_pos = 0; | 20671 | ptrdiff_t min_pos = ZV + 1, max_pos = 0; |
| 20672 | ptrdiff_t min_bpos UNINIT, max_bpos UNINIT; | 20672 | ptrdiff_t min_bpos UNINIT, max_bpos UNINIT; |
| 20673 | bool pending_handle_line_prefix = false; | 20673 | bool pending_handle_line_prefix = false; |
| 20674 | bool hscroll_this_line = (cursor_vpos >= 0 && it->vpos == cursor_vpos | 20674 | int header_line = WINDOW_WANTS_HEADER_LINE_P (it->w); |
| 20675 | bool hscroll_this_line = (cursor_vpos >= 0 | ||
| 20676 | && it->vpos == cursor_vpos - header_line | ||
| 20675 | && hscrolling_current_line_p (it->w)); | 20677 | && hscrolling_current_line_p (it->w)); |
| 20676 | int first_visible_x = it->first_visible_x; | 20678 | int first_visible_x = it->first_visible_x; |
| 20677 | int last_visible_x = it->last_visible_x; | 20679 | int last_visible_x = it->last_visible_x; |