Fix Notpad++ hangs while deleting search results results

When deleting search results use setLexer only when lexer is SCLEX_NULL.

Fix #12555, clos #12765
This commit is contained in:
ozone10 2023-01-06 08:27:39 +01:00 committed by Don Ho
parent 17eba0a374
commit b3934afd92

View File

@ -610,7 +610,10 @@ void Finder::deleteResult()
auto end = _scintView.execute(SCI_GETLINEENDPOSITION, lno);
if (start + 2 >= end) return; // avoid empty lines
if (_scintView.execute(SCI_GETLEXER) == SCLEX_NULL)
{
_scintView.setLexer(L_SEARCHRESULT, LIST_NONE); // Restore searchResult lexer in case the lexer was changed to SCLEX_NULL in GotoFoundLine()
}
if (_scintView.execute(SCI_GETFOLDLEVEL, lno) & SC_FOLDLEVELHEADERFLAG) // delete a folder
{