X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/b8e826dd2881537147def7019a7637f671021daa..3bbbd1b402bb62889ad54c320d1e9e692fe323ee:/vim/vimrc diff --git a/vim/vimrc b/vim/vimrc index 658f7ce..abce751 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -701,8 +701,11 @@ function! GitToggle() if buflisted(l:status_buffer) execute 'bdelete '.l:status_buffer else - Git - 16wincmd_ + execute 'Git' + if !empty(FugitiveGitDir()) + " only resize status if Git was sucessful + 16wincmd_ + endif endif endfunction command! GitToggle :call GitToggle()