blob: 81bdbd97263618f88f1e6d8a2f01e7790539485f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
--- st.c
+++ st.c
@@ -1264,9 +1313,24 @@ tsetchar(Rune u, const Glyph *attr, int x, int y)
term.line[y][x-1].mode &= ~ATTR_WIDE;
}
+ if (u == ' ' && term.line[y][x].mode & ATTR_IMAGE &&
+ tgetisclassicplaceholder(&term.line[y][x])) {
+ // This is a workaround: don't overwrite classic placement
+ // placeholders with space symbols (unlike Unicode placeholders
+ // which must be overwritten by anything).
+ term.line[y][x].bg = attr->bg;
+ term.dirty[y] = 1;
+ return;
+ }
+
term.dirty[y] = 1;
term.line[y][x] = *attr;
term.line[y][x].u = u;
+
+ if (u == IMAGE_PLACEHOLDER_CHAR || u == IMAGE_PLACEHOLDER_CHAR_OLD) {
+ term.line[y][x].u = 0;
+ term.line[y][x].mode |= ATTR_IMAGE;
+ }
}
void
|