From c63169eabcda45b2343178136eaef584f72154f3 Mon Sep 17 00:00:00 2001 From: Don Ho Date: Wed, 6 Jul 2022 01:53:17 +0200 Subject: [PATCH] Restore Search result folding's old behaviour Ref: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/11814#issuecomment-1175359785 --- PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp b/PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp index 20272b9b2..b047ae2c0 100644 --- a/PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp +++ b/PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp @@ -4576,8 +4576,8 @@ void Finder::beginNewFilesSearch() _pMainMarkings = _pMainMarkings == &_markings1 ? &_markings2 : &_markings1; _nbFoundFiles = 0; - if (_scintView.execute(SCI_GETFOLDEXPANDED, 0)) - _scintView.execute(SCI_TOGGLEFOLD, 0); + // fold all old searches (1st level only) + _scintView.collapse(searchHeaderLevel - SC_FOLDLEVELBASE, fold_collapse); } void Finder::finishFilesSearch(int count, int searchedCount, bool isMatchLines, bool searchedEntireNotSelection)