diff options
author | Eli Zaretskii <eliz@gnu.org> | 2017-06-24 19:03:39 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2017-06-24 19:03:39 +0300 |
commit | 13cc19a0a3685ceade4a5a560475ee47165f3bbc (patch) | |
tree | 66641dcca207c14e093d7b3933f0b7090b32953e /src/term.c | |
parent | 6e18841b17c9b7ca9f38b923db4195cade05da2e (diff) | |
download | emacs-13cc19a0a3685ceade4a5a560475ee47165f3bbc.tar.gz |
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.c | 2 |
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) /* Adjust for line numbers. Kludge alert: the "2" below is because we add 2 blanks to the actual line number. */ if (!NILP (Vdisplay_line_numbers)) - absolute_x -= it->lnum_width + 2; + absolute_x -= it->lnum_width + 2 - it->w->hscroll; int next_tab_x = (((1 + absolute_x + it->tab_width - 1) / it->tab_width) |