From 47c17a943310805b9ff76875434036590df89145 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 17 Feb 2005 01:21:55 +0000 Subject: [PATCH] *** empty log message *** --- ledger.texi | 5 +++-- ledger.vim | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ledger.texi b/ledger.texi index 87684ff5..45f5e1ee 100644 --- a/ledger.texi +++ b/ledger.texi @@ -2716,8 +2716,9 @@ Relatedly, your Income accounts show up negative, because they transfer money @emph{from} an account in order to increase your assets. Your Expenses show up positive because that is where the money went to. The combined total of Income and Expenses is your cash -flow. A negative cash flow means you are spending more than you make. -To see your current cash flow, use this command: +flow. A positive cash flow means you are spending more than you make, +since income is always a negative figure. To see your current cash +flow, use this command: @example ledger balance ^income ^expenses diff --git a/ledger.vim b/ledger.vim index c817c752..36427528 100644 --- a/ledger.vim +++ b/ledger.vim @@ -24,9 +24,10 @@ highlight default link transDate Question " folding: how to represent a transaction in one line. function! MyFoldText() - let line = strpart(getline(v:foldstart), 0, 65) + " get the amount at the end of the second line let line2 = getline(v:foldstart+1) - let line2 = substitute(line2, ".* ", "", "") + let pos = match(line2, "[0-9.]*$") + let line2 = strpart(line2, pos) let pad_len = 80 - strlen(line) - strlen(line2) if (pad_len < 0) then pad_len = 0