From a0c41cc5a5b42c1255d47cc7d29a7da0b02bc44d Mon Sep 17 00:00:00 2001 From: Don Ho Date: Sun, 18 Dec 2022 21:24:24 +0100 Subject: [PATCH] Revert "Fix Trim Operations not working on selection" This reverts commit bf34ef0dd568b792627813a4445adf649a5c5ba6 due to bug https://github.com/notepad-plus-plus/notepad-plus-plus/issues/12658 --- PowerEditor/src/Notepad_plus.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index 259e1e13c..e1153c595 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -1486,10 +1486,8 @@ void Notepad_plus::doTrim(trimOp whichPart) else return; env._str4Replace = TEXT(""); - env._searchType = FindRegex; - bool isEntireDoc = _pEditView->execute(SCI_GETSELECTIONSTART) == _pEditView->execute(SCI_GETSELECTIONEND); - env._isInSelection = !isEntireDoc; - _findReplaceDlg.processAll(ProcessReplaceAll, &env, isEntireDoc); + env._searchType = FindRegex; + _findReplaceDlg.processAll(ProcessReplaceAll, &env, true); } void Notepad_plus::removeEmptyLine(bool isBlankContained)