Fix a bug the caused reconciliation to lock up in an automatic transaction was followed immediately with a virtual transaction on the same account.

This was related to the navigation changes push a while back.
This commit is contained in:
Craig Earls 2014-11-14 17:22:04 -07:00
parent bd9fde2a40
commit 312b7ffa72
2 changed files with 3 additions and 3 deletions

View file

@ -65,7 +65,7 @@ beginning with whitespace"
(interactive) (interactive)
;; need to start at the beginning of a line incase we are in the first line of an xact already. ;; need to start at the beginning of a line incase we are in the first line of an xact already.
(beginning-of-line) (beginning-of-line)
(let ((sreg (concat "^\\(~\\|" ledger-iso-date-regexp "\\)"))) (let ((sreg (concat "^\\(=\\|~\\|" ledger-iso-date-regexp "\\)")))
(unless (looking-at sreg) (unless (looking-at sreg)
(re-search-backward sreg nil t) (re-search-backward sreg nil t)
(beginning-of-line))) (beginning-of-line)))
@ -152,7 +152,7 @@ Requires empty line separating xacts."
(save-excursion (save-excursion
(goto-char pos) (goto-char pos)
(beginning-of-line) (beginning-of-line)
(if (looking-at "[ ~0-9]") (if (looking-at "[ =~0-9]")
(ledger-navigate-find-xact-extents pos) (ledger-navigate-find-xact-extents pos)
(ledger-navigate-find-directive-extents pos)))) (ledger-navigate-find-directive-extents pos))))
;;; ledger-navigate.el ends here ;;; ledger-navigate.el ends here

View file

@ -160,7 +160,7 @@ Used for coordinating `ledger-occur' with other buffers, like reconcile."
(while (not (eobp)) (while (not (eobp))
;; if something found ;; if something found
(when (setq endpoint (re-search-forward regex nil 'end)) (when (setq endpoint (re-search-forward regex nil 'end))
(setq bounds (ledger-navigate-find-xact-extents endpoint)) (setq bounds (ledger-navigate-find-element-extents endpoint))
(push bounds lines) (push bounds lines)
;; move to the end of the xact, no need to search inside it more ;; move to the end of the xact, no need to search inside it more
(goto-char (cadr bounds)))) (goto-char (cadr bounds))))