浏览代码

Closes #275 - Adds expand menu to some nodes

main
Eric Amodio 6 年前
父节点
当前提交
7677a34203
共有 3 个文件被更改,包括 20 次插入1 次删除
  1. +14
    -0
      package.json
  2. +1
    -1
      src/views/viewBase.ts
  3. +5
    -0
      src/views/viewCommands.ts

+ 14
- 0
package.json 查看文件

@ -2538,6 +2538,11 @@
}
},
{
"command": "gitlens.views.expandNode",
"title": "Expand",
"category": "GitLens"
},
{
"command": "gitlens.views.refreshNode",
"title": "Refresh",
"category": "GitLens"
@ -3106,6 +3111,10 @@
"when": "false"
},
{
"command": "gitlens.views.expandNode",
"when": "false"
},
{
"command": "gitlens.views.refreshNode",
"when": "false"
}
@ -4079,6 +4088,11 @@
"group": "8_gitlens"
},
{
"command": "gitlens.views.expandNode",
"when": "view =~ /^gitlens\\.views\\./ && viewItem =~ /gitlens:(compare|folder|results|search|status:files)\\b/",
"group": "8_gitlens@1"
},
{
"command": "gitlens.views.refreshNode",
"when": "view =~ /^gitlens\\.views\\./ && viewItem =~ /gitlens:(?!file\\b)/",
"group": "9_gitlens@1"

+ 1
- 1
src/views/viewBase.ts 查看文件

@ -16,7 +16,7 @@ import {
import { configuration } from '../configuration';
import { Container } from '../container';
import { Logger } from '../logger';
import { debug, Functions, gate, log } from '../system';
import { debug, Functions, log } from '../system';
import { CompareView } from './compareView';
import { FileHistoryView } from './fileHistoryView';
import { LineHistoryView } from './lineHistoryView';

+ 5
- 0
src/views/viewCommands.ts 查看文件

@ -56,6 +56,11 @@ export class ViewCommands implements Disposable {
this
);
commands.registerCommand(
'gitlens.views.expandNode',
(node: ViewNode) => node.view.reveal(node, { select: false, focus: false, expand: 3 }),
this
);
commands.registerCommand(
'gitlens.views.dismissNode',
(node: ViewNode) => canDismissNode(node.view) && node.view.dismissNode(node),
this

正在加载...
取消
保存