aboutsummaryrefslogtreecommitdiffstats
path: root/src/term.c
diff options
context:
space:
mode:
authorEli Zaretskii2017-06-24 19:03:39 +0300
committerEli Zaretskii2017-06-24 19:03:39 +0300
commit13cc19a0a3685ceade4a5a560475ee47165f3bbc (patch)
tree66641dcca207c14e093d7b3933f0b7090b32953e /src/term.c
parent6e18841b17c9b7ca9f38b923db4195cade05da2e (diff)
downloademacs-13cc19a0a3685ceade4a5a560475ee47165f3bbc.tar.gz
emacs-13cc19a0a3685ceade4a5a560475ee47165f3bbc.zip
Partial fix of hscroll of truncated lines with line numbers
* src/xdisp.c (x_produce_glyphs, hscroll_window_tree): Adjust hscroll calculations to line-number display. * src/term.c (produce_glyphs): Adjust tab stop to window's hscroll. These two changes fix horizontal scrolling when line numbers are displayed. But there's still a bug: the horizontal shift of lines that begin with a TAB is different from the rest. * src/xdisp.c (move_it_in_display_line_to): Call should_produce_line_number to determine whether a line number should be produced for this screen line.
Diffstat (limited to 'src/term.c')
-rw-r--r--src/term.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/term.c b/src/term.c
index b0e7e052e51..46d8bff73cc 100644
--- a/src/term.c
+++ b/src/term.c
@@ -1587,7 +1587,7 @@ produce_glyphs (struct it *it)
1587 /* Adjust for line numbers. Kludge alert: the "2" below is 1587 /* Adjust for line numbers. Kludge alert: the "2" below is
1588 because we add 2 blanks to the actual line number. */ 1588 because we add 2 blanks to the actual line number. */
1589 if (!NILP (Vdisplay_line_numbers)) 1589 if (!NILP (Vdisplay_line_numbers))
1590 absolute_x -= it->lnum_width + 2; 1590 absolute_x -= it->lnum_width + 2 - it->w->hscroll;
1591 int next_tab_x 1591 int next_tab_x
1592 = (((1 + absolute_x + it->tab_width - 1) 1592 = (((1 + absolute_x + it->tab_width - 1)
1593 / it->tab_width) 1593 / it->tab_width)