Commit 586c1708 authored by Alexander Neundorf's avatar Alexander Neundorf
Browse files

Search&Replace: also update the number of matches in the file-items

With this patch, also the number of matches items in the file items
is updated, before each file was showing the total number of matches,
not the filtered number of matches.
parent 42c49809
Pipeline #146473 failed with stage
in 2 minutes and 23 seconds
......@@ -618,11 +618,14 @@ QString MatchModel::fileToHtmlString(const MatchFile &matchFile) const
} else {
fg = fgColor.darker(150).name();
}
int filteredMatches = std::count_if(matchFile.matches.begin(), matchFile.matches.end(), [](const KateSearchMatch &match) {
return match.matchesFilter;
});
QString tmpStr = QStringLiteral("<span style=\"color:%1;\">%2</span><b>%3: %4</b>")
.arg(fg)
.arg(path)
.arg(matchFile.fileUrl.fileName().toHtmlEscaped())
.arg(matchFile.matches.size());
.arg(filteredMatches);
return tmpStr;
}
......
Markdown is supported
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