mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-22 16:57:12 +09:00
Don't highlight if syntax is off
This commit is contained in:
@@ -189,7 +189,9 @@ func (b *Buffer) UpdateRules() {
|
||||
if b.highlighter == nil || b.Settings["filetype"].(string) != b.syntaxDef.FileType {
|
||||
b.Settings["filetype"] = b.syntaxDef.FileType
|
||||
b.highlighter = highlight.NewHighlighter(b.syntaxDef)
|
||||
b.highlighter.Highlight(b, 0)
|
||||
if b.Settings["syntax"].(bool) {
|
||||
b.highlighter.Highlight(b, 0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user