From cd3418517e091f9a7dc06335dabe760a1f17f508 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sat, 2 Jun 2018 17:56:44 -0700 Subject: [PATCH] Select the whole wrapped line when triple clicking Fixes #1456 --- src/SelectionManager.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/SelectionManager.ts b/src/SelectionManager.ts index c150554f..1b056e83 100644 --- a/src/SelectionManager.ts +++ b/src/SelectionManager.ts @@ -803,7 +803,9 @@ export class SelectionManager extends EventEmitter implements ISelectionManager * @param line The line index. */ protected _selectLineAt(line: number): void { - this._model.selectionStart = [0, line]; - this._model.selectionStartLength = this._terminal.cols; + const wrappedRange = this._buffer.getWrappedRangeForLine(line); + this._model.selectionStart = [0, wrappedRange.first]; + this._model.selectionEnd = [this._terminal.cols, wrappedRange.last]; + this._model.selectionStartLength = 0; } }