Bookmark all lines of multiline match

Fix #6018, close #6040
This commit is contained in:
Scott Sumner 2019-08-12 09:21:15 -04:00 committed by Don HO
parent f6d6e42ac1
commit 132441867e
No known key found for this signature in database
GPG Key ID: 6C429F1D8D84F46E

View File

@ -2137,10 +2137,15 @@ int FindReplaceDlg::processRange(ProcessOperation op, FindReplaceInfo & findRepl
if (_env->_doMarkLine)
{
auto lineNumber = pEditView->execute(SCI_LINEFROMPOSITION, targetStart);
auto state = pEditView->execute(SCI_MARKERGET, lineNumber);
auto lineNumberEnd = pEditView->execute(SCI_LINEFROMPOSITION, targetEnd - 1);
for (auto i = lineNumber; i <= lineNumberEnd; ++i)
{
auto state = pEditView->execute(SCI_MARKERGET, i);
if (!(state & (1 << MARK_BOOKMARK)))
pEditView->execute(SCI_MARKERADD, lineNumber, MARK_BOOKMARK);
pEditView->execute(SCI_MARKERADD, i, MARK_BOOKMARK);
}
}
break;
}