Skip to content

Commit

Permalink
fix: focus diff view via command
Browse files Browse the repository at this point in the history
close #377
  • Loading branch information
Vinzent03 committed Nov 17, 2022
1 parent 83bb9c2 commit e56641c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,14 @@ export default class ObsidianGit extends Plugin {
return file !== null;

} else {
getNewLeaf()?.setViewState({ type: DIFF_VIEW_CONFIG.type, state: { staged: false, file: file!.path } });
getNewLeaf()?.setViewState({
type: DIFF_VIEW_CONFIG.type,
active: true,
state: {
staged: false,
file: file!.path
}
});
}
}

Expand Down

0 comments on commit e56641c

Please sign in to comment.