https://bugs.kde.org/show_bug.cgi?id=498518

            Bug ID: 498518
           Summary: Kate status bar doesn't notice when the language is
                    changed with a modeline
    Classification: Applications
           Product: kate
           Version: 24.12.0
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: kwrite-bugs-n...@kde.org
          Reporter: piotr...@vivaldi.net
  Target Milestone: ---

SUMMARY
When a file with a modeline (a rarely mentioned feature of Kate BTW) is opened,
the language used for syntax highlighting is set properly, but the status bar
keeps the automatically detected one.

Moreover, when the user sets the language via the menu shown after clicking the
status bar element, the syntax highlighting mechanism switches to the one I
chose, but after saving the file with a(n already existent) language-setting
modeline, it's switched to that (previous) one, but the status bar still shows
the one chosen by the user.


STEPS TO REPRODUCE
1.  Create a file with an extension known to Kate (e.g., `test.md`).
2. Add a modeline with another language (e.g., `// kate: syntax C`)
3. Hit Ctrl+S.

OBSERVED RESULT
The syntax highlighting starts using the language defined by the modeline
(e.g., C), but the status bar stays the same.

EXPECTED RESULT
The status bar should show the language really used to highlight the text, one
way or another.

OPTIONAL FURTHER STEPS
4. Reopen the same file in Kate.

SOFTWARE/OS VERSIONS
Kate version: 24.12.0
KDE Frameworks version: 6.9.0
Qt version: 6.8.1

ADDITIONAL INFORMATION
I didn't test the behavior of LSP when a modeline is used, it may also cause
bugs. I also didn't test KWrite and KDevelop.

The modeline feature, if it's still there, could be advertised a little more
than in a 2006 blog post.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to