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
179
179
180
180
function ! s: clear_matches ()
181
181
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 = []
183
183
endfunction
184
184
185
185
function ! s: create_matches ()
186
+ call s: clear_matches ()
186
187
if ! &l: cursorline | return | endif
187
188
" adds matches based that duplicate the highlighted colors on the current line
188
189
let lnr = line (' .' )
189
190
let group = ' '
190
191
let groupstart = 0
191
192
let endcol = col (' $' )
192
- let w: css_color_match_id = []
193
193
for col in range ( 1 , endcol )
194
194
let nextgroup = col < endcol ? synIDattr ( synID ( lnr , col , 1 ), ' name' ) : ' '
195
195
if group == nextgroup | continue | endif
@@ -218,7 +218,6 @@ let s:_csscolor = s:_hexcolor . '\|' . s:_funcexpr
218
218
" match() and friends do not allow finding all matches in a single
219
219
" scan without examining the start of the string over and over
220
220
function ! s: parse_screen ()
221
- call s: clear_matches ()
222
221
let leftcol = winsaveview ().leftcol
223
222
let left = max ([ leftcol - 15 , 0 ])
224
223
let width = &columns * 4
You can’t perform that action at this time.
0 commit comments