提交 2381d8f6 编写于 作者: S Sardorbek Pulatov

always show create a branch button

上级 4e59ab36
......@@ -98,6 +98,8 @@ class CreateBranchItem implements QuickPickItem {
get label(): string { return localize('create branch', '$(plus) Create new branch'); }
get description(): string { return ''; }
get shouldAlwaysShow(): boolean { return true; }
async run(repository: Repository): Promise<void> {
await this.cc.branch(repository);
}
......
......@@ -1574,6 +1574,11 @@ declare module 'vscode' {
*/
detail?: string;
/**
* Show this item always
*/
shouldAlwaysShow?: boolean;
/**
* Optional flag indicating if this item is picked initially.
* (Only honored when the picker allows multiple selections.)
......@@ -8135,7 +8140,7 @@ declare module 'vscode' {
* in arbitrary order and the initial debug configuration is piped through the chain.
* Returning the value 'undefined' prevents the debug session from starting.
* Returning the value 'null' prevents the debug session from starting and opens the underlying debug configuration instead.
*
*
* @param folder The workspace folder from which the configuration originates from or undefined for a folderless setup.
* @param debugConfiguration The [debug configuration](#DebugConfiguration) to resolve.
* @param token A cancellation token.
......
......@@ -69,6 +69,7 @@ export class ExtHostQuickOpen implements ExtHostQuickOpenShape {
let description: string;
let detail: string;
let picked: boolean;
let alwaysShow: boolean;
if (typeof item === 'string') {
label = item;
......@@ -77,13 +78,15 @@ export class ExtHostQuickOpen implements ExtHostQuickOpenShape {
description = item.description;
detail = item.detail;
picked = item.picked;
alwaysShow = item.shouldAlwaysShow;
}
pickItems.push({
label,
description,
handle,
detail,
picked
picked,
alwaysShow
});
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册