From 7981dac51d8b6776985aa08cb7b5ee98ea7f2ddd Mon Sep 17 00:00:00 2001 From: Matt Wozniski Date: Fri, 26 Jul 2013 23:41:55 -0400 Subject: [PATCH] Create the Normal highlight if it doesn't exist This can happen in versions of vim built without X support, like vim.nox in Debian. Fixes #9 --- plugin/CSApprox.vim | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugin/CSApprox.vim b/plugin/CSApprox.vim index 6cdadbb..42548f3 100644 --- a/plugin/CSApprox.vim +++ b/plugin/CSApprox.vim @@ -378,6 +378,11 @@ endfunction " {>1} Top-level control +" If the normal group doesn't exist yet, create it +if hlID('Normal') == 0 + hi clear Normal +endif + " Cache the highlight ID of the normal group; it's used often and won't change let s:hlid_normal = hlID('Normal')