Mercurial > emacs
comparison src/xterm.c @ 31614:410df09028db
(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.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Thu, 14 Sep 2000 20:20:34 +0000 |
parents | 8bfcf0b562f2 |
children | 97c48afc4c5a |
comparison
equal
deleted
inserted
replaced
31613:b8cbad226f35 | 31614:410df09028db |
---|---|
1945 else if (it->char_to_display == '\t') | 1945 else if (it->char_to_display == '\t') |
1946 { | 1946 { |
1947 int tab_width = it->tab_width * CANON_X_UNIT (it->f); | 1947 int tab_width = it->tab_width * CANON_X_UNIT (it->f); |
1948 int x = it->current_x + it->continuation_lines_width; | 1948 int x = it->current_x + it->continuation_lines_width; |
1949 int next_tab_x = ((1 + x + tab_width - 1) / tab_width) * tab_width; | 1949 int next_tab_x = ((1 + x + tab_width - 1) / tab_width) * tab_width; |
1950 | |
1951 /* If the distance from the current position to the next tab | |
1952 stop is less than a canonical character width, use the | |
1953 tab stop after that. */ | |
1954 if (next_tab_x - x < CANON_X_UNIT (it->f)) | |
1955 next_tab_x += tab_width; | |
1950 | 1956 |
1951 it->pixel_width = next_tab_x - x; | 1957 it->pixel_width = next_tab_x - x; |
1952 it->nglyphs = 1; | 1958 it->nglyphs = 1; |
1953 it->ascent = it->phys_ascent = font->ascent + boff; | 1959 it->ascent = it->phys_ascent = font->ascent + boff; |
1954 it->descent = it->phys_descent = font->descent - boff; | 1960 it->descent = it->phys_descent = font->descent - boff; |