From 91471746fe687ee867877508dfd809460dab5698 Mon Sep 17 00:00:00 2001 From: Andy Stewart Date: Mon, 1 Jul 2019 11:24:45 +0100 Subject: [PATCH] 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. --- autoload/gitgutter/utility.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/gitgutter/utility.vim b/autoload/gitgutter/utility.vim index 35ff542..3f533ba 100644 --- a/autoload/gitgutter/utility.vim +++ b/autoload/gitgutter/utility.vim @@ -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)