# HG changeset patch # User Ludovic Chabant # Date 1528865646 25200 # Node ID 425157bdd02413a181643f6bced11ea823a92061 # Parent 179683b0f54cfdcc1dd00327c415e354b81c2e17# Parent 8e6156c4dff13a52d1f35f4570a9f89f866a5677 Merge pull request 172 from Github. diff -r 8e6156c4dff1 -r 425157bdd024 README.md --- a/README.md Sat Apr 21 01:38:39 2018 +0900 +++ b/README.md Tue Jun 12 21:54:06 2018 -0700 @@ -70,6 +70,12 @@ I don't want to have to think about it, and probably neither do you. +# Related Projects + +* [gutentags_plus](https://github.com/skywind3000/gutentags_plus): handles + switching between `cscope` databases automatically before performing a search + query. + [Pathogen]: https://github.com/tpope/vim-pathogen [ctrlp]: https://github.com/kien/ctrlp.vim diff -r 8e6156c4dff1 -r 425157bdd024 autoload/gutentags.vim --- a/autoload/gutentags.vim Sat Apr 21 01:38:39 2018 +0900 +++ b/autoload/gutentags.vim Tue Jun 12 21:54:06 2018 -0700 @@ -549,7 +549,7 @@ endfunction function! gutentags#default_io_cb(chan, msg) abort - call gutentags#trace(a:msg) + call gutentags#trace(string(a:msg)) endfunction if has('nvim') @@ -563,18 +563,19 @@ endfunction function! gutentags#build_default_job_options(module) abort - let l:job_opts = { - \'on_exit': function( - \ 'nvim_job_exit_wrapper', - \ ['gutentags#'.a:module.'#on_job_exit']), - \'on_stdout': function( - \ 'nvim_job_out_wrapper', - \ ['gutentags#default_io_cb']), - \'on_stderr': function( - \ 'nvim_job_out_wrapper', - \ ['gutentags#default_io_cb']) - \} - return l:job_opts + " Neovim kills jobs on exit, which is what we want. + let l:job_opts = { + \'on_exit': function( + \ 'nvim_job_exit_wrapper', + \ ['gutentags#'.a:module.'#on_job_exit']), + \'on_stdout': function( + \ 'nvim_job_out_wrapper', + \ ['gutentags#default_io_cb']), + \'on_stderr': function( + \ 'nvim_job_out_wrapper', + \ ['gutentags#default_io_cb']) + \} + return l:job_opts endfunction function! gutentags#start_job(cmd, opts) abort @@ -584,10 +585,11 @@ " Vim8 job API. function! gutentags#build_default_job_options(module) abort let l:job_opts = { - \'exit_cb': 'gutentags#'.a:module.'#on_job_exit', - \'out_cb': 'gutentags#default_io_cb', - \'err_cb': 'gutentags#default_io_cb' - \} + \'exit_cb': 'gutentags#'.a:module.'#on_job_exit', + \'out_cb': 'gutentags#default_io_cb', + \'err_cb': 'gutentags#default_io_cb', + \'stoponexit': 'term' + \} return l:job_opts endfunction diff -r 8e6156c4dff1 -r 425157bdd024 doc/gutentags.txt --- a/doc/gutentags.txt Sat Apr 21 01:38:39 2018 +0900 +++ b/doc/gutentags.txt Tue Jun 12 21:54:06 2018 -0700 @@ -629,6 +629,11 @@ generated code database to Vim by running `:cs add` (see |:cscope|). Defaults to 1. + +People using `cscope` or `gtags_cscope` across multiple projects in the same +Vim instance might be interested in the `gutentags_plus` plugin, which handles +switching databases automatically before performing a query. +See https://github.com/skywind3000/gutentags_plus. ============================================================================= 5. Project Settings *gutentags-project-settings* diff -r 8e6156c4dff1 -r 425157bdd024 plat/unix/update_tags.sh --- a/plat/unix/update_tags.sh Sat Apr 21 01:38:39 2018 +0900 +++ b/plat/unix/update_tags.sh Tue Jun 12 21:54:06 2018 -0700 @@ -117,6 +117,8 @@ done > "${TAGS_FILE}.files" fi CTAGS_ARGS="${CTAGS_ARGS} -L ${TAGS_FILE}.files" + # Clear project root if we have a file list + PROJECT_ROOT="" fi echo "Running ctags on whole project" echo "$CTAGS_EXE -f \"$TAGS_FILE.temp\" $CTAGS_ARGS \"$PROJECT_ROOT\"" diff -r 8e6156c4dff1 -r 425157bdd024 plat/win32/update_tags.cmd --- a/plat/win32/update_tags.cmd Sat Apr 21 01:38:39 2018 +0900 +++ b/plat/win32/update_tags.cmd Tue Jun 12 21:54:06 2018 -0700 @@ -106,7 +106,6 @@ ) ) if ["%INDEX_WHOLE_PROJECT%"]==["1"] ( - set CTAGS_ARGS=%CTAGS_ARGS% "%PROJECT_ROOT%" if not ["%FILE_LIST_CMD%"]==[""] ( echo Running custom file lister >> %LOG_FILE% set use_raw_list=0 @@ -124,6 +123,8 @@ for /F "usebackq delims=" %%F in (`%FILE_LIST_CMD%`) do @echo %PROJECT_ROOT%\%%F >> %TAGS_FILE%.files ) set CTAGS_ARGS=%CTAGS_ARGS% -L %TAGS_FILE%.files + ) else ( + set CTAGS_ARGS=%CTAGS_ARGS% "%PROJECT_ROOT%" ) )