# HG changeset patch # User Ludovic Chabant # Date 1458963698 25200 # Node ID df3b0ca480139292e5a6524d264889cc045d0a07 # Parent 563fbba4328802eff7d37aa14e6dfa680da73627# Parent be8d47e88ab11603d24351b116f0201cc32de05c Merge pull request #64 from GitHub. diff -r be8d47e88ab1 -r df3b0ca48013 autoload/gutentags.vim --- a/autoload/gutentags.vim Thu Feb 25 02:02:03 2016 +0300 +++ b/autoload/gutentags.vim Fri Mar 25 20:41:38 2016 -0700 @@ -262,6 +262,7 @@ for module in g:gutentags_modules call s:update_tags(module, a:bang, 0) endfor + silent doautocmd User GutentagsUpdated endfunction " (Re)Generate the tags file for a buffer that just go saved. @@ -271,6 +272,7 @@ call s:update_tags(module, 0, 2) endfor endif + silent doautocmd User GutentagsUpdated endfunction " Update the tags file for the current buffer's file. diff -r be8d47e88ab1 -r df3b0ca48013 autoload/gutentags/ctags.vim --- a/autoload/gutentags/ctags.vim Thu Feb 25 02:02:03 2016 +0300 +++ b/autoload/gutentags/ctags.vim Fri Mar 25 20:41:38 2016 -0700 @@ -199,13 +199,27 @@ let l:lines = readfile(a:path) let l:outlines = [] for line in l:lines - let l:exarg = matchend(line, '\v^\-\-exclude=') - if l:exarg < 0 + let l:exarg_idx = matchend(line, '\v^\-\-exclude=') + if l:exarg_idx < 0 call add(l:outlines, line) continue endif - let l:fullp = gutentags#normalizepath(l:proj_dir.'/'. - \strpart(line, l:exarg + 1)) + + " Don't convert things that don't look like paths. + let l:exarg = strpart(line, l:exarg_idx + 1) + let l:do_convert = 1 + if l:exarg[0] == '@' " Manifest file path + let l:do_convert = 0 + endif + if stridx(l:exarg, '/') < 0 && stridx(l:exarg, '\\') < 0 " Filename + let l:do_convert = 0 + endif + if l:do_convert == 0 + call add(l:outlines, line) + continue + endif + + let l:fullp = l:proj_dir . gutentags#normalizepath('/'.l:exarg) let l:ol = '--exclude='.l:fullp call add(l:outlines, l:ol) endfor diff -r be8d47e88ab1 -r df3b0ca48013 plat/unix/update_scopedb.sh --- a/plat/unix/update_scopedb.sh Thu Feb 25 02:02:03 2016 +0300 +++ b/plat/unix/update_scopedb.sh Fri Mar 25 20:41:38 2016 -0700 @@ -47,7 +47,7 @@ echo $$ > "$DB_FILE.lock" # Remove lock and temp file if script is stopped unexpectedly. -trap "rm -f \"$DB_FILE.lock\" \"$DB_FILE.temp\"" 0 3 4 15 +trap 'rm -f "$DB_FILE.lock" "$DB_FILE.temp"' INT QUIT TERM EXIT PREVIOUS_DIR=$(pwd) if [ -d "$PROJECT_ROOT" ]; then diff -r be8d47e88ab1 -r df3b0ca48013 plat/unix/update_tags.sh --- a/plat/unix/update_tags.sh Thu Feb 25 02:02:03 2016 +0300 +++ b/plat/unix/update_tags.sh Fri Mar 25 20:41:38 2016 -0700 @@ -20,14 +20,14 @@ echo " -p [dir=]: The path to the project root" echo " -s [file=]: The path to the source file that needs updating" echo " -x [pattern=]: A pattern of files to exclude" - echo " -o [options=]: An options file to read additional options from" + echo " -o [options=]: An options file to read additional options from" echo " -c: Ask for confirmation before exiting" echo "" } while getopts "h?e:x:t:p:s:o:c" opt; do - case $opt in + case $opt in h|\?) ShowUsage exit 0 @@ -67,13 +67,13 @@ echo $$ > "$TAGS_FILE.lock" # Remove lock and temp file if script is stopped unexpectedly. -trap "errorcode=$?; rm -f \"$TAGS_FILE.lock\" \"$TAGS_FILE.temp\"; exit $errorcode" INT TERM EXIT +trap 'errorcode=$?; rm -f "$TAGS_FILE.lock" "$TAGS_FILE.temp"; exit $errorcode' INT QUIT TERM EXIT INDEX_WHOLE_PROJECT=1 if [ -f "$TAGS_FILE" ]; then if [ "$UPDATED_SOURCE" != "" ]; then echo "Removing references to: $UPDATED_SOURCE" - echo "grep -v "$UPDATED_SOURCE" \"$TAGS_FILE\" > \"$TAGS_FILE.temp\"" + echo "grep -v \"$UPDATED_SOURCE\" \"$TAGS_FILE\" > \"$TAGS_FILE.temp\"" grep -v "$UPDATED_SOURCE" "$TAGS_FILE" > "$TAGS_FILE.temp" INDEX_WHOLE_PROJECT=0 fi @@ -99,6 +99,6 @@ echo "Done." if [ $PAUSE_BEFORE_EXIT -eq 1 ]; then - read -p "Press ENTER to exit..." + printf "Press ENTER to exit..." + read -r fi -