aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2018-11-04 16:01:09 +0200
committerEli Zaretskii2018-11-04 16:01:09 +0200
commit19d2ba00596b8ee31cff046b2387580b016fa4c5 (patch)
tree389696fd3535294c1677b799120ffc7659721f49 /src
parentd10036d73759234d67cb587e1876fbfbf7483e83 (diff)
downloademacs-19d2ba00596b8ee31cff046b2387580b016fa4c5.tar.gz
emacs-19d2ba00596b8ee31cff046b2387580b016fa4c5.zip
A further fix for locally remapped fringe face
* src/xdisp.c (expose_window): Temporarily switch to the window's buffer, in case the fringe face was remapped locally in that buffer. (Bug#33244)
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 7b0ca477220..fa7691cdd0f 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -32252,6 +32252,18 @@ expose_window (struct window *w, XRectangle *fr)
32252 y0 or y1 is negative (can happen for tall images). */ 32252 y0 or y1 is negative (can happen for tall images). */
32253 int r_bottom = r.y + r.height; 32253 int r_bottom = r.y + r.height;
32254 32254
32255 /* We must temporarily switch to the window's buffer, in case
32256 the fringe face has been remapped in that buffer's
32257 face-remapping-alist, so that draw_row_fringe_bitmaps,
32258 called from expose_line, will use the right face. */
32259 bool buffer_changed = false;
32260 struct buffer *oldbuf = current_buffer;
32261 if (!w->pseudo_window_p)
32262 {
32263 set_buffer_internal_1 (XBUFFER (w->contents));
32264 buffer_changed = true;
32265 }
32266
32255 /* Update lines intersecting rectangle R. */ 32267 /* Update lines intersecting rectangle R. */
32256 first_overlapping_row = last_overlapping_row = NULL; 32268 first_overlapping_row = last_overlapping_row = NULL;
32257 for (row = w->current_matrix->rows; 32269 for (row = w->current_matrix->rows;
@@ -32297,6 +32309,9 @@ expose_window (struct window *w, XRectangle *fr)
32297 break; 32309 break;
32298 } 32310 }
32299 32311
32312 if (buffer_changed)
32313 set_buffer_internal_1 (oldbuf);
32314
32300 /* Display the mode line if there is one. */ 32315 /* Display the mode line if there is one. */
32301 if (window_wants_mode_line (w) 32316 if (window_wants_mode_line (w)
32302 && (row = MATRIX_MODE_LINE_ROW (w->current_matrix), 32317 && (row = MATRIX_MODE_LINE_ROW (w->current_matrix),