Clear selection on vertical resize

Fixes #5300
This commit is contained in:
Daniel Imms
2025-10-19 01:15:30 -07:00
parent 1bf90d9f47
commit 9a7517d3eb
4 changed files with 23 additions and 8 deletions
+8
View File
@@ -152,6 +152,14 @@ export class SelectionService extends Disposable implements ISelectionService {
this._register(toDisposable(() => {
this._removeMouseDownListeners();
}));
// Clear selection when resizing vertically. This experience could be improved, this is the
// simple option to fix the buggy behavior. https://github.com/xtermjs/xterm.js/issues/5300
this._register(this._bufferService.onResize(e => {
if (e.rowsChanged) {
this.clearSelection();
}
}));
}
public reset(): void {