summaryrefslogtreecommitdiff
path: root/contrib/vim/ftplugin
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/vim/ftplugin')
-rw-r--r--contrib/vim/ftplugin/ledger.vim7
1 files changed, 4 insertions, 3 deletions
diff --git a/contrib/vim/ftplugin/ledger.vim b/contrib/vim/ftplugin/ledger.vim
index 7c2c1d73..326c6c72 100644
--- a/contrib/vim/ftplugin/ledger.vim
+++ b/contrib/vim/ftplugin/ledger.vim
@@ -302,7 +302,6 @@ function! s:transaction.from_lnum(lnum) dict "{{{2
return {}
endif
- let description = []
for part in parts
if ! has_key(trans, 'date') && part =~ '^\d'
let trans['date'] = part
@@ -312,10 +311,12 @@ function! s:transaction.from_lnum(lnum) dict "{{{2
" the first character by itself is assumed to be the state of the transaction.
let trans['state'] = part
else
- call add(description, part)
+ " everything after date/code or state belongs to the description
+ break
endif
+ call remove(parts, 0)
endfor
- let trans['description'] = join(description)
+ let trans['description'] = join(parts)
return trans
endf "}}}