unblevable / quick-scope

Lightning fast left-right movement in Vim
MIT License
1.43k stars 54 forks source link

E121: Undefined variable: color #13

Closed patrickdepinguin closed 9 years ago

patrickdepinguin commented 9 years ago

I installed using Vundle, upon starting vim I get following error:

Error detected while processing function <SNR>20_set_highlight_colors..  <SNR>20_set_default_color:
line    9:
E121: Undefined variable: color
E15: Invalid expression: color == -1
line   21:
E121: Undefined variable: color
E15: Invalid expression: color
Press ENTER or type command to continue

A quick fix removes that error:

diff --git a/plugin/quick_scope.vim b/plugin/quick_scope.vim
index 365382e..73b98aa 100644
--- a/plugin/quick_scope.vim
+++ b/plugin/quick_scope.vim
@@ -82,6 +82,7 @@ endfunction
 " highlighting.
 function! s:set_default_color(group, co_gui, co_256, co_16)
   let term = s:get_term()
+  let color = -1

   " Pick a color from an existing highlight group if the highlight group
   " exists.