Merge pull request #4816 from tisilent/fix-domrenderer-selection-overflow

Add column restriction
This commit is contained in:
Daniel Imms
2023-09-20 06:06:43 -07:00
committed by GitHub
+3 -1
View File
@@ -644,7 +644,9 @@ export class SelectionService extends Disposable implements ISelectionService {
if (this._model.selectionEnd[1] < buffer.lines.length) {
const line = buffer.lines.get(this._model.selectionEnd[1]);
if (line && line.hasWidth(this._model.selectionEnd[0]) === 0) {
this._model.selectionEnd[0]++;
if (this._model.selectionEnd[0] < this._bufferService.cols) {
this._model.selectionEnd[0]++;
}
}
}