소스 검색

Only emit User event if there is a receiving end

Marco Hinz 9 년 전
부모
커밋
cbcf3f2518
1개의 변경된 파일7개의 추가작업 그리고 1개의 파일을 삭제
  1. 7 1
      autoload/startify.vim

+ 7 - 1
autoload/startify.vim

@@ -155,7 +155,13 @@ function! startify#insane_in_the_membrane() abort
 
   silent file Startify
   set filetype=startify
-  silent! doautocmd <nomodeline> User Startified
+  if exists('#User#Startified')
+    if v:version > 703 || v:version == 703 && has('patch442')
+      doautocmd <nomodeline> User Startified
+    else
+      doautocmd User Startified
+    endif
+  endif
 endfunction
 
 " Function: #session_load {{{1