<table><tr><td style="">meven added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D20766">View Revision</a></tr></table><br /><div><div><p>I believe the issue currently is that for text files or files without associated definition we end up with an invalid definition that prevents SyntaxHighlighter::setDefinition to call rehighlight().<br />
QTextDocument uses then whatever it get from the theme I guess.<br />
Kate has an explicit special case in KateHighlighting::KateHighlighting to insert a default Format.</p>
<p>I think either KSyntaxHighlighting should have a dummy default definition based on currrent theme or we should here create a dummy default definition when <tt style="background: #ebebeb; font-size: 13px;">m_highlightingRepository.definitionForFileName(path)</tt> return an invalid definition.<br />
What do you think ?</p></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D20766">https://phabricator.kde.org/D20766</a></div></div><br /><div><strong>To: </strong>eshalygin, kossebau, cfeck<br /><strong>Cc: </strong>dhaumann, cullmann, vkrause, cfeck, meven, broulik, kde-frameworks-devel, kfm-devel, pberestov, iasensio, fprice, LeGast00n, MrPepe, fbampaloukas, alexde, GB_2, Codezela, feverfew, michaelh, spoorun, navarromorales, firef, ngraham, andrebarros, bruns, emmanuelp, mikesomov<br /></div>