diff options
Diffstat (limited to 'src/xterm.c')
-rw-r--r-- | src/xterm.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/xterm.c b/src/xterm.c index f72b20cda5..25e9d223ff 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; |