Browse Source

Bookmark all lines of multiline match

Fix #6018, close #6040
pull/6059/head
Scott Sumner 5 years ago committed by Don HO
parent
commit
132441867e
No known key found for this signature in database
GPG Key ID: 6C429F1D8D84F46E
  1. 11
      PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp

11
PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp

@ -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);
if (!(state & (1 << MARK_BOOKMARK)))
pEditView->execute(SCI_MARKERADD, lineNumber, MARK_BOOKMARK);
for (auto i = lineNumber; i <= lineNumberEnd; ++i)
{
auto state = pEditView->execute(SCI_MARKERGET, i);
if (!(state & (1 << MARK_BOOKMARK)))
pEditView->execute(SCI_MARKERADD, i, MARK_BOOKMARK);
}
}
break;
}

Loading…
Cancel
Save