From 2a32b5ea15cb909f640d0aea331164bffd39658d Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Thu, 14 Sep 2000 20:20:51 +0000 Subject: [PATCH] (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. --- src/ChangeLog | 6 ++++++ src/xterm.c | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 1cc7e860d12..76ffcd9ffa4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2000-09-14 Gerd Moellmann + + * 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 * buffer.c (alloc_buffer_text): Fix xmalloc call. diff --git a/src/xterm.c b/src/xterm.c index f72b20cda50..25e9d223ffb 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -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; -- 2.39.2