diff options
author | xentac | 2017-10-27 21:12:47 -0700 |
---|---|---|
committer | GitHub | 2017-10-27 21:12:47 -0700 |
commit | 8b8073706f800f10acc5e107fe2d77f68bcc3458 (patch) | |
tree | b47b82f0f78a4b530839e0d3bb90b45ca451b489 /autoload | |
parent | d4da66c61e8643c80245dcd63e7b33832aecaba7 (diff) | |
parent | 7db0d219e1bb2b1063a982b5cf6917502127c121 (diff) | |
download | vim-beancount-8b8073706f800f10acc5e107fe2d77f68bcc3458.tar.gz |
Merge pull request #42 from wzyboy/bugfix/support-plus-sign-before-numbers
Fix a regression bug in AlignCommodity
Diffstat (limited to '')
-rw-r--r-- | autoload/beancount.vim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/autoload/beancount.vim b/autoload/beancount.vim index 81067a3..c5d8f97 100644 --- a/autoload/beancount.vim +++ b/autoload/beancount.vim @@ -39,7 +39,7 @@ function! beancount#align_commodity(line1, line2) abort " Look for a minus sign and a number (possibly containing commas) and " align on the next column. - let l:separator = matchend(l:line, '^\v(-)?[,[:digit:]]+', l:begin_number) + 1 + let l:separator = matchend(l:line, '^\v([-+])?[,[:digit:]]+', l:begin_number) + 1 if l:separator < 0 | continue | endif let l:has_spaces = l:begin_number - l:end_account let l:need_spaces = g:beancount_separator_col - l:separator + l:has_spaces |