diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/xterm.c | 55 |
1 files changed, 32 insertions, 23 deletions
diff --git a/src/xterm.c b/src/xterm.c index 02acfc4b614..57f7e1b8005 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -5173,31 +5173,40 @@ expose_area (w, row, r, area) | |||
| 5173 | x = (window_box_width (w, LEFT_MARGIN_AREA) | 5173 | x = (window_box_width (w, LEFT_MARGIN_AREA) |
| 5174 | + window_box_width (w, TEXT_AREA)); | 5174 | + window_box_width (w, TEXT_AREA)); |
| 5175 | 5175 | ||
| 5176 | /* Find the first glyph that must be redrawn. */ | 5176 | if (area == TEXT_AREA && row->fill_line_p) |
| 5177 | while (first < end | 5177 | /* If row extends face to end of line write the whole line. */ |
| 5178 | && x + first->pixel_width < r->x) | 5178 | x_draw_glyphs (w, x, row, area, |
| 5179 | { | 5179 | 0, row->used[area], |
| 5180 | x += first->pixel_width; | ||
| 5181 | ++first; | ||
| 5182 | } | ||
| 5183 | |||
| 5184 | /* Find the last one. */ | ||
| 5185 | last = first; | ||
| 5186 | first_x = x; | ||
| 5187 | while (last < end | ||
| 5188 | && x < r->x + r->width) | ||
| 5189 | { | ||
| 5190 | x += last->pixel_width; | ||
| 5191 | ++last; | ||
| 5192 | } | ||
| 5193 | |||
| 5194 | /* Repaint. */ | ||
| 5195 | if (last > first) | ||
| 5196 | x_draw_glyphs (w, first_x, row, area, | ||
| 5197 | first - row->glyphs[area], | ||
| 5198 | last - row->glyphs[area], | ||
| 5199 | row->inverse_p ? DRAW_INVERSE_VIDEO : DRAW_NORMAL_TEXT, | 5180 | row->inverse_p ? DRAW_INVERSE_VIDEO : DRAW_NORMAL_TEXT, |
| 5200 | NULL, NULL, 0); | 5181 | NULL, NULL, 0); |
| 5182 | else | ||
| 5183 | { | ||
| 5184 | /* Find the first glyph that must be redrawn. */ | ||
| 5185 | while (first < end | ||
| 5186 | && x + first->pixel_width < r->x) | ||
| 5187 | { | ||
| 5188 | x += first->pixel_width; | ||
| 5189 | ++first; | ||
| 5190 | } | ||
| 5191 | |||
| 5192 | /* Find the last one. */ | ||
| 5193 | last = first; | ||
| 5194 | first_x = x; | ||
| 5195 | while (last < end | ||
| 5196 | && x < r->x + r->width) | ||
| 5197 | { | ||
| 5198 | x += last->pixel_width; | ||
| 5199 | ++last; | ||
| 5200 | } | ||
| 5201 | |||
| 5202 | /* Repaint. */ | ||
| 5203 | if (last > first) | ||
| 5204 | x_draw_glyphs (w, first_x, row, area, | ||
| 5205 | first - row->glyphs[area], | ||
| 5206 | last - row->glyphs[area], | ||
| 5207 | row->inverse_p ? DRAW_INVERSE_VIDEO : DRAW_NORMAL_TEXT, | ||
| 5208 | NULL, NULL, 0); | ||
| 5209 | } | ||
| 5201 | } | 5210 | } |
| 5202 | 5211 | ||
| 5203 | 5212 | ||