plugin - Prevent fugitive from killing vim-which-key

This commit is contained in:
Emmanuel BENOîT 2023-06-18 15:51:18 +02:00
parent 86cab26b6a
commit 1a7de72081
No known key found for this signature in database
GPG key ID: 2356DC6956CF54EF

View file

@ -1 +1,16 @@
autocmd FileType fugitive setlocal signcolumn=no nonumber norelativenumber notimeout
" Don't display useless columns in the Git status window
autocmd FileType fugitive setlocal signcolumn=no nonumber norelativenumber
" Timeouts need to be disabled in the Git status window. We need to switch
" them off when entering it, and on when leaving it.
let s:in_fugitive_buffer = v:false
autocmd BufEnter *
\ if &ft ==# 'fugitive'
\ | set notimeout
\ | let s:in_fugitive_buffer = v:true
\ | endif
autocmd BufLeave *
\ if s:in_fugitive_buffer
\ | let s:in_fugitive_buffer = v:false
\ | set timeout
\ | endif