aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorjdhao <jdhao@hotmail.com>2021-08-07 02:32:12 +0800
committerjdhao <jdhao@hotmail.com>2021-08-07 02:32:12 +0800
commitd434627738c59473530d807cb645df6deb4c8e80 (patch)
treec6866fdfa0906ef5b8bf5243af0f6865e76e603c /core
parent0830dfcf90dc708330730808f2fd67f5b7f46ef3 (diff)
Fix: the loading condition for fugitive is wrong
We should load fugitive in the following two situations: + When we open nvim in a Git repository + When we are inside nvim and change the working directory to a Git reposity
Diffstat (limited to 'core')
-rw-r--r--core/autocommands.vim5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/autocommands.vim b/core/autocommands.vim
index 1cc207a..2563ce7 100644
--- a/core/autocommands.vim
+++ b/core/autocommands.vim
@@ -89,4 +89,9 @@ function! s:quit_current_win() abort
quit
endif
endfunction
+
+augroup git_repo_check
+ autocmd!
+ autocmd VimEnter,DirChanged * call utils#Inside_git_repo()
+augroup END
"}