Commit d5399a20 authored by Christoph Cullmann's avatar Christoph Cullmann 🍨
Browse files

avoid restoration of untitled documents

doc manager will just return a random one
parent 1cec6888
Pipeline #241035 passed with stage
in 23 minutes and 29 seconds
......@@ -1151,9 +1151,14 @@ void KateViewSpace::restoreConfig(KateViewManager *viewMan, const KConfigBase *c
// restore Document lru list so that all tabs from the last session reappear
const QStringList lruList = group.readEntry("Documents", QStringList());
for (int i = 0; i < lruList.size(); ++i) {
for (const auto &url : lruList) {
// ignore untitled stuff
if (url.isEmpty()) {
continue;
}
// ignore non-existing documents
if (auto doc = KateApp::self()->documentManager()->findDocument(QUrl(lruList[i]))) {
if (auto doc = KateApp::self()->documentManager()->findDocument(QUrl(url))) {
registerDocument(doc);
}
}
......
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