fix: clear keyword should clear highlight (#1088) (#1089)

(cherry picked from commit a88bed9eb49632dc4ccb132d9f53b162197c557c)

Signed-off-by: Andy Lee <andy.lee@suse.com>
Co-authored-by: Andy Lee <andy.lee@suse.com>
This commit is contained in:
mergify[bot] 2026-08-05 00:26:04 +08:00 committed by GitHub
parent 6d4cd09568
commit 0bccb9a71f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -213,9 +213,15 @@ export default {
}, },
clearSearchHighlights() { clearSearchHighlights() {
this.terminal?.clearSelection();
this.searchAddon?.clearActiveDecoration(); this.searchAddon?.clearActiveDecoration();
this.searchAddon?.clearDecorations(); 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() { findNext() {