Added file-header pattern support to syntax
This commit is contained in:
1 parent
db471c0554
commit
ba6c14846b
5 files changed
+13
-4
No files matched your search
@@ -56,7 +56,8 @@ end
|
||||
|
||||
|
||||
function Doc:reset_syntax()
|
||||
local syn = syntax.get(self.filename or "")
|
||||
local header = self:get_text(1, 1, self:position_offset(1, 1, 128))
|
||||
local syn = syntax.get(self.filename or "", header)
|
||||
if self.syntax ~= syn then
|
||||
self.syntax = syn
|
||||
self.highlighter:reset()
|
||||
|
||||
Reference in new issue
Block a user