From 0913a1aeb3d8d8b1a91d17af09ad7e7a3c11ea88 Mon Sep 17 00:00:00 2001 From: Zachary Yedidia Date: Sun, 28 Jan 2018 22:35:43 -0500 Subject: [PATCH] Fix syntax highlighting on empty buffer --- cmd/micro/settings.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/micro/settings.go b/cmd/micro/settings.go index 08d4adab..cf1b2093 100644 --- a/cmd/micro/settings.go +++ b/cmd/micro/settings.go @@ -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) + } } } -- 2.44.0