window local variables instead of buffer local

This commit is contained in:
ManjaroOne666 2018-04-18 19:06:55 +01:00
parent ad12c4f0a5
commit 6237b231bb
1 changed files with 5 additions and 5 deletions

View File

@ -315,15 +315,15 @@ nnoremap <space>ci :ColorVInsert<CR>
nnoremap <space>cp :ColorVPicker<CR>
function! ToggleColorPreview() abort
if !exists('b:colorv_is_previewing')
let b:colorv_is_previewing = 0
if !exists('w:colorv_is_previewing')
let w:colorv_is_previewing = 0
endif
if b:colorv_is_previewing == 0
if w:colorv_is_previewing == 0
execute 'ColorVPreview'
let b:colorv_is_previewing = 1
let w:colorv_is_previewing = 1
else
execute 'ColorVClear'
let b:colorv_is_previewing = 0
let w:colorv_is_previewing = 0
endif
endfunction
"}}}