shichongrui / obsidian-reveal-active-file

Obsidian plugin to reveal the active file automatically when you open a file
93 stars 11 forks source link

fixes inability to focus new tab when plugin enabled (closes #27) #28

Open mjs271 opened 4 weeks ago

mjs271 commented 4 weeks ago

If I'm understanding correctly, the is_file() function should have the logical eval flipped, such that it allows for the case where the currently focused tab (leaf) is not a file, which I interpret to mean "a saved file in the obsidian vault."

This doesn't change that it's strange for this condition to prevent viewing the tab, though, since that seems a little backwards to me 🤷‍♂️

Cheers

edit: I'll also note that it appears to have fixed the issue for me, but I have not tested it rigorously.

igorakkerman commented 2 days ago

I manually changed the code locally and it seems to have fixed the issue for me. Thanks a lot, @mjs271 !