Skip to content

Commit f928c7e

Browse files
authored
Merge pull request #2973 from daniel-j-davis/fix_2617
Fix getSelection not working sometimes for single character selections
2 parents afc3910 + 0e6611b commit f928c7e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/browser/services/SelectionService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -667,8 +667,8 @@ export class SelectionService extends Disposable implements ISelectionService {
667667

668668
this._removeMouseDownListeners();
669669

670-
if (this.selectionText.length <= 1 && timeElapsed < ALT_CLICK_MOVE_CURSOR_TIME) {
671-
if (event.altKey && this._bufferService.buffer.ybase === this._bufferService.buffer.ydisp) {
670+
if (this.selectionText.length <= 1 && timeElapsed < ALT_CLICK_MOVE_CURSOR_TIME && event.altKey) {
671+
if (this._bufferService.buffer.ybase === this._bufferService.buffer.ydisp) {
672672
const coordinates = this._mouseService.getCoords(
673673
event,
674674
this._element,

0 commit comments

Comments
 (0)