aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMiles Bader2008-06-06 23:07:50 +0000
committerMiles Bader2008-06-06 23:07:50 +0000
commit408b8ab461dfde69178709940832ba0ce5f86ab6 (patch)
tree299683d8c747a80248f4f16ea9a2da46e1be57dd /src
parente6d2d263da3c83033860f408bc400386b54ff288 (diff)
downloademacs-408b8ab461dfde69178709940832ba0ce5f86ab6.tar.gz
emacs-408b8ab461dfde69178709940832ba0ce5f86ab6.zip
Calculate tab width based on current face, not global default
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1217
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/xdisp.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index d04d1b81c33..6ae6e4fc146 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12008-06-06 Miles Bader <miles@gnu.org>
2
3 * xdisp.c (x_produce_glyphs): Calculate tab width based on current
4 face, not frame default.
5
12008-06-05 Martin Rudalics <rudalics@gmx.at> 62008-06-05 Martin Rudalics <rudalics@gmx.at>
2 7
3 * window.c (pop_up_windows, pop_up_frames) 8 * window.c (pop_up_windows, pop_up_frames)
diff --git a/src/xdisp.c b/src/xdisp.c
index 56db272dcb0..b248cba8e9d 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -20980,14 +20980,14 @@ x_produce_glyphs (it)
20980 } 20980 }
20981 else if (it->char_to_display == '\t') 20981 else if (it->char_to_display == '\t')
20982 { 20982 {
20983 int tab_width = it->tab_width * FRAME_SPACE_WIDTH (it->f); 20983 int tab_width = it->tab_width * font->space_width;
20984 int x = it->current_x + it->continuation_lines_width; 20984 int x = it->current_x + it->continuation_lines_width;
20985 int next_tab_x = ((1 + x + tab_width - 1) / tab_width) * tab_width; 20985 int next_tab_x = ((1 + x + tab_width - 1) / tab_width) * tab_width;
20986 20986
20987 /* If the distance from the current position to the next tab 20987 /* If the distance from the current position to the next tab
20988 stop is less than a space character width, use the 20988 stop is less than a space character width, use the
20989 tab stop after that. */ 20989 tab stop after that. */
20990 if (next_tab_x - x < FRAME_SPACE_WIDTH (it->f)) 20990 if (next_tab_x - x < font->space_width)
20991 next_tab_x += tab_width; 20991 next_tab_x += tab_width;
20992 20992
20993 it->pixel_width = next_tab_x - x; 20993 it->pixel_width = next_tab_x - x;