X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/d5cea7189cb0e08b64762796b465cfb0873ebcea..46565ec18a0aa17afe95e619ab00b6b217ec3e48:/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()