Skip to content

Commit

Permalink
Pass title argument to RenameTerminalAction
Browse files Browse the repository at this point in the history
  • Loading branch information
vintprox authored Oct 18, 2019
1 parent f0faef0 commit a6fb6f2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/vs/workbench/contrib/terminal/browser/terminalActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1050,11 +1050,15 @@ export class RenameTerminalAction extends Action {
super(id, label);
}

public run(entry?: TerminalEntry): Promise<any> {
public run(entry?: TerminalEntry, args?: { title: string }): Promise<any> {
const terminalInstance = entry ? entry.instance : this.terminalService.getActiveInstance();
if (!terminalInstance) {
return Promise.resolve(undefined);
}
if (title) {
terminalInstance.setTitle(title, TitleEventSource.Api);
return Promise.resolve(undefined);
}
return this.quickInputService.input({
value: terminalInstance.title,
prompt: nls.localize('workbench.action.terminal.rename.prompt', "Enter terminal name"),
Expand Down

0 comments on commit a6fb6f2

Please sign in to comment.