mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-04-01 01:20:31 -04:00
Merge from vscode 2cfc8172e533e50c90e6a3152f6bfb1f82f963f3 (#6516)
* Merge from vscode 2cfc8172e533e50c90e6a3152f6bfb1f82f963f3 * fix tests
This commit is contained in:
@@ -607,12 +607,11 @@ export class TerminalPasteAction extends Action {
|
||||
super(id, label);
|
||||
}
|
||||
|
||||
public run(event?: any): Promise<any> {
|
||||
public async run(event?: any): Promise<any> {
|
||||
const instance = this.terminalService.getActiveOrCreateInstance();
|
||||
if (instance) {
|
||||
instance.paste();
|
||||
await instance.paste();
|
||||
}
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -749,6 +748,7 @@ export class SwitchTerminalActionViewItem extends SelectActionViewItem {
|
||||
this._register(terminalService.onInstancesChanged(this._updateItems, this));
|
||||
this._register(terminalService.onActiveTabChanged(this._updateItems, this));
|
||||
this._register(terminalService.onInstanceTitleChanged(this._updateItems, this));
|
||||
this._register(terminalService.onTabDisposed(this._updateItems, this));
|
||||
this._register(attachSelectBoxStyler(this.selectBox, themeService));
|
||||
}
|
||||
|
||||
@@ -886,6 +886,71 @@ export class ScrollToTopTerminalAction extends Action {
|
||||
}
|
||||
}
|
||||
|
||||
export class NavigationModeExitTerminalAction extends Action {
|
||||
|
||||
public static readonly ID = TERMINAL_COMMAND_ID.NAVIGATION_MODE_EXIT;
|
||||
public static readonly LABEL = nls.localize('workbench.action.terminal.navigationModeExit', "Exit Navigation Mode");
|
||||
|
||||
constructor(
|
||||
id: string, label: string,
|
||||
@ITerminalService private readonly terminalService: ITerminalService
|
||||
) {
|
||||
super(id, label);
|
||||
}
|
||||
|
||||
public run(event?: any): Promise<any> {
|
||||
const terminalInstance = this.terminalService.getActiveInstance();
|
||||
if (terminalInstance && terminalInstance.navigationMode) {
|
||||
terminalInstance.navigationMode.exitNavigationMode();
|
||||
}
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
export class NavigationModeFocusPreviousTerminalAction extends Action {
|
||||
|
||||
public static readonly ID = TERMINAL_COMMAND_ID.NAVIGATION_MODE_FOCUS_PREVIOUS;
|
||||
public static readonly LABEL = nls.localize('workbench.action.terminal.navigationModeFocusPrevious', "Focus Previous Line (Navigation Mode)");
|
||||
|
||||
constructor(
|
||||
id: string, label: string,
|
||||
@ITerminalService private readonly terminalService: ITerminalService
|
||||
) {
|
||||
super(id, label);
|
||||
}
|
||||
|
||||
public run(event?: any): Promise<any> {
|
||||
const terminalInstance = this.terminalService.getActiveInstance();
|
||||
if (terminalInstance && terminalInstance.navigationMode) {
|
||||
terminalInstance.navigationMode.focusPreviousLine();
|
||||
}
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
}
|
||||
|
||||
export class NavigationModeFocusNextTerminalAction extends Action {
|
||||
|
||||
public static readonly ID = TERMINAL_COMMAND_ID.NAVIGATION_MODE_FOCUS_NEXT;
|
||||
public static readonly LABEL = nls.localize('workbench.action.terminal.navigationModeFocusNext', "Focus Next Line (Navigation Mode)");
|
||||
|
||||
constructor(
|
||||
id: string, label: string,
|
||||
@ITerminalService private readonly terminalService: ITerminalService
|
||||
) {
|
||||
super(id, label);
|
||||
}
|
||||
|
||||
public run(event?: any): Promise<any> {
|
||||
const terminalInstance = this.terminalService.getActiveInstance();
|
||||
if (terminalInstance && terminalInstance.navigationMode) {
|
||||
terminalInstance.navigationMode.focusNextLine();
|
||||
}
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
}
|
||||
|
||||
export class ClearTerminalAction extends Action {
|
||||
|
||||
public static readonly ID = TERMINAL_COMMAND_ID.CLEAR;
|
||||
|
||||
Reference in New Issue
Block a user