Customized fork of github.com/rxi/lite
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fixed highlighter resetting of syntax on doc filename change

rxi 3d49b6d2 70f62f3c

+8 -4
+7 -3
data/core/doc/highlighter.lua
··· 9 9 10 10 function Highlighter:new(doc) 11 11 self.doc = doc 12 - self.lines = {} 13 - self.first_invalid_line = 1 14 - self.max_wanted_line = 0 12 + self:reset() 15 13 16 14 -- init incremental syntax highlighting 17 15 core.add_thread(function() ··· 39 37 end, self) 40 38 end 41 39 40 + 41 + function Highlighter:reset() 42 + self.lines = {} 43 + self.first_invalid_line = 1 44 + self.max_wanted_line = 0 45 + end 42 46 43 47 function Highlighter:invalidate(idx) 44 48 self.first_invalid_line = idx
+1 -1
data/core/doc/init.lua
··· 59 59 local syn = syntax.get(self.filename or "") 60 60 if self.syntax ~= syn then 61 61 self.syntax = syn 62 - self.highlighter:invalidate(1) 62 + self.highlighter:reset() 63 63 end 64 64 end 65 65