mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-24 09:47:19 +09:00
Store highlighting matches in each line
This commit is contained in:
@@ -47,7 +47,6 @@ type Buffer struct {
|
||||
|
||||
syntaxDef *highlight.Def
|
||||
highlighter *highlight.Highlighter
|
||||
matches []highlight.LineMatch
|
||||
|
||||
// Buffer local settings
|
||||
Settings map[string]interface{}
|
||||
@@ -190,7 +189,7 @@ 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.matches = b.highlighter.Highlight(b, 0)
|
||||
b.highlighter.Highlight(b, 0)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user