aboutsummaryrefslogtreecommitdiffstats
path: root/autoload
diff options
context:
space:
mode:
authorPeter Odding <peter@peterodding.com>2014-06-29 19:55:07 +0200
committerPeter Odding <peter@peterodding.com>2014-06-29 19:55:07 +0200
commitc4feb0cd46d951d4cd9b0e03d1ec092ae4ab4bd8 (patch)
tree54c5c5f0e1b1825800aed5e86ee0dba1b7546ff4 /autoload
parent6c7a66349ec7c1c92cb5f77afd44330189815d46 (diff)
downloadvim-easytags-c4feb0cd46d951d4cd9b0e03d1ec092ae4ab4bd8.tar.gz
Disable automatic tags file updates during session loading
Diffstat (limited to 'autoload')
-rw-r--r--autoload/xolox/easytags.vim7
1 files changed, 6 insertions, 1 deletions
diff --git a/autoload/xolox/easytags.vim b/autoload/xolox/easytags.vim
index 9524570..6e38792 100644
--- a/autoload/xolox/easytags.vim
+++ b/autoload/xolox/easytags.vim
@@ -117,7 +117,8 @@ endfunction
function! xolox#easytags#autoload(event) " {{{2
try
- let do_update = xolox#misc#option#get('easytags_auto_update', 1)
+ let session_loading = xolox#easytags#session_is_loading() && a:event == 'BufReadPost'
+ let do_update = xolox#misc#option#get('easytags_auto_update', 1) && !session_loading
let do_highlight = xolox#misc#option#get('easytags_auto_highlight', 1) && &eventignore !~? '\<syntax\>'
" Don't execute this function for unsupported file types (doesn't load
" the list of file types if updates and highlighting are both disabled).
@@ -408,6 +409,10 @@ function! xolox#easytags#async_callback(response) " {{{2
endif
endfunction
+function! xolox#easytags#session_is_loading() " {{{2
+ return exists('g:SessionLoad')
+endfunction
+
function! xolox#easytags#disable_automatic_updates() " {{{2
let s:easytags_auto_update_save = xolox#misc#option#get('easytags_auto_update', 1)
let g:easytags_auto_update = 0