Skip checking files if no filename was provided to syntax.get

This commit is contained in:
Guldoman
2023-08-19 13:29:48 +08:00
committed by takase1121
parent b5617a3eef
commit e9678cc140
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ function Doc:reset_syntax()
path = core.project_dir .. PATHSEP .. self.filename
end
if path then path = common.normalize_path(path) end
local syn = syntax.get(path or "", header)
local syn = syntax.get(path, header)
if self.syntax ~= syn then
self.syntax = syn
self.highlighter:soft_reset()