summaryrefslogtreecommitdiff
path: root/app/xterm/linedata.c
diff options
context:
space:
mode:
Diffstat (limited to 'app/xterm/linedata.c')
-rw-r--r--app/xterm/linedata.c38
1 files changed, 35 insertions, 3 deletions
diff --git a/app/xterm/linedata.c b/app/xterm/linedata.c
index 9b439560f..e9b775214 100644
--- a/app/xterm/linedata.c
+++ b/app/xterm/linedata.c
@@ -1,7 +1,7 @@
-/* $XTermId: linedata.c,v 1.102 2022/09/18 21:17:43 tom Exp $ */
+/* $XTermId: linedata.c,v 1.106 2023/12/31 20:12:06 tom Exp $ */
/*
- * Copyright 2009-2021,2022 by Thomas E. Dickey
+ * Copyright 2009-2022,2023 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -92,6 +92,10 @@ copyLineData(LineData *dst, CLineData *src)
#if OPT_WIDE_CHARS
+ sizeof(dst->combData[0][0]) * dst->combSize
#endif
+#if OPT_DEC_RECTOPS
+ + sizeof(dst->charSeen[0])
+ + sizeof(dst->charSets[0])
+#endif
);
memcpy(dst->attribs, src->attribs, size * dst->lineSize);
@@ -110,6 +114,10 @@ copyLineData(LineData *dst, CLineData *src)
dst->color[col] = src->color[col];
#endif
dst->charData[col] = src->charData[col];
+#if OPT_DEC_RECTOPS
+ dst->charSeen[col] = src->charSeen[col];
+ dst->charSets[col] = src->charSets[col];
+#endif
#if OPT_WIDE_CHARS
for (comb = 0; comb < dst->combSize; ++comb) {
dst->combData[comb][col] = src->combData[comb][col];
@@ -122,6 +130,10 @@ copyLineData(LineData *dst, CLineData *src)
dst->color[col] = initCColor;
#endif
dst->charData[col] = 0;
+#if OPT_DEC_RECTOPS
+ dst->charSeen[col] = 0;
+ dst->charSets[col] = 0;
+#endif
#if OPT_WIDE_CHARS
for (comb = 0; comb < dst->combSize; ++comb) {
dst->combData[comb][col] = 0;
@@ -175,6 +187,10 @@ initLineData(XtermWidget xw)
#if OPT_WIDE_CHARS
TRACE((" offset(combSize) %lu\n", (unsigned long) offsetof(LineData, combSize)));
#endif
+#if OPT_DEC_RECTOPS
+ TRACE((" offset(*charSeen) %lu\n", (unsigned long) offsetof(LineData, charSeen)));
+ TRACE((" offset(*charSets) %lu\n", (unsigned long) offsetof(LineData, charSets)));
+#endif
TRACE((" offset(*attribs) %lu\n", (unsigned long) offsetof(LineData, attribs)));
#if OPT_ISO_COLORS
TRACE((" offset(*color) %lu\n", (unsigned long) offsetof(LineData, color)));
@@ -190,6 +206,10 @@ initLineData(XtermWidget xw)
#if OPT_WIDE_CHARS
TRACE((" offset(combSize) %lu\n", (unsigned long) offsetof(CellData, combSize)));
#endif
+#if OPT_DEC_RECTOPS
+ TRACE((" offset(charSeen) %lu\n", (unsigned long) offsetof(CellData, charSeen)));
+ TRACE((" offset(charSets) %lu\n", (unsigned long) offsetof(CellData, charSets)));
+#endif
#if OPT_ISO_COLORS
TRACE((" offset(color) %lu\n", (unsigned long) offsetof(CellData, color)));
#endif
@@ -234,7 +254,10 @@ saveCellData(TScreen *screen,
if_OPT_ISO_COLORS(screen, {
item->color = ld->color[column];
});
- item->charData = ld->charData[column];
+ if_OPT_DEC_RECTOPS({
+ item->charSeen = ld->charSeen[column];
+ item->charData = ld->charData[column];
+ });
if_OPT_WIDE_CHARS(screen, {
size_t off;
Bool blank = (((item->charData == HIDDEN_CHAR)
@@ -245,9 +268,13 @@ saveCellData(TScreen *screen,
&& (limits == NULL
|| (column + 1) >= limits->right)));
if (blank) {
+ if_OPT_DEC_RECTOPS(item->charSeen = ' ');
item->charData = (CharData) ' ';
}
item->combSize = blank ? 0 : ld->combSize;
+ if_OPT_DEC_RECTOPS(item->charSets = (blank
+ ? 0
+ : ld->charSets[column]));
for_each_combData(off, item) {
item->combData[off] = ld->combData[off][column];
}
@@ -273,10 +300,15 @@ restoreCellData(TScreen *screen,
if_OPT_ISO_COLORS(screen, {
ld->color[column] = item->color;
});
+ if_OPT_DEC_RECTOPS({
+ ld->charSeen[column] = item->charSeen;
+ ld->charSets[column] = item->charSets;
+ });
ld->charData[column] = item->charData;
if_OPT_WIDE_CHARS(screen, {
size_t off;
ld->combSize = item->combSize;
+ if_OPT_DEC_RECTOPS(ld->charSets[column] = item->charSets);
for_each_combData(off, ld) {
ld->combData[off][column] = item->combData[off];
}