Commit 42c49809 authored by Alexander Neundorf's avatar Alexander Neundorf Committed by Kåre Särs
Browse files

Search&Replace: in filtered mode only replace visible matches

When suing "Replace checked", skip those matches which are
currently not visible (because they don't match the current filter)
parent e9b9280f
Pipeline #146398 passed with stage
in 5 minutes and 41 seconds
......@@ -444,7 +444,7 @@ void MatchModel::doReplaceNextMatch()
KTextEditor::Document::EditingTransaction transaction(doc);
for (int i = 0; i < matches.size(); ++i) {
if (matches[i].checked) {
if (matches[i].checked && matches[i].matchesFilter) {
replaceMatch(doc, createIndex(i, 0, m_replaceFile), m_regExp, m_replaceText);
// The document has been modified -> make sure the next match has the correct range
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment