From 1cd454a8d51f169a8ee5bd2db65f9c4684686755 Mon Sep 17 00:00:00 2001 From: Don HO Date: Thu, 16 May 2019 01:59:17 +0200 Subject: [PATCH] Fix the regression: "Replace all" and "Mark all" work partially --- .../src/ScitillaComponent/FindReplaceDlg.cpp | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp index 7ab70e81e..6517189da 100644 --- a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp +++ b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp @@ -1842,18 +1842,15 @@ int FindReplaceDlg::processAll(ProcessOperation op, const FindOption *opt, bool } //then adjust scope if the full document needs to be changed - if (op == ProcessCountAll) + if (op == ProcessCountAll && pOptions->_isInSelection) { - if (pOptions->_isInSelection) - { - startPosition = cr.cpMin; - endPosition = cr.cpMax; - } - else if (pOptions->_isWrapAround || isEntire) //entire document needs to be scanned - { - startPosition = 0; - endPosition = docLength; - } + startPosition = cr.cpMin; + endPosition = cr.cpMax; + } + else if (pOptions->_isWrapAround || isEntire || op == ProcessCountAll) //entire document needs to be scanned + { + startPosition = 0; + endPosition = docLength; } //then readjust scope if the selection override is active and allowed