Bug 60933

Summary: highlighting doesn't work on remote (fish) files at start up
Product: [Applications] kate Reporter: Pupeno <pupeno>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: NOR    
Version: 2.1   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description Pupeno 2003-07-08 16:27:25 UTC
Version:           2.1 (using KDE 3.1.2)
Compiler:          gcc version 3.3 (Ark Linux 1.0 3.3-2ark)
OS:          Linux (i686) release 2.4.21-0.rc1.4ark

The problem is that, when I run kate and I closed it with some files open over fish://, the highlighting doesn't work. In  Tools->Highlighting Mode, the right one is chosed, but the text is not really highlighted (at least C++), moving the Highlighting mode to another one makes it work.
Note: this is with the directory where the files are opened in the (file) selector (over fish too, of course).
Thanks.
Comment 1 Christoph Cullmann 2003-07-25 23:55:34 UTC

*** This bug has been marked as a duplicate of 51004 ***
Comment 2 Hamish Rodda 2003-12-08 10:32:58 UTC
Subject: kdelibs/kate/part

CVS commit by rodda: 

Fix syntax highlighting restoration for files loaded as part of a session.
Christoph, this bug wasn't fixed in cvs head... but it is now :)

CCMAIL:51004@bugs.kde.org
CCMAIL:60933@bugs.kde.org


  M +4 -0      katedocument.cpp   1.660


--- kdelibs/kate/part/katedocument.cpp  #1.659:1.660
@@ -2434,4 +2434,8 @@ bool KateDocument::openFile(KIO::Job * j
       if (hl >= 0)
         internalSetHlMode(hl);
+    
+    } else {
+      // The buffer's highlighting gets nuked by KateBuffer::clear()
+      buffer->setHighlight(m_highlight);
     }