Ver a proveniência

Closes #275 - Adds expand menu to some nodes

main
Eric Amodio há 6 anos
ascendente
cometimento
7677a34203
3 ficheiros alterados com 20 adições e 1 eliminações
  1. +14
    -0
      package.json
  2. +1
    -1
      src/views/viewBase.ts
  3. +5
    -0
      src/views/viewCommands.ts

+ 14
- 0
package.json Ver ficheiro

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

+ 1
- 1
src/views/viewBase.ts Ver ficheiro

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

+ 5
- 0
src/views/viewCommands.ts Ver ficheiro

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

Carregando…
Cancelar
Guardar