czottmann / obsidian-mononote

An Obsidian plugin that ensures each note occupies only one tab. If a note is already open, its existing tab will be focussed instead of opening the same file in the current tab.
https://obsidian.md/plugins?id=zottmann
MIT License
89 stars 2 forks source link

Support links pointing to sections in a pinned note #20

Closed FitzFrobozz closed 2 months ago

FitzFrobozz commented 7 months ago

Currently, when mononote is enabled and a link pointing to a section within a pinned note is clicked, mononote prevents the note from opening in a new tab, but the user is not taken to the link destination. This is the case both when the link in question is in the pinned note (e.g. in a table of contents) and when the link is in another note (e.g. a note dragged to the sidebar). It would be wonderful if this could be changed so that the link is followed to the relevant section of the note.

czottmann commented 7 months ago

@FitzFrobozz I'll take a look the next time I work on Mononote!

Some expectation management: Mononote is currently not my highest priority, tho, so that might take a few weeks. I will look into it, just not right away.

czottmann commented 2 months ago

Implemented in Release 1.2.1.

The cursor is now set correctly in the file Mononote switched to, and while copying the entire ephemeral state (scroll position, cursor positions) works, that highlighting flash of the selected section doesn't always work. It's something Obsidian does on its own under the hood, but AFAICT there's no function to make it do that.