File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -178,10 +178,8 @@ function! s:create_syn_match()
178178endfunction
179179
180180function ! s: clear_matches ()
181- if exists (' w:color_match_id' )
182- call filter (w: color_match_id , ' matchdelete(v:val)' )
183- unlet w: color_match_id
184- endif
181+ call map (get (w: , ' css_color_match_id' , []), ' matchdelete(v:val)' )
182+ unlet ! w: css_color_match_id
185183endfunction
186184
187185function ! s: create_matches ()
@@ -191,14 +189,13 @@ function! s:create_matches()
191189 let group = ' '
192190 let groupstart = 0
193191 let endcol = col (' $' )
194- let w: color_match_id = []
192+ let w: css_color_match_id = []
195193 for col in range ( 1 , endcol )
196194 let nextgroup = col < endcol ? synIDattr ( synID ( lnr , col , 1 ), ' name' ) : ' '
197195 if group == nextgroup | continue | endif
198196 if group = ~ ' ^BG\x\{6}$'
199197 let regex = ' \%' .lnr .' l\%' .groupstart.' c' .repeat ( ' .' , col - groupstart )
200- let match = matchadd ( group, regex, -1 )
201- let w: color_match_id += [ match ]
198+ let w: css_color_match_id += [ matchadd ( group, regex, -1 ) ]
202199 endif
203200 let group = nextgroup
204201 let groupstart = col
You can’t perform that action at this time.
0 commit comments