fix: clear keyword should clear highlight (#1088)

Signed-off-by: Andy Lee <andy.lee@suse.com>
This commit is contained in:
Andy Lee 2026-08-05 00:24:34 +08:00 committed by GitHub
parent f97f14c811
commit a88bed9eb4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -213,9 +213,15 @@ export default {
},
clearSearchHighlights() {
this.terminal?.clearSelection();
this.searchAddon?.clearActiveDecoration();
this.searchAddon?.clearDecorations();
this.terminal?.clearSelection();
// Disposing the search decorations doesn't repaint the webgl/canvas
// layer, so force a refresh to remove the lingering highlight.
if (this.terminal) {
this.terminal.refresh(0, this.terminal.rows - 1);
}
},
findNext() {