D25328: Always rehiglhight() after definition was changed

Méven Car noreply at phabricator.kde.org
Mon Nov 18 16:55:05 GMT 2019


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwrite-devel/attachments/20191118/4d3d1371/attachment.html>


More information about the KWrite-Devel mailing list