This commit is contained in:
Jason Lin
2022-10-31 11:07:42 +11:00
committed by Jason Lin
parent b735e7f1c4
commit f6fabebf8d
2 changed files with 10 additions and 13 deletions
+6 -6
View File
@@ -2360,14 +2360,14 @@ export class InputHandler extends Disposable implements IInputHandler {
attr.fg = DEFAULT_ATTR_DATA.fg;
attr.bg = DEFAULT_ATTR_DATA.bg;
// Reset `extended` except for the `urlId`.
if (!attr.extended.isEmpty()) {
// Treat extended attrs as immutable, thus always clone from old one.
// This is needed since the buffer only holds references to it.
attr.extended = attr.extended.clone();
attr.extended.ext = 0;
const urlId = attr.extended.urlId;
attr.extended = DEFAULT_ATTR_DATA.extended.clone();
if (attr.extended.urlId) {
attr.bg |= BgFlags.HAS_EXTENDED;
if (urlId) {
attr.extended.urlId = urlId;
attr.updateExtended();
}
}
}