diff options
author | Jason Rumney <jasonr@gnu.org> | 2000-12-05 22:42:49 +0000 |
---|---|---|
committer | Jason Rumney <jasonr@gnu.org> | 2000-12-05 22:42:49 +0000 |
commit | 2df852941160fbe9a7ac103668b673b75c7bec42 (patch) | |
tree | 3f1da81eb0c65ac6401b1173d8a8d45bdd0f40ee | |
parent | ff3c70560404ebe804c3e0a0a6721acdbca8202f (diff) | |
download | emacs-2df852941160fbe9a7ac103668b673b75c7bec42.tar.gz emacs-2df852941160fbe9a7ac103668b673b75c7bec42.tar.bz2 emacs-2df852941160fbe9a7ac103668b673b75c7bec42.zip |
(expose_area): Complete last change.
-rw-r--r-- | src/w32term.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/w32term.c b/src/w32term.c index 1dbe506371a..6116f9ac8d8 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -5501,11 +5501,10 @@ expose_area (w, row, r, area) RECT *r; enum glyph_row_area area; { - int x; struct glyph *first = row->glyphs[area]; struct glyph *end = row->glyphs[area] + row->used[area]; struct glyph *last; - int first_x; + int first_x, start_x, x; /* Set x to the window-relative start position for drawing glyphs of AREA. The first glyph of the text area can be partially visible. @@ -5526,6 +5525,18 @@ expose_area (w, row, r, area) NULL, NULL, 0); else { + /* Set START_X to the window-relative start position for drawing glyphs of + AREA. The first glyph of the text area can be partially visible. + The first glyphs of other areas cannot. */ + if (area == LEFT_MARGIN_AREA) + start_x = 0; + else if (area == TEXT_AREA) + start_x = row->x + window_box_width (w, LEFT_MARGIN_AREA); + else + start_x = (window_box_width (w, LEFT_MARGIN_AREA) + + window_box_width (w, TEXT_AREA)); + x = start_x; + /* Find the first glyph that must be redrawn. */ while (first < end && x + first->pixel_width < r->left) @@ -5543,7 +5554,7 @@ expose_area (w, row, r, area) x += last->pixel_width; ++last; } - + /* Repaint. */ if (last > first) x_draw_glyphs (w, first_x - start_x, row, area, |