Skip to content

Commit 751a385

Browse files
authored
handle endpos=0 for research and rereplace methods (#283)
1 parent 34d8701 commit 751a385

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

PythonScript/src/ScintillaWrapper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,7 @@ void ScintillaWrapper::replaceImpl(boost::python::object searchStr, boost::pytho
826826
startPosition = 0;
827827
}
828828

829-
if (endPosition > 0 && endPosition < length)
829+
if (endPosition >= 0 && endPosition < length)
830830
{
831831
length = endPosition;
832832
}
@@ -968,7 +968,7 @@ void ScintillaWrapper::searchImpl(boost::python::object searchStr,
968968
startPosition = 0;
969969
}
970970

971-
if (endPosition > 0 && endPosition < length)
971+
if (endPosition >= 0 && endPosition < length)
972972
{
973973
length = endPosition;
974974
}

0 commit comments

Comments
 (0)