Fix Notepad++ 7.7x64 hanging for around 10 seconds when expanding the first character in a file#9612
Merged
Conversation
… first character in a file
|
@LeonarddeR: Please also take a look at issue #8563. Maybe it's related. btw: Did you recognize that the reaction of NVDA is sometimes a little bit slower in Notepad++ portable (7.6.6 and 7.7, 32- and 64-Bit) in compare to the installed Notepad++ 7.6.6 (32-Bit) when pressing CTRL+A? I'm talking about a lag up to one second after pressing the hotkey. And this time all portable versions ran from the same SSD such as the installed version. |
michaelDCurran
approved these changes
May 23, 2019
michaelDCurran
pushed a commit
that referenced
this pull request
May 28, 2019
… first character in a file (#9612) * Fix Notepad++ 7.7x64 hanging for around 10 seconds when expanding the first character in a file * Introduce INVALID_POSITION constant * Update what's new.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to issue number:
Fixes #9609
Summary of the issue:
Notepad++ 7.7 X64 freezes when reading the first character of a file. This is because the logic to expand to textInfos.UNIT_CHARACTER gets stuck in a while loop due to NP++7.7 returning the wrong offset when getting the position after offset -1.
Description of how this pull request fixes the issue:
Restricted the wile loop in such a way that it could never get the position after a negative offset.
Testing performed:
Tested in Notepad++ 7.6 x64, 7.7 x64 and 7.7 x86 that the first character reads fine, whether it is a single or multi byte character.
Known issues with pull request:
We may have to report this bug against scintilla or NP++ as well.
Change log entry: