summaryrefslogtreecommitdiffstats
path: root/kate
diff options
context:
space:
mode:
Diffstat (limited to 'kate')
-rw-r--r--kate/app/katefilelist.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/kate/app/katefilelist.cpp b/kate/app/katefilelist.cpp
index 24062336a..05763e988 100644
--- a/kate/app/katefilelist.cpp
+++ b/kate/app/katefilelist.cpp
@@ -364,11 +364,16 @@ void KateFileList::updateFileListLocations()
TQListViewItem* item = firstChild();
int i=0;
while (item) {
+ Kate::Document* itemDocument = ((KateFileListItem *)item)->document();
if (m_sort == KateFileList::sortManual) {
- ((KateFileListItem *)item)->document()->setDocumentListPosition(i);
+ if (KateDocManager::self()->findDocument(itemDocument) >= 0) {
+ itemDocument->setDocumentListPosition(i);
+ }
}
else {
- ((KateFileListItem *)item)->document()->setDocumentListPosition(-1);
+ if (KateDocManager::self()->findDocument(itemDocument) >= 0) {
+ itemDocument->setDocumentListPosition(-1);
+ }
}
item = item->itemBelow();
i++;