Skip to content

Commit

Permalink
Add visibility condition to "Open suggestion popup" command
Browse files Browse the repository at this point in the history
  • Loading branch information
tth05 committed Oct 25, 2022
1 parent d05be73 commit 696910b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ export default class CompletrPlugin extends Plugin {
//This is the same function that is called by obsidian when you type a character
(this._suggestionPopup as any).trigger(editor, this.app.workspace.getActiveFile(), true);
},
// @ts-ignore
isVisible: () => !this._suggestionPopup.isVisible()
});
this.addCommand({
id: 'completr-select-next-suggestion',
Expand Down Expand Up @@ -283,7 +285,7 @@ export default class CompletrPlugin extends Plugin {
}

private readonly onFileOpened = (file: TFile) => {
if (!this.settings.fileScannerScanCurrent || !file)
if (!this.settings.fileScannerProviderEnabled || !this.settings.fileScannerScanCurrent || !file)
return;

FileScanner.scanFile(this.settings, file, true);
Expand Down

0 comments on commit 696910b

Please sign in to comment.