Explorar el Código

Only run :Startify on DirChanged for changed cwd

Ref: https://github.com/tpope/vim-fugitive/issues/1132
Daniel Hahler hace 7 años
padre
commit
9c26c7e8dc
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      autoload/startify.vim

+ 2 - 1
autoload/startify.vim

@@ -153,7 +153,8 @@ function! startify#insane_in_the_membrane() abort
   set filetype=startify
 
   if exists('##DirChanged')
-    autocmd startify DirChanged <buffer> Startify
+    let b:startify.cwd = getcwd()
+    autocmd startify DirChanged <buffer> if getcwd() !=# get(get(b:, 'startify', {}), 'cwd') | Startify | endif
   endif
   if exists('#User#Startified')
     doautocmd <nomodeline> User Startified