notepad-plus-plus / notepad-plus-plus/notepad-plus-plus
Remembered Un-Closed Tabs Not Opening In Previous Instance Position (Buggy)
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 29.4k
- Forks
- 5.4k
- PR merge metrics
- No merged PRs in 30d
Description
Description of the Issue
Session Restore doesnt load previously used line properly in large text documents —it scrolls to another location even though the caret is in the proper last place, so if i press arrow keys, it will go back to correct location. Please improve and/or fix Session Restore. 33,658 words. 65 lines (10-15 paragraphs) in my 'lingo.txt' file, & some other [lengthy] textfiles don't resume correctly either (I'm guessing large text files.) I'am not talking about Load Sessions' but when re-opening existing files with the NPP shortcut & not individual files, but groups of unclosed tabs re-opened the next time… Some documents aren't loaded from the last-left-off place accurately.
Steps to Reproduce the Issue
- Save some text (probably a lot to replicate this issue) & close & re-open —it shouldn't open where I left off, but some other location, so Session isn't saved properly, I think.
Expected Behavior
Scroll to exact same position with caret where I left off, works for most files like my AutoHotkey Scripts, but I suspect it's buggy only with large text files.
Actual Behavior
Strange, I used an old saved Session file to open all my previous tabs, & NPP loads my 'lingo.txt' file scrolled to a line which I didn't work on previously, should be in line 55 but scrolls to 27 everytime. Moving arrow keys scrolls it correctly into view though —so I wonder what is causing this…
Debug Information
I tried disabling Document Map, which I have on the left, & Doc Switcher, which I have on the right, but made no difference…
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Session Restore behavior described for the large lingo.txt file when reopening groups of unclosed tabs, comparing the caret and scroll position before and after reopening. Trace the Session Restore path rather than Load Sessions, and consider the issue resolved when large text files reopen at the exact previous caret and scroll position; no source file or test is named in the report.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100