obsidianmd / obsidian-sample-plugin

2.61k stars 924 forks source link

[feature request] multiple cursor positions (each linked to a different tab) for same file #89

Closed SuperCowProducts closed 10 months ago

SuperCowProducts commented 10 months ago

Specs

OS: iPadOS 17.1.2 Obsidian version: 1.4.16 (114)

What happened

I'd previously opened the same file in 2 different tabs: after vault reload, 1 tab returned back to its cursor position, the other to the start

What I did

I checked the json file to see what info had been saved, this was it: UW PICO 5.09 File: cursor-positions.json {"Moo.md":{"scroll":4.435,"cursor":{"from":{"ch":17,"line":0},"to":{"ch":17,"line":0}}}}

Looks like it had only been saving the last tab I edited in's cursor position, not both of them

Suggestion

it would be awesome if multiple cursor positions could be attributed to each file: that way, when opening multiple tabs of the same file, the plugin could 'distribute' the different cursor positions to multiple tabs of same file as these are opened.

PS

Don't know if this feature in particular works on other platforms, especially the desktop OSes, but just wanted to point out it certainly doesn't on iPadOS with my configuration (specified in 'Specs' heading).

lishid commented 10 months ago

Doesn't sound like an issue with the sample plugin. If you have questions about the API go to the forum developer section, otherwise do it in the feature request section.

SuperCowProducts commented 10 months ago

Oops, sorry about that: looks like I accidentally moved to this link before posting: I'll resend this message in the right repo