changeset 187:a1cf97b8f48f

Merge pull request #137 from GitHub.
author Ludovic Chabant <ludovic@chabant.com>
date Thu, 08 Jun 2017 07:10:07 -0700
parents 685b81826b68 (diff) becdd3c867c7 (current diff)
children 25dbdb52adb5
files
diffstat 1 files changed, 9 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/autoload/gutentags/ctags.vim	Mon May 29 15:58:57 2017 +0200
+++ b/autoload/gutentags/ctags.vim	Thu Jun 08 07:10:07 2017 -0700
@@ -35,6 +35,7 @@
 
 " Gutentags Module Interface {{{
 
+let s:did_check_exe = 0
 let s:runner_exe = gutentags#get_plat_file('update_tags')
 let s:unix_redir = (&shellredir =~# '%s') ? &shellredir : &shellredir . ' %s'
 
@@ -54,11 +55,14 @@
     endif
 
     " Check if the ctags executable exists.
-    if g:gutentags_enabled && executable(expand(g:gutentags_ctags_executable, 1)) == 0
-        let g:gutentags_enabled = 0
-        echoerr "Executable '".g:gutentags_ctags_executable."' can't be found. "
-                    \."Gutentags will be disabled. You can re-enable it by "
-                    \."setting g:gutentags_enabled back to 1."
+    if s:did_check_exe == 0
+        if g:gutentags_enabled && executable(expand(g:gutentags_ctags_executable, 1)) == 0
+            let g:gutentags_enabled = 0
+            echoerr "Executable '".g:gutentags_ctags_executable."' can't be found. "
+                        \."Gutentags will be disabled. You can re-enable it by "
+                        \."setting g:gutentags_enabled back to 1."
+        endif
+        let s:did_check_exe = 1
     endif
 endfunction