From 81a3c80bc49ddce022562ff167a7ee8312a55a40 Mon Sep 17 00:00:00 2001 From: Jason Lin Date: Sat, 22 Oct 2022 12:10:51 +1100 Subject: [PATCH] polish --- src/common/InputHandler.ts | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/common/InputHandler.ts b/src/common/InputHandler.ts index ac3c676d..8b6a480e 100644 --- a/src/common/InputHandler.ts +++ b/src/common/InputHandler.ts @@ -2359,17 +2359,12 @@ export class InputHandler extends Disposable implements IInputHandler { private _processSGR0(attr: IAttributeData): void { attr.fg = DEFAULT_ATTR_DATA.fg; attr.bg = DEFAULT_ATTR_DATA.bg; - - // Reset `extended` except for the `urlId`. - if (!attr.extended.isEmpty()) { - const urlId = attr.extended.urlId; - attr.extended = DEFAULT_ATTR_DATA.extended.clone(); - - if (urlId) { - attr.extended.urlId = urlId; - attr.updateExtended(); - } - } + attr.extended = attr.extended.clone(); + // Reset underline style and color. Note that we don't want to reset other + // fields such as the url id. + attr.extended.underlineStyle = UnderlineStyle.NONE; + attr.extended.underlineColor &= ~(Attributes.CM_MASK | Attributes.RGB_MASK); + attr.updateExtended(); } /**