The cursor is re-positioned to beginning after content is updated
Operating System and Version
Windows 11 22631.4037 x64
Distribution
NotepadNext-v0.11-win64.zip
Description
When NotepadNext window regains the focus, if the file content is updated, the cursor will be re-positioned to the beginning of the file instead of maintaining the previous position, which is a big disadvantage for analyzing log files.
Steps to Reproduce
- Open a log file while it's continuously writted to
- Click any other window to make NotepadNext window lose focus
- Click NotepadNext window to regain focus, make sure it automatic update the content, cursor is re-positioned to beginning
Debug Information
Notepad Next v0.11.0.0 Build Date/Time: Apr 2 2025 02:10:30 Qt: 6.5.3 OS: Windows 11 Version 23H2
Additional Details
e.g. screenshots, logs, etc
Hello, I would like to take up this issue, if no one else has already taken it up. Thanks!
As far as I know nobody else is working on it.
My best guess is this function https://github.com/dail8859/NotepadNext/blob/4fc361ab8433b706877a3ce9e941ef47b5022261/src/NotepadNext/ScintillaNext.cpp#L324-L353 would need modified to save the current selection (maybe also the view location) and then after the file is restored set the position and view.
Cool, I'll give it a go this week. Okay, so I'll get the current position and the view, and store them temporarily and once the file has been restored I'll set the position and the view. Thank you!
Cool, I'll give it a go this week. Okay, so I'll get the current position and the view, 和 store them temporarily and once the file has been restored I'll set the position and the view. Thank you!
Is there any progress?