dsh-neotui 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/screen.js +8 -2
- package/src/views.js +1 -1
package/package.json
CHANGED
package/src/screen.js
CHANGED
|
@@ -53,7 +53,13 @@ export class Screen {
|
|
|
53
53
|
const cell = this.cells[y][x];
|
|
54
54
|
const wide = wcwidth(ch.codePointAt(0)) === 2;
|
|
55
55
|
if (wide && x + 1 >= this.w) ch = " "; // clip wide char at the right edge (terminal wrap corruption)
|
|
56
|
-
cell.ch = ch; cell.fg = fg;
|
|
56
|
+
cell.ch = ch; cell.fg = fg;
|
|
57
|
+
// bg -1 = transparent: KEEP the cell's existing background (the layer
|
|
58
|
+
// underneath) instead of resetting it to the terminal default — this is
|
|
59
|
+
// what used to leave "unexplained dark blocks" wherever widgets drew
|
|
60
|
+
// text/fills without an explicit background.
|
|
61
|
+
if (bg !== -1) cell.bg = bg;
|
|
62
|
+
cell.attrs = attrs; cell.link = link;
|
|
57
63
|
cell.wide = wide && x + 1 < this.w;
|
|
58
64
|
if (cell.wide) {
|
|
59
65
|
const cont = this.cells[y][x + 1];
|
|
@@ -62,7 +68,7 @@ export class Screen {
|
|
|
62
68
|
const next = this.cells[y][x + 2];
|
|
63
69
|
next.ch = " "; next.wide = false; next.link = "";
|
|
64
70
|
}
|
|
65
|
-
cont.ch = ""; cont.fg = fg; cont.bg = bg; cont.attrs = attrs; cont.link = link; cont.wide = false;
|
|
71
|
+
cont.ch = ""; cont.fg = fg; cont.bg = cell.bg; cont.attrs = attrs; cont.link = link; cont.wide = false;
|
|
66
72
|
}
|
|
67
73
|
}
|
|
68
74
|
|
package/src/views.js
CHANGED