mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-09 10:20:06 +08:00
fix(scrollbar): add WinScrolled event if supported
This commit is contained in:
parent
a276b8c1ab
commit
a4084690f5
@ -170,9 +170,10 @@ function! SpaceVim#layers#ui#config() abort
|
|||||||
" this options only support neovim now.
|
" this options only support neovim now.
|
||||||
augroup spacevim_layer_ui
|
augroup spacevim_layer_ui
|
||||||
autocmd!
|
autocmd!
|
||||||
|
let events = join(filter( ['BufEnter', 'CursorMoved', 'VimResized', 'FocusGained', 'CursorHold', 'WinScrolled' ], 'exists("##" . v:val)'), ',')
|
||||||
if s:enable_scrollbar && has('nvim')
|
if s:enable_scrollbar && has('nvim')
|
||||||
autocmd BufEnter,CursorMoved,VimResized,FocusGained,CursorHold
|
exe printf('autocmd %s * call SpaceVim#plugins#scrollbar#show()',
|
||||||
\ * call SpaceVim#plugins#scrollbar#show()
|
\ events)
|
||||||
autocmd BufLeave,FocusLost,QuitPre
|
autocmd BufLeave,FocusLost,QuitPre
|
||||||
\ * call SpaceVim#plugins#scrollbar#clear()
|
\ * call SpaceVim#plugins#scrollbar#clear()
|
||||||
" why this autocmd is needed?
|
" why this autocmd is needed?
|
||||||
|
Loading…
Reference in New Issue
Block a user