diff options
author | Peter Odding <peter@peterodding.com> | 2014-06-29 19:54:08 +0200 |
---|---|---|
committer | Peter Odding <peter@peterodding.com> | 2014-06-29 19:54:08 +0200 |
commit | 6c7a66349ec7c1c92cb5f77afd44330189815d46 (patch) | |
tree | 6a1e555ba068be98f861793801e6e2b439c53226 /plugin | |
parent | 55d7e31784744151b63b3022ec604f45f3a221d1 (diff) | |
download | vim-easytags-6c7a66349ec7c1c92cb5f77afd44330189815d46.tar.gz |
Disable automatic tags file updates during :vimgrep
This change is related to pull request #83 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 (without introducing another option).
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/easytags.vim | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/plugin/easytags.vim b/plugin/easytags.vim index a20b85c..4da7962 100644 --- a/plugin/easytags.vim +++ b/plugin/easytags.vim @@ -1,6 +1,6 @@ " Vim plug-in " Author: Peter Odding <peter@peterodding.com> -" Last Change: June 22, 2014 +" Last Change: June 29, 2014 " URL: http://peterodding.com/code/vim/easytags/ " Requires: Exuberant Ctags (http://ctags.sf.net) @@ -122,6 +122,11 @@ augroup PluginEasyTags " After reloading a buffer the dynamic syntax highlighting is lost. The " following code makes sure the highlighting is refreshed afterwards. autocmd BufReadPost * unlet! b:easytags_last_highlighted + " During :vimgrep each searched buffer triggers an asynchronous tags file + " update resulting in races for the tags file. To avoid this we temporarily + " disable automatic tags file updates during :vimgrep. + "autocmd QuickFixCmdPre *vimgrep* call xolox#easytags#disable_automatic_updates() + "autocmd QuickFixCmdPost *vimgrep* call xolox#easytags#restore_automatic_updates() augroup END " Use vim-misc to register an event handler for Vim's CursorHold and |