diff options
author | Gerd Moellmann <[email protected]> | 2000-09-14 20:20:51 +0000 |
---|---|---|
committer | Gerd Moellmann <[email protected]> | 2000-09-14 20:20:51 +0000 |
commit | 2a32b5ea15cb909f640d0aea331164bffd39658d (patch) | |
tree | e6165e80327badd5aab7f8e2aba1bf295655e43b /src/xterm.c | |
parent | b4331e964a740262fa9d5d932b23ddca86452952 (diff) |
(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.
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; |