From: Gerd Moellmann Date: Mon, 22 Oct 2001 14:53:30 +0000 (+0000) Subject: (display_line): Fix computation of continuation lines X-Git-Tag: ttn-vms-21-2-B4~19252 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=653c329be8a9a4d37a15df4795050989168c7b3f;p=emacs.git (display_line): Fix computation of continuation lines width for TABs. --- diff --git a/src/ChangeLog b/src/ChangeLog index 91ceccec080..260ed84445d 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-22 Pavel Jan,Bm(Bk * xdisp.c (build_desired_tool_bar_string): Remove unused variable diff --git a/src/xdisp.c b/src/xdisp.c index 7c96e268db5..522148d1863 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -12934,18 +12934,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;