summaryrefslogtreecommitdiffstats
path: root/kate/app/katedocmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kate/app/katedocmanager.cpp')
-rw-r--r--kate/app/katedocmanager.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/kate/app/katedocmanager.cpp b/kate/app/katedocmanager.cpp
index f9158dc1c..f23d5abba 100644
--- a/kate/app/katedocmanager.cpp
+++ b/kate/app/katedocmanager.cpp
@@ -455,7 +455,8 @@ void KateDocManager::saveDocumentList (KConfig* config)
int i=0;
for ( Kate::Document *doc = m_docList.first(); doc; doc = m_docList.next() )
{
- config->setGroup(TQString("Document %1").arg(i));
+ long docListPos = doc->documentListPosition();
+ config->setGroup(TQString("Document %1").arg((docListPos<0)?i:docListPos));
doc->writeSessionConfig(config);
config->setGroup(grp);