summaryrefslogtreecommitdiff
path: root/src/xdisp.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2018-11-04 16:01:09 +0200
committerEli Zaretskii <eliz@gnu.org>2018-11-04 16:01:09 +0200
commit19d2ba00596b8ee31cff046b2387580b016fa4c5 (patch)
tree389696fd3535294c1677b799120ffc7659721f49 /src/xdisp.c
parentd10036d73759234d67cb587e1876fbfbf7483e83 (diff)
downloademacs-19d2ba00596b8ee31cff046b2387580b016fa4c5.tar.gz
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/xdisp.c')
-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)
y0 or y1 is negative (can happen for tall images). */
int r_bottom = r.y + r.height;
+ /* We must temporarily switch to the window's buffer, in case
+ the fringe face has been remapped in that buffer's
+ face-remapping-alist, so that draw_row_fringe_bitmaps,
+ called from expose_line, will use the right face. */
+ bool buffer_changed = false;
+ struct buffer *oldbuf = current_buffer;
+ if (!w->pseudo_window_p)
+ {
+ set_buffer_internal_1 (XBUFFER (w->contents));
+ buffer_changed = true;
+ }
+
/* Update lines intersecting rectangle R. */
first_overlapping_row = last_overlapping_row = NULL;
for (row = w->current_matrix->rows;
@@ -32297,6 +32309,9 @@ expose_window (struct window *w, XRectangle *fr)
break;
}
+ if (buffer_changed)
+ set_buffer_internal_1 (oldbuf);
+
/* Display the mode line if there is one. */
if (window_wants_mode_line (w)
&& (row = MATRIX_MODE_LINE_ROW (w->current_matrix),