Commit bcfc2d4f authored by Christoph Cullmann's avatar Christoph Cullmann 🐮 Committed by Waqar Ahmed
Browse files

highlight open documents in file list

parent 181ef922
Pipeline #139530 passed with stage
in 2 minutes and 53 seconds
......@@ -2,14 +2,18 @@
SPDX-FileCopyrightText: 2022 Waqar Ahmed <waqar.17a@gmail.com>
SPDX-License-Identifier: LGPL-2.0-or-later
*/
#include "kateurlbar.h"
#include "kateapp.h"
#include "kateviewmanager.h"
#include "kateviewspace.h"
#include <KTextEditor/Document>
#include <KTextEditor/View>
#include <KColorScheme>
#include <KLocalizedString>
#include <QAbstractListModel>
#include <QAction>
#include <QApplication>
......@@ -62,6 +66,11 @@ public:
}
} else if (role == FileInfo) {
return QVariant::fromValue(fi);
} else if (role == Qt::ForegroundRole) {
// highlight already open documents
if (KateApp::self()->documentManager()->findDocument(QUrl::fromLocalFile(fi.absoluteFilePath()))) {
return KColorScheme().foreground(KColorScheme::PositiveText).color();
}
}
return {};
......
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