Change AltClickHandler to be functional
This commit is contained in:
@@ -8,13 +8,13 @@ import { IBuffer } from 'common/buffer/Types';
|
||||
import { IBufferLine } from 'common/Types';
|
||||
import * as Browser from 'common/Platform';
|
||||
import { SelectionModel } from 'browser/selection/SelectionModel';
|
||||
import { AltClickHandler } from './handlers/AltClickHandler';
|
||||
import { CellData } from 'common/buffer/CellData';
|
||||
import { IDisposable } from 'xterm';
|
||||
import { EventEmitter, IEvent } from 'common/EventEmitter';
|
||||
import { ICharSizeService, IMouseService } from 'browser/services/Services';
|
||||
import { IBufferService, IOptionsService } from 'common/services/Services';
|
||||
import { getCoordsRelativeToElement } from 'browser/input/Mouse';
|
||||
import { moveToCellSequence } from 'handlers/AltClickHandler';
|
||||
|
||||
/**
|
||||
* The number of pixels the mouse needs to be above or below the viewport in
|
||||
@@ -659,9 +659,8 @@ export class SelectionManager implements ISelectionManager {
|
||||
false
|
||||
);
|
||||
if (coordinates && coordinates[0] !== undefined && coordinates[1] !== undefined) {
|
||||
this._terminal.handler(
|
||||
(new AltClickHandler()).move(coordinates[0] - 1, coordinates[1] - 1, this._bufferService, this._terminal.applicationCursor)
|
||||
);
|
||||
const sequence = moveToCellSequence(coordinates[0] - 1, coordinates[1] - 1, this._bufferService, this._terminal.applicationCursor);
|
||||
this._terminal.handler(sequence);
|
||||
}
|
||||
}
|
||||
} else if (this.hasSelection) {
|
||||
|
||||
Reference in New Issue
Block a user