Commit 12f1251a authored by Mark Nauwelaerts's avatar Mark Nauwelaerts

search: correctly identify open project file

... rather than matching full doc url against projectfile path part.
parent 7109e5a6
......@@ -1034,10 +1034,12 @@ void KatePluginSearchView::startSearch()
addHeaderItem();
QList<KTextEditor::Document*> openList;
for (int i=0; i<m_kateApp->documents().size(); i++) {
int index = files.indexOf(m_kateApp->documents()[i]->url().toString());
const auto docs = m_kateApp->documents();
for (const auto doc: docs) {
// match project file's list toLocalFile()
int index = files.indexOf(doc->url().toLocalFile());
if (index != -1) {
openList << m_kateApp->documents()[i];
openList << doc;
files.removeAt(index);
}
}
......
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