]> git.eshelyaron.com Git - emacs.git/commitdiff
(display_line): Fix computation of continuation lines
authorGerd Moellmann <gerd@gnu.org>
Mon, 22 Oct 2001 14:55:01 +0000 (14:55 +0000)
committerGerd Moellmann <gerd@gnu.org>
Mon, 22 Oct 2001 14:55:01 +0000 (14:55 +0000)
width for TABs.

src/ChangeLog
src/xdisp.c

index 7ec59e66dfabd9a194cff2f922b0480a4b29978a..b6633fc6a9d305e5c94968d17739aa94274969c5 100644 (file)
@@ -1,3 +1,8 @@
+2001-10-22  Gerd Moellmann  <gerd@gnu.org>
+
+       * xdisp.c (display_line): Fix computation of continuation lines
+       width for TABs.
+
 2001-10-20  Gerd Moellmann  <gerd@gnu.org>
 
        * Version 21.1 released.
index 31da1badd49955a7b65c17ccfd213e03034e3efd..6705a917b484e7dba0bccde96d1c3966babada2b 100644 (file)
@@ -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;