瀏覽代碼

Set fugitive git dir

Andrew Swistak 1 年之前
父節點
當前提交
7e632647ed
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      vimrc

+ 4 - 4
vimrc

@@ -531,10 +531,10 @@ function! s:MaybeRunProjectSettings(file)
     return
     return
   endif
   endif
 
 
-  let git_dir = fugitive#extract_git_dir(@%)
-  if git_dir != ""
-    if filereadable(git_dir.'/project.vim')
-      exec "source ".(git_dir.'/project.vim')
+  let s:git_dir = FugitiveGitDir()
+  if s:git_dir != ""
+    if filereadable(s:git_dir.'/project.vim')
+      exec "source ".(s:git_dir.'/project.vim')
     endif
     endif
   endif
   endif
   let g:custom_project_settings_loaded = 1
   let g:custom_project_settings_loaded = 1