Make alt+click behavior configurable
This commit is contained in:
@@ -676,7 +676,7 @@ export class SelectionService extends Disposable implements ISelectionService {
|
||||
this._bufferService.rows,
|
||||
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);
|
||||
this._coreService.triggerDataEvent(sequence, true);
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ export const DEFAULT_OPTIONS: ITerminalOptions = Object.freeze({
|
||||
windowOptions: {},
|
||||
windowsMode: false,
|
||||
wordSeparator: ' ()[]{}\',"`',
|
||||
|
||||
altClickMovesCursor: true,
|
||||
convertEol: false,
|
||||
termName: 'xterm',
|
||||
cancelEvents: false
|
||||
|
||||
@@ -220,6 +220,7 @@ export interface IPartialTerminalOptions {
|
||||
export interface ITerminalOptions {
|
||||
allowProposedApi: boolean;
|
||||
allowTransparency: boolean;
|
||||
altClickMovesCursor: boolean;
|
||||
bellSound: string;
|
||||
bellStyle: 'none' | 'sound' /* | 'visual' | 'both' */;
|
||||
cols: number;
|
||||
|
||||
Vendored
+5
@@ -44,6 +44,11 @@ declare module 'xterm' {
|
||||
*/
|
||||
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'`.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user