Skip to content

Commit

Permalink
feat(Path View): ✨ cmd: Toggle Show Trail/Grid in Edit & LP mode (fix #…
Browse files Browse the repository at this point in the history
  • Loading branch information
SkepticMystic committed Nov 26, 2021
1 parent 7917e05 commit 775a4f9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,16 @@ export default class BCPlugin extends Plugin {
callback: async () => await this.refreshIndex(),
});

this.addCommand({
id: "Toggle-trail-in-Edit&LP",
name: "Toggle: Show Trail/Grid in Edit & LP mode",
callback: async () => {
this.settings.showBCsInEditLPMode = !this.settings.showBCsInEditLPMode;
await this.saveSettings();
await this.drawTrail();
},
});

this.addCommand({
id: "Write-Breadcrumbs-to-Current-File",
name: "Write Breadcrumbs to Current File",
Expand Down Expand Up @@ -1279,6 +1289,7 @@ export default class BCPlugin extends Plugin {
!activeMDView ||
(mode !== "preview" && !showBCsInEditLPMode)
) {
activeMDView?.containerEl.querySelector(".BC-trail")?.remove();
db.end2G();
return;
}
Expand Down

0 comments on commit 775a4f9

Please sign in to comment.