From 55d7e31784744151b63b3022ec604f45f3a221d1 Mon Sep 17 00:00:00 2001 From: Peter Odding Date: Sun, 29 Jun 2014 19:07:16 +0200 Subject: Silence asynchronous tags file updates by default This change is related to pull request #82 however that pull request wasn't merged here (and won't be merged at all) because it was based on the old/dead `async-cleanup' feature branch (see pull request #49 on GitHub) instead of the new `async-take-two' feature branch (see pull request #84 on GitHub). This change set implements the equivalent on the new feature branch. In addition to Ingo's comments in pull request #82, the asynchronous message frequently disturbs me while typing a Vim command, which is kind of annoying. If everything goes well and we can get the async mode to be stable enough to become the default mode then the status messages will only be interesting when debugging a problem anyway. --- autoload/xolox/easytags.vim | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'autoload') diff --git a/autoload/xolox/easytags.vim b/autoload/xolox/easytags.vim index 213175d..4de7b1f 100644 --- a/autoload/xolox/easytags.vim +++ b/autoload/xolox/easytags.vim @@ -1,6 +1,6 @@ " Vim script " Author: Peter Odding -" Last Change: June 22, 2014 +" Last Change: June 29, 2014 " URL: http://peterodding.com/code/vim/easytags/ let g:xolox#easytags#version = '3.5' @@ -425,7 +425,7 @@ endfunction " Miscellaneous script-local functions. {{{1 -function! s:report_results(response, async) " {{{1 +function! s:report_results(response, async) " {{{2 let actions = [] if a:response['num_updated'] > 0 call add(actions, printf('updated %i tags', a:response['num_updated'])) @@ -434,8 +434,10 @@ function! s:report_results(response, async) " {{{1 call add(actions, printf('filtered %i invalid tags', a:response['num_filtered'])) endif if !empty(actions) + let function = a:async ? 'xolox#misc#msg#debug' : 'xolox#misc#msg#info' let actions_string = xolox#misc#str#ucfirst(join(actions, ' and ')) - call xolox#misc#msg#info("easytags.vim %s: %s in %s (%s).", g:xolox#easytags#version, actions_string, a:response['elapsed_time'], a:async ? 'asynchronously' : 'synchronously') + let command_type = a:async ? 'asynchronously' : 'synchronously' + call call(function, ["easytags.vim %s: %s in %s (%s).", g:xolox#easytags#version, actions_string, a:response['elapsed_time'], command_type]) endif endfunction -- cgit v1.2.3