twinejs
twinejs copied to clipboard
Passage Editor: Undo/Redo moves the cursor out of the visible region
Describe the bug.
When using CTRL-Z or CTRL-Y the cursor position becomes invisible. Often (I am not sure, if always) the editor window just scrolls to the top of the text.
Subjective severity: middle to lower.
Steps to reproduce:
Given:
- A longer text file,
- the cursor is somewhere in the middle,
- top of file not in the visible region.
When:
- Type a few charakters
- Press CTRL Z
Then:
- Window scrolls to top of file
- Cursor is still at the previous location, which means: out of the visible region.
- (Several, not one, characters are removed, which I consider as a defect as well, but not the one I am talking about here.)
Expected behavior:
After using CTRL-Z/Y, the cursor is always visible. No unnecessary scrolling happens -> exactly that scrolling happens that is necessary to undo the last change.
Just like any editor: Notepad++, Eclipse, Word, OpenOffice Writer ... .
Additional context on this problem.
No response
Twine version number
2.5.1
Does this problem occur with the web version of Twine or the desktop app?
Desktop app
What operating system does this problem occur on?
Windows
If this problem is occurring with the web version of Twine, what browser does it occur on?
None
Presubmission checklist
- [ ] I am interested in working on code that would fix this bug. (This is not required to submit a bug report.)
- [X] I have done a search and believe that an issue does not already exist for this bug in the GitHub repository.
- [X] I have read and agree to abide by this project's Code of Conduct.
Clarifying "A longer text file"--could you give a character count in a single passage where you see this problem?
Clarifying "A longer text file"--could you give a character count in a single passage where you see this problem?
1497, 4255 or 1053 characters. It seems to happen in just every file, as soon as the scroll position is not yet already on the very top.
This sounds related to the passage-jumping bug that has been previously identified here, e.g. https://github.com/klembot/twinejs/issues/1202.