Преглед на файлове

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

Зареждане…
Отказ
Запис