1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-09-17 12:07:08 +03:00

handle color scheme missing fg, bg better

This commit is contained in:
George Harker 2023-10-30 20:02:17 -07:00
parent 63e1c40468
commit 3e6de128bd

View File

@ -104,11 +104,11 @@ extension NvimView {
:autocmd BufEnter * call rpcnotify(\($0), 'autocommand', 'bufenter', str2nr(expand('<abuf>')))
:autocmd DirChanged * call rpcnotify(\($0), 'autocommand', 'dirchanged', expand('<afile>'))
:autocmd ColorScheme * call rpcnotify(\($0), 'autocommand', 'colorscheme', \
get(nvim_get_hl(0, {'id': hlID('Normal')}), 'fg', 0xFFFFFF), \
get(nvim_get_hl(0, {'id': hlID('Normal')}), 'bg', 0x000000), \
get(nvim_get_hl(0, {'id': hlID('Visual')}), 'fg', 0xFFFFFF), \
get(nvim_get_hl(0, {'id': hlID('Visual')}), 'bg', 0x000000), \
get(nvim_get_hl(0, {'id': hlID('Directory')}), 'fg', 0x000000))
get(nvim_get_hl(0, {'id': hlID('Normal')}), 'fg', -1), \
get(nvim_get_hl(0, {'id': hlID('Normal')}), 'bg', -1), \
get(nvim_get_hl(0, {'id': hlID('Visual')}), 'fg', -1), \
get(nvim_get_hl(0, {'id': hlID('Visual')}), 'bg', -1), \
get(nvim_get_hl(0, {'id': hlID('Directory')}), 'fg', -1))
:autocmd ExitPre * call rpcnotify(\($0), 'autocommand', 'exitpre')
:autocmd BufModifiedSet * call rpcnotify(\($0), 'autocommand', 'bufmodifiedset', \
str2nr(expand('<abuf>')), getbufinfo(str2nr(expand('<abuf>')))[0].changed)