Seems reasonable to me that when calling openUrl it should be reset to its original filetype and highlighting mode.
Details
Details
- Reviewers
dhaumann cullmann - Group Reviewers
Framework: Syntax Highlighting Frameworks KTextEditor - Commits
- R39:16d90fd266df: Reset filetype when opening url
none
Diff Detail
Diff Detail
- Repository
- R39 KTextEditor
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Comment Actions
Looks reasonable to me as well... I don't see any negative side effects, so should be fine from my side.
@cullmann Can you confirm?
Comment Actions
KTextEditor::DocumentPrivate::documentReload() is keeping m_fileTypeSetByUser to a local variable (byUser) before calling openUrl and uses that local variable after reloading to set the highlighting mode.
I'll double check however and get back to you
Comment Actions
Honor "m_reloading" to avoid to avoid reseting the file type on document reloads as suggested by @cullmann
Comment Actions
You are right! We need to check m_reloading in cases of multiple consecutive reloads :)