vim. fix off-by-one bug in ToggleTransactionState

This commit is contained in:
Johann Klähn 2010-09-15 20:08:22 +02:00
parent 453327a180
commit 4886646614

View file

@ -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)