aboutsummaryrefslogtreecommitdiffstats
path: root/autoload
diff options
context:
space:
mode:
authorJason Chu2016-11-07 06:21:37 +0000
committerJason Chu2016-11-07 06:27:21 +0000
commit8b48dce57cd6715da4c9890a88a222c948887803 (patch)
tree26eb8fcdb49f44bb1f9553912dc8e45699d0573d /autoload
parent1935bd1a60416da97b0f4a2e39f327496baa7421 (diff)
downloadvim-beancount-8b48dce57cd6715da4c9890a88a222c948887803.tar.gz
Fix off-by-one error in initial line matching
Diffstat (limited to 'autoload')
-rw-r--r--autoload/beancount.vim4
1 files changed, 2 insertions, 2 deletions
diff --git a/autoload/beancount.vim b/autoload/beancount.vim
index aea0a42..1f067b5 100644
--- a/autoload/beancount.vim
+++ b/autoload/beancount.vim
@@ -72,9 +72,9 @@ function! beancount#complete(findstart, base)
endif
endif
- let l:partial_line = strpart(getline("."), 0, getpos(".")[2])
+ let l:partial_line = strpart(getline("."), 0, getpos(".")[2]-1)
" Match directive types
- if l:partial_line =~# '^\d\d\d\d\(-\|/\)\d\d\1\d\d \S*$'
+ if l:partial_line =~# '^\d\d\d\d\(-\|/\)\d\d\1\d\d $'
return beancount#complete_basic(s:directives, a:base, '')
endif