# HG changeset patch # User Gerd Moellmann # Date 1003762367 0 # Node ID dd40bdb865f18803e272e1b861a2987ef6a978be # Parent 40458f0a0bd0f774a6ea5755604ebb93612d55b6 (display_line): Fix computation of continuation lines width for TABs. diff -r 40458f0a0bd0 -r dd40bdb865f1 src/xdisp.c --- a/src/xdisp.c Mon Oct 22 13:24:08 2001 +0000 +++ b/src/xdisp.c Mon Oct 22 14:52:47 2001 +0000 @@ -12934,18 +12934,20 @@ { /* 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;