From 48866466141d1ad0874c676a251cee9d57d99fdb Mon Sep 17 00:00:00 2001 From: Johann Klähn Date: Wed, 15 Sep 2010 20:08:22 +0200 Subject: vim. fix off-by-one bug in ToggleTransactionState --- contrib/vim/ftplugin/ledger.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/vim/ftplugin/ledger.vim b/contrib/vim/ftplugin/ledger.vim index 326c6c72..2a0ce9eb 100644 --- a/contrib/vim/ftplugin/ledger.vim +++ b/contrib/vim/ftplugin/ledger.vim @@ -222,7 +222,7 @@ function! LedgerToggleTransactionState(lnum, ...) let old = has_key(trans, 'state') ? trans['state'] : ' ' let i = stridx(chars, old) + 1 - let new = chars[i > len(chars) ? 0 : i] + let new = chars[i >= len(chars) ? 0 : i] call trans.set_state(new) -- cgit v1.2.3