mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-22 13:24:42 +02:00
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:
parent
17eba0a374
commit
b3934afd92
@ -610,7 +610,10 @@ void Finder::deleteResult()
|
|||||||
auto end = _scintView.execute(SCI_GETLINEENDPOSITION, lno);
|
auto end = _scintView.execute(SCI_GETLINEENDPOSITION, lno);
|
||||||
if (start + 2 >= end) return; // avoid empty lines
|
if (start + 2 >= end) return; // avoid empty lines
|
||||||
|
|
||||||
_scintView.setLexer(L_SEARCHRESULT, LIST_NONE); // Restore searchResult lexer in case the lexer was changed to SCLEX_NULL in GotoFoundLine()
|
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
|
if (_scintView.execute(SCI_GETFOLDLEVEL, lno) & SC_FOLDLEVELHEADERFLAG) // delete a folder
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user