]> git.eshelyaron.com Git - emacs.git/commitdiff
(x_produce_glyphs): If the distance from the current
authorGerd Moellmann <gerd@gnu.org>
Thu, 14 Sep 2000 20:20:51 +0000 (20:20 +0000)
committerGerd Moellmann <gerd@gnu.org>
Thu, 14 Sep 2000 20:20:51 +0000 (20:20 +0000)
position to the next tab stop is less than a canonical character
width, use the tab stop after that.

src/ChangeLog
src/xterm.c

index 1cc7e860d1288e66f294e090d61b1c7925235cc4..76ffcd9ffa409c1626246c2ccfe9a64ff9ff7b3c 100644 (file)
@@ -1,3 +1,9 @@
+2000-09-14  Gerd Moellmann  <gerd@gnu.org>
+
+       * xterm.c (x_produce_glyphs): If the distance from the current
+       position to the next tab stop is less than a canonical character
+       width, use the tab stop after that.
+
 2000-09-14  Dave Love  <fx@gnu.org>
 
        * buffer.c (alloc_buffer_text): Fix xmalloc call.
index f72b20cda5007a2e962755f70e9d59740de383a8..25e9d223ffbb0ef3207b650b25be5477dfe9fbc9 100644 (file)
@@ -1947,6 +1947,12 @@ x_produce_glyphs (it)
          int tab_width = it->tab_width * CANON_X_UNIT (it->f);
          int x = it->current_x + it->continuation_lines_width;
          int next_tab_x = ((1 + x + tab_width - 1) / tab_width) * tab_width;
+
+         /* If the distance from the current position to the next tab
+            stop is less than a canonical character width, use the
+            tab stop after that.  */
+         if (next_tab_x - x < CANON_X_UNIT (it->f))
+           next_tab_x += tab_width;
       
          it->pixel_width = next_tab_x - x;
          it->nglyphs = 1;