Don't allow double click selection on empty row going out of viewport

This commit is contained in:
Daniel Imms
2017-06-06 15:05:22 -07:00
parent 5bc1112151
commit f61d852f3c
+1 -1
View File
@@ -459,7 +459,7 @@ export class SelectionManager extends EventEmitter {
// Record the resulting selection
this._model.selectionStart = [startIndex + charOffset - leftWideCharCount, coords[1]];
this._model.selectionStartLength = endIndex - startIndex + leftWideCharCount + rightWideCharCount + 1/*include endIndex char*/;
this._model.selectionStartLength = Math.min(endIndex - startIndex + leftWideCharCount + rightWideCharCount + 1/*include endIndex char*/, this._terminal.cols);
}
private _selectLineAt(line: number): void {