From 4699dfd90afcdc7c5b93a60b8bf1f275248dc3f7 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Mon, 22 Oct 2001 14:55:01 +0000 Subject: [PATCH] (display_line): Fix computation of continuation lines width for TABs. --- src/ChangeLog | 5 +++++ src/xdisp.c | 12 +++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 7ec59e66dfa..b6633fc6a9d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2001-10-22 Gerd Moellmann + + * xdisp.c (display_line): Fix computation of continuation lines + width for TABs. + 2001-10-20 Gerd Moellmann * Version 21.1 released. diff --git a/src/xdisp.c b/src/xdisp.c index 31da1badd49..6705a917b48 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -12953,18 +12953,20 @@ display_line (it) { /* Display element draws past the right edge of the window. Restore positions to values - before the element. The next line starts - with current_x before the glyph that could - not be displayed, so that TAB works right. */ + before the element. */ row->used[TEXT_AREA] = n_glyphs_before + i; /* Display continuation glyphs. */ if (!FRAME_WINDOW_P (it->f)) produce_special_glyphs (it, IT_CONTINUATION); row->continued_p = 1; + + /* A TAB takes us to the right edge of the window. */ + if (it->c == '\t') + it->continuation_lines_width += it->last_visible_x; + else + it->continuation_lines_width += x; - it->current_x = x; - it->continuation_lines_width += x; if (nglyphs > 1 && i > 0) { row->ends_in_middle_of_char_p = 1; -- 2.39.2