From 7704018968e6783d526d6855a16ebac4a782438f Mon Sep 17 00:00:00 2001 From: Vinod Kurup Date: Sun, 8 Sep 2013 13:57:09 -0400 Subject: Find first numeral or minus sign, instead of blind move --- lisp/ledger-xact.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lisp/ledger-xact.el') diff --git a/lisp/ledger-xact.el b/lisp/ledger-xact.el index 9629dca0..e6269580 100644 --- a/lisp/ledger-xact.el +++ b/lisp/ledger-xact.el @@ -151,7 +151,8 @@ MOMENT is an encoded date" (re-search-forward ledger-iso-date-regexp) (replace-match date) (ledger-next-amount) - (forward-char 2))) + (if (re-search-forward "[-0-9]") + (goto-char (match-beginning 0))))) (defun ledger-delete-current-transaction (pos) "Delete the transaction surrounging point." -- cgit v1.2.3