Skip to content

Commit

Permalink
Add ability to pass argument for 'mini-browser.openUrl' command
Browse files Browse the repository at this point in the history
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
  • Loading branch information
RomanNikitenko committed Feb 5, 2019
1 parent 403cc2f commit e7a5cf1
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ export class MiniBrowserOpenHandler extends NavigatableWidgetOpenHandler<MiniBro
isVisible: widget => !!this.getSourceUri(widget)
});
commands.registerCommand(MiniBrowserCommands.OPEN_URL, {
execute: () => this.openUrl()
execute: (arg?: string) => this.openUrl(arg)
});
}

Expand Down Expand Up @@ -243,8 +243,8 @@ export class MiniBrowserOpenHandler extends NavigatableWidgetOpenHandler<MiniBro
return uri;
}

protected async openUrl(): Promise<void> {
const url = await this.quickInputService.open({
protected async openUrl(arg?: string): Promise<void> {
const url = arg ? arg : await this.quickInputService.open({
prompt: 'URL to open',
placeHolder: 'Type a URL'
});
Expand Down

0 comments on commit e7a5cf1

Please sign in to comment.