mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-17 06:17:12 +09:00
Optimize the memory usage for syntax highlighting
This commit is contained in:
@@ -190,7 +190,7 @@ func (b *Buffer) UpdateRules() {
|
||||
b.Settings["filetype"] = b.syntaxDef.FileType
|
||||
b.highlighter = highlight.NewHighlighter(b.syntaxDef)
|
||||
if b.Settings["syntax"].(bool) {
|
||||
b.highlighter.Highlight(b, 0)
|
||||
b.highlighter.HighlightStates(b)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user