Make alt+click behavior configurable
This commit is contained in:
@@ -676,7 +676,7 @@ export class SelectionService extends Disposable implements ISelectionService {
|
|||||||
this._bufferService.rows,
|
this._bufferService.rows,
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
if (coordinates && coordinates[0] !== undefined && coordinates[1] !== undefined) {
|
if (this._optionsService.getOption('altClickMovesCursor') && coordinates && coordinates[0] !== undefined && coordinates[1] !== undefined) {
|
||||||
const sequence = moveToCellSequence(coordinates[0] - 1, coordinates[1] - 1, this._bufferService, this._coreService.decPrivateModes.applicationCursorKeys);
|
const sequence = moveToCellSequence(coordinates[0] - 1, coordinates[1] - 1, this._bufferService, this._coreService.decPrivateModes.applicationCursorKeys);
|
||||||
this._coreService.triggerDataEvent(sequence, true);
|
this._coreService.triggerDataEvent(sequence, true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ export const DEFAULT_OPTIONS: ITerminalOptions = Object.freeze({
|
|||||||
windowOptions: {},
|
windowOptions: {},
|
||||||
windowsMode: false,
|
windowsMode: false,
|
||||||
wordSeparator: ' ()[]{}\',"`',
|
wordSeparator: ' ()[]{}\',"`',
|
||||||
|
altClickMovesCursor: true,
|
||||||
convertEol: false,
|
convertEol: false,
|
||||||
termName: 'xterm',
|
termName: 'xterm',
|
||||||
cancelEvents: false
|
cancelEvents: false
|
||||||
|
|||||||
@@ -220,6 +220,7 @@ export interface IPartialTerminalOptions {
|
|||||||
export interface ITerminalOptions {
|
export interface ITerminalOptions {
|
||||||
allowProposedApi: boolean;
|
allowProposedApi: boolean;
|
||||||
allowTransparency: boolean;
|
allowTransparency: boolean;
|
||||||
|
altClickMovesCursor: boolean;
|
||||||
bellSound: string;
|
bellSound: string;
|
||||||
bellStyle: 'none' | 'sound' /* | 'visual' | 'both' */;
|
bellStyle: 'none' | 'sound' /* | 'visual' | 'both' */;
|
||||||
cols: number;
|
cols: number;
|
||||||
|
|||||||
Vendored
+5
@@ -44,6 +44,11 @@ declare module 'xterm' {
|
|||||||
*/
|
*/
|
||||||
allowTransparency?: boolean;
|
allowTransparency?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If enabled, alt + click will move the prompt cursor to position underneath the mouse.
|
||||||
|
*/
|
||||||
|
altClickMovesCursor?: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A data uri of the sound to use for the bell when `bellStyle = 'sound'`.
|
* A data uri of the sound to use for the bell when `bellStyle = 'sound'`.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user