The regression is introduced by:
83755ca155 (diff-d88ddee57a027ab23daf332c4778ced0cee352edcb34efdda1b218e8a75c61b2L2636)
The culprit of this regression is the deletion of following 4 lines in the commit above:
```
void ScintillaEditView::fold(size_t line, bool mode, bool shouldBeNotified/* = true*/)
{
auto endStyled = execute(SCI_GETENDSTYLED);
auto len = execute(SCI_GETTEXTLENGTH);
if (endStyled < len)
execute(SCI_COLOURISE, 0, -1);
```
The method "ScintillaEditView::fold()" is called not only on manual folding by the users, but also on:
1. startup's loading session to restore the folding state programmatically.
2. after startup, switching among the documents to restore the folding state programmatically.
The above lines are important for the case 1.
However, these lines are necessary only on the first load of each file after the startup of Notepad++.
"execute(SCI_COLOURISE, 0, -1);" needs to be run for once (the case 1), not twice or more (the case 2).
So if there's a way to detect if a document has been run "execute(SCI_COLOURISE, 0, -1);" once (in the case 1),
and don't run it again (the case 2), it will save the time to switch among the document.
Fix #16597, close #16599
What is Notepad++ ?
Notepad++ is a free (free as in both "free speech" and "free beer") source code editor and Notepad replacement that supports several programming languages and natural languages. Running in the MS Windows environment, its use is governed by GPL License.
See the Notepad++ official site for more information.
Notepad++ Release Key
Since the release of version 7.6.5 Notepad++ is signed using GPG with the following key:
- Signer: Notepad++
- E-mail: don.h@free.fr
- Key ID: 0x8D84F46E
- Key fingerprint: 14BC E436 2749 B2B5 1F8C 7122 6C42 9F1D 8D84 F46E
- Key type: RSA 4096/4096
- Created: 2019-03-11
- Expires: 2027-03-13
https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/nppGpgPub.asc
Supported OS
All the Windows systems still supported by Microsoft are supported by Notepad++. However, not all Notepad++ users can or want to use the newest system. Here is the Supported systems information you may need in case you are one of them.
Build Notepad++
Please follow build guide to build Notepad++ from source.
Contribution
Contributions are welcome. Be mindful of our Contribution Rules to increase the likelihood of your contribution getting accepted.