Fix syntax highlighting on empty buffer

This commit is contained in:
Zachary Yedidia
2018-01-28 22:35:43 -05:00
parent a19a6d28a7
commit 0913a1aeb3

View File

@@ -425,7 +425,9 @@ func SetLocalOption(option, value string, view *View) error {
if !nativeValue.(bool) {
buf.ClearMatches()
} else {
buf.highlighter.HighlightStates(buf)
if buf.highlighter != nil {
buf.highlighter.HighlightStates(buf)
}
}
}