Explicitly enable selection when altClickForMouseEvents is on at attach

Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
This commit is contained in:
Cursor Agent
2026-05-27 21:20:17 +00:00
co-authored by Daniel Imms
parent fbb2a9710f
commit 5ad56446b8
+3 -5
View File
@@ -618,11 +618,9 @@ export class CoreBrowserTerminal extends CoreTerminal implements ITerminal {
this._register(addDisposableListener(this.element, 'mousedown', (e: MouseEvent) => this._selectionService!.handleMouseDown(e)));
// apply mouse event classes set by escape codes before terminal was attached
if (this.mouseStateService.areMouseEventsActive) {
if (!this.options.altClickForMouseEvents) {
this._selectionService.disable();
this.element.classList.add('enable-mouse-events');
}
if (this.mouseStateService.areMouseEventsActive && !this.options.altClickForMouseEvents) {
this._selectionService.disable();
this.element.classList.add('enable-mouse-events');
} else {
this._selectionService.enable();
}