meven added a comment.
In D25328#563637 <https://phabricator.kde.org/D25328#563637>, @cullmann wrote: > Hmm, the use case is that it re-highlights if you set an invalid definition? Here it rehighlight if the definition has changed `definition() != def`. But since the current definition `m_definition` has initially the value `Definition()`, it is the same as the invalid default definition returned by `Repository::definitionForFileName` (set in `RepositoryPrivate::load` line 161) and does not call `rehighlight`. > Perhaps one should just trigger rehighlight here just for that case, too. So the fix does not really depend on the definition being valid or invalid. Perhaps there is a better way to fix this. REPOSITORY R216 Syntax Highlighting REVISION DETAIL https://phabricator.kde.org/D25328 To: meven, kossebau, cullmann, vkrause Cc: dhaumann, kwrite-devel, kde-frameworks-devel, LeGast00n, GB_2, domson, michaelh, ngraham, bruns, demsking, cullmann, sars