Skip to content

Commit

Permalink
change contextMenuHitTest to test for nodeId 'git-diff...'
Browse files Browse the repository at this point in the history
  • Loading branch information
BoscoCHW authored and fcollonval committed Jul 8, 2022
1 parent 2b9a506 commit 4b6ca08
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/commandsAndMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ export function addCommands(
getDiffProvider(fullPath) ?? (isText && createPlainTextDiff);

if (buildDiffWidget) {
const id = `diff-${fullPath}-${model.reference.label}-${model.challenger.label}`;
const id = `git-diff-${fullPath}-${model.reference.label}-${model.challenger.label}`;
const mainAreaItems = shell.widgets('main');
let mainAreaItem = mainAreaItems.next();
while (mainAreaItem) {
Expand Down Expand Up @@ -757,7 +757,7 @@ export function addCommands(
execute: async _ => {
const widget = app.contextMenuHitTest((node: HTMLElement) => {
const nodeId = node.dataset.id;
return nodeId && nodeId.substring(0, 4) === 'diff';
return nodeId && nodeId.substring(0, 8) === 'git-diff';
});
if (!widget) {
return;
Expand Down

0 comments on commit 4b6ca08

Please sign in to comment.