mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-08 11:33:48 -05:00
Avoid asynchronous job while vim is starting.
An asynchronous job at startup evidently triggers a Vim (not NeoVim) rendering bug in some terminals and/or with certain colorschemes. Terminals reported to be affected: libvte-based ones such as gnome-terminal, xfce4-terminal, lxterminal, kitty. Terminals reported to be unaffected: xterm, urxvt. Closes #619.
This commit is contained in:
@@ -147,7 +147,7 @@ function! gitgutter#utility#set_repo_path(bufnr, continuation) abort
|
||||
call gitgutter#utility#setbufvar(a:bufnr, 'path', -1)
|
||||
let cmd = gitgutter#utility#cd_cmd(a:bufnr, g:gitgutter_git_executable.' '.g:gitgutter_git_args.' ls-files --error-unmatch --full-name -z -- '.gitgutter#utility#shellescape(s:filename(a:bufnr)))
|
||||
|
||||
if g:gitgutter_async && gitgutter#async#available()
|
||||
if g:gitgutter_async && gitgutter#async#available() && !has('vim_starting')
|
||||
let handler = copy(s:set_path_handler)
|
||||
let handler.continuation = a:continuation
|
||||
call gitgutter#async#execute(cmd, a:bufnr, handler)
|
||||
|
||||
Reference in New Issue
Block a user