From 77378e06df9c7ac4345fee932b9c1923a15e8ef9 Mon Sep 17 00:00:00 2001 From: wsdjeg Date: Tue, 5 Apr 2022 23:15:10 +0800 Subject: [PATCH] fix(cscope): check cscope executable --- bundle/cscope.vim/autoload/cscope.vim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bundle/cscope.vim/autoload/cscope.vim b/bundle/cscope.vim/autoload/cscope.vim index ad16e73a1..91c69c23a 100644 --- a/bundle/cscope.vim/autoload/cscope.vim +++ b/bundle/cscope.vim/autoload/cscope.vim @@ -436,6 +436,10 @@ function! s:create_database(dir, init, load) abort endfunction function! s:run_create_database_job(dir, cscope_files, cscope_db, load) abort + if !executable(g:cscope_cmd) + call s:notify.notify('''cscope'' is not executable!', 'WarningMsg') + return + endif let jobid = s:JOB.start([g:cscope_cmd, '-b', '-i', a:cscope_files, '-f', a:cscope_db], { \ 'on_exit' : function('s:on_create_db_exit') \ })