meganrogge
2021-05-05 08:21:26 -07:00
parent e5c9b0e27f
commit be32590ef0
3 changed files with 52 additions and 2 deletions
+4 -2
View File
@@ -10,12 +10,13 @@ import * as Browser from 'common/Platform';
import { SelectionModel } from 'browser/selection/SelectionModel';
import { CellData } from 'common/buffer/CellData';
import { EventEmitter, IEvent } from 'common/EventEmitter';
import { ICharSizeService, IMouseService, ISelectionService, IRenderService } from 'browser/services/Services';
import { IMouseService, ISelectionService, IRenderService } from 'browser/services/Services';
import { ILinkifier2 } from 'browser/Types';
import { IBufferService, IOptionsService, ICoreService } from 'common/services/Services';
import { getCoordsRelativeToElement } from 'browser/input/Mouse';
import { moveToCellSequence } from 'browser/input/MoveToCell';
import { Disposable } from 'common/Lifecycle';
import { getRangeLength } from 'common/buffer/BufferRange';
/**
* The number of pixels the mouse needs to be above or below the viewport in
@@ -323,7 +324,8 @@ export class SelectionService extends Disposable implements ISelectionService {
const range = this._linkifier.currentLink?.link?.range;
if (range) {
this._model.selectionStart = [range.start.x - 1, range.start.y - 1];
this._model.selectionEnd = [range.end.x, range.end.y - 1];
this._model.selectionStartLength = getRangeLength(range, this._bufferService.cols);
this._model.selectionEnd = undefined;
return true;
}