File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -179,17 +179,17 @@ endfunction
179179
180180function ! s: clear_matches ()
181181 call map (get (w: , ' css_color_match_id' , []), ' matchdelete(v:val)' )
182- unlet ! w: css_color_match_id
182+ let w: css_color_match_id = []
183183endfunction
184184
185185function ! s: create_matches ()
186+ call s: clear_matches ()
186187 if ! &l: cursorline | return | endif
187188 " adds matches based that duplicate the highlighted colors on the current line
188189 let lnr = line (' .' )
189190 let group = ' '
190191 let groupstart = 0
191192 let endcol = col (' $' )
192- let w: css_color_match_id = []
193193 for col in range ( 1 , endcol )
194194 let nextgroup = col < endcol ? synIDattr ( synID ( lnr , col , 1 ), ' name' ) : ' '
195195 if group == nextgroup | continue | endif
@@ -218,7 +218,6 @@ let s:_csscolor = s:_hexcolor . '\|' . s:_funcexpr
218218" match() and friends do not allow finding all matches in a single
219219" scan without examining the start of the string over and over
220220function ! s: parse_screen ()
221- call s: clear_matches ()
222221 let leftcol = winsaveview ().leftcol
223222 let left = max ([ leftcol - 15 , 0 ])
224223 let width = &columns * 4
You can’t perform that action at this time.
0 commit comments