Skip to content

Should hide the context menu on unrelated tabs. #1583

@tamuratak

Description

@tamuratak
  • GitLens Version: 11.6.0
  • Git Version: git version 2.21.1 (Apple Git-122.3)

Version: 1.59.0-insider
Commit: b805d2e94937976bb17d0439f57fcd3a9d423c31
Date: 2021-07-20T05:12:13.059Z
Electron: 13.1.7
Chrome: 91.0.4472.124
Node.js: 14.16.0
V8: 9.1.269.36-electron.0
OS: Darwin x64 18.7.0

Steps to Reproduce:

  1. Open Settings Panel.
  2. Right-click the tab of the panel.
  3. GitLens context menus appear.

We should hide the context menu on unrelated tabs.

スクリーンショット 2021-07-21 14 56 37

I think it is enough to add isFileSystemResource to when clauses. I would make a PR if it would be acceptable.

--- a/package.json
+++ b/package.json
@@ -6752,39 +6752,39 @@
                        "editor/title/context": [
                                {
                                        "command": "gitlens.copyRemoteFileUrlWithoutRange",
-                                       "when": "gitlens:enabled && gitlens:hasRemotes && config.gitlens.menus.editorTab.clipboard",
+                                       "when": "gitlens:enabled && gitlens:hasRemotes && config.gitlens.menus.editorTab.clipboard && isFileSystemResource",
                                        "group": "1_cutcopypaste@100"
                                },
                                {
                                        "submenu": "gitlens/editor/changes",
-                                       "when": "gitlens:enabled && config.gitlens.menus.editorTab.compare",
+                                       "when": "gitlens:enabled && config.gitlens.menus.editorTab.compare && isFileSystemResource",
                                        "group": "2_gitlens@0"
                                },

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions