obsidian-remember-cursor-position
obsidian-remember-cursor-position copied to clipboard
[feature request] multiple cursor positions (each linked to a different tab) for same file
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).
The problem is that not the cursor position needs to be remember but the workspace state, including each editor/viewing tab, window, etc.
This plugin keeps an offset per file, and instead it should keep some state (including offsets) tied to UI elements.
While this may be doable from a plugin, it's best handled holistically directly in Obsidian.
I've created an issue there https://forum.obsidian.md/t/persistent-editor-view-state-on-restart/83575/2