Skip to content

Commit 9f9b1a1

Browse files
committed
move s:create_matches call out of s:parse_screen
1 parent afaacf5 commit 9f9b1a1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

autoload/css_color.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,6 @@ function! s:parse_screen()
222222
let left = max([ leftcol - 15, 0 ])
223223
let width = &columns * 4
224224
call filter( range( line('w0'), line('w$') ), 'substitute( strpart( getline(v:val), col([v:val, left]), width ), b:css_color_pat, ''\=s:create_syn_match()'', ''g'' )' )
225-
call s:create_matches()
226225
endfunction
227226

228227
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
@@ -233,9 +232,10 @@ endfunction
233232

234233
function! css_color#enable()
235234
if len( b:css_color_grp ) | exe 'syn cluster colorableGroup add=' . join( b:css_color_grp, ',' ) | endif
236-
autocmd CSSColor CursorMoved,CursorMovedI <buffer> call s:parse_screen()
235+
autocmd CSSColor CursorMoved,CursorMovedI <buffer> call s:parse_screen() | call s:create_matches()
237236
let b:css_color_off = 0
238237
call s:parse_screen()
238+
call s:create_matches()
239239
endfunction
240240

241241
function! css_color#disable()

0 commit comments

Comments
 (0)