From f8c804ac79a94fc8fd4c168f5d884d42a7c0bd08 Mon Sep 17 00:00:00 2001 From: Johann Klähn Date: Wed, 8 Sep 2010 10:10:09 +0200 Subject: vim. allow use of 0 as timestamp To remove the effective date you would now call the function like this: call LedgerSetDate(line('.'), 'effective', -1) --- contrib/vim/ftplugin/ledger.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'contrib/vim/ftplugin/ledger.vim') diff --git a/contrib/vim/ftplugin/ledger.vim b/contrib/vim/ftplugin/ledger.vim index 1d624b14..ec1173b8 100644 --- a/contrib/vim/ftplugin/ledger.vim +++ b/contrib/vim/ftplugin/ledger.vim @@ -290,7 +290,7 @@ function! LedgerSetDate(lnum, type, ...) "{{{1 if a:type ==? 'actual' let date[0] = formatted elseif a:type ==? 'effective' - if time == 0 + if time < 0 " remove effective date let date = [date[0]] else -- cgit v1.2.3