-
Notifications
You must be signed in to change notification settings - Fork 560
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restore cursor location when note is updated #36
Comments
Note: This means that when a note is saved, or changes come in remotely and are applied, that we sort out where the cursor was before the change was applied and restore it. |
This is the moment in the app where the cursor position change will need to be calculated. An example of how to calculate the cursor change can be found in the existing simperium-js codebase. |
While working on the Monaco interface I built this so that we wouldn't have to destroy the editor context the way we have been. Many issues will be simultaneously solved: wonky cursors, losing the undo history, accidentally undoing remote changes, etc… I felt like having access to the patch itself would be highly valuable and I'd like to expose more deeply the underlying data changes to the notes. For example, there are good ideas to show activity based on what segments of a note have been recently changed. Getting the cursor shift introduced from a patch then became trivial after having the parsed form in app state. |
I'm on simplenote v1.3.2 on solus linux. Simplenote is kinda unusable because of this. Video demonstration of the bug occuring (timestamps when it occurs 1:00, 1:27, 1:42, 1:52): |
I think this is related in 1637228-zen. A Linux user writes,
|
Is there any update? I love Simplenote but it is barely usable because of this bug. I tried to update and reinstall, but there is no solution. |
Another report here: 1641635-zen
|
I have been doing testing and, although the problem persists after reinstall the software, it seems to not appear anymore after deleting the folder If another user can report this as a solution, perhaps it can help focusing the debugging. |
Can confirm. |
Seeing the same (just started for me with 1.4). Above fix also worked. |
I'm also seeing this on v1.4.0 on linux mint 18.3, however deleting the folder ~/.config/Simplenote/ did not fix the issue. |
Strange that this only happens on Linux, as far as I can tell. Maybe our bump to Electron 4 that we're working on will help with this. |
Following the most recent update for Simplenote on Windows, I'm regularly encountering the cursor issue described in #292: "Cursor jumps to bottom of the note while editing". I'd experienced this bug previously (many months ago, in 2018, and perhaps even prior to then), before it seemed to resolve for a good time, only to now arise again. |
Another report of this happening in Windows 10 received via Twitter today. |
I am also having this problem on linux. Deleting .config/Simplnote seemed to work until I edited a note on the ios app, and then came back to editing it on the linux app. I add text to the top to keep a daily journal of my classes so this jumping to the bottom is very annoying. Seemed to start upon update to 1.4. Hope the note about switching between iOS and linux apps helps. |
Thanks @ehremington, I was able to reproduce by:
So this could happen easily with shared notes, or any other scenario where you can receive a remote change. |
Does this look to be the same issue as #1185? |
This was fixed some time ago for me. |
Closing as reported as fixed |
When a change is applied from Simperium, the cursor position should be updated to account for the new content.
For example, if I'm typing at the end of the note and a change comes in that modifies the beginning of the note by adding six characters, the cursor should be advanced six characters so that as I continue typing I'll be in the correct location.
Reported In:
The text was updated successfully, but these errors were encountered: