Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Kate
Commits
d5399a20
Commit
d5399a20
authored
Oct 03, 2022
by
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
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
apps/lib/kateviewspace.cpp
View file @
d5399a20
...
...
@@ -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
);
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment