aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Chu2016-11-13 22:20:21 +0000
committerJason Chu2016-11-13 22:20:21 +0000
commit2023c8bab6d345f9c4219cf6bd2fb1442f797763 (patch)
tree844a858f05a4ce217f9770795a1d5fdde4c5b203
parent60b5600e0d71d82aa1b1736b14167fc77482da02 (diff)
downloadvim-beancount-2023c8bab6d345f9c4219cf6bd2fb1442f797763.tar.gz
Add caching back to python3 autocomplete implementation
Diffstat (limited to '')
-rw-r--r--autoload/beancount.vim3
1 files changed, 2 insertions, 1 deletions
diff --git a/autoload/beancount.vim b/autoload/beancount.vim
index 3f3b930..9d18252 100644
--- a/autoload/beancount.vim
+++ b/autoload/beancount.vim
@@ -121,7 +121,7 @@ function! s:get_root()
endfunction
function! beancount#load_everything()
- if s:using_python3
+ if s:using_python3 && !exists('b:beancount_loaded')
let l:root = s:get_root()
python3 << EOF
import vim
@@ -159,6 +159,7 @@ vim.command('let b:beancount_events = [{}]'.format(','.join(repr(x) for x in sor
vim.command('let b:beancount_links = [{}]'.format(','.join(repr(x) for x in sorted(links))))
vim.command('let b:beancount_payees = [{}]'.format(','.join(repr(x) for x in sorted(payees))))
vim.command('let b:beancount_tags = [{}]'.format(','.join(repr(x) for x in sorted(tags))))
+vim.command('let b:beancount_loaded = v:true'.format(','.join(repr(x) for x in sorted(tags))))
EOF
endif
endfunction