diff options
author | Craig Earls <enderw88@gmail.com> | 2014-11-07 18:56:11 -0700 |
---|---|---|
committer | Craig Earls <enderw88@gmail.com> | 2014-11-07 18:56:11 -0700 |
commit | 6f3dad2024bb33c13dbb029b2127e2a23da86e35 (patch) | |
tree | 959ea43d26a3f268d63b356f74bcb88de2674f05 | |
parent | af15887ecb32cdacea8a0a487f8b94dd81f98383 (diff) | |
download | fork-ledger-6f3dad2024bb33c13dbb029b2127e2a23da86e35.tar.gz fork-ledger-6f3dad2024bb33c13dbb029b2127e2a23da86e35.tar.bz2 fork-ledger-6f3dad2024bb33c13dbb029b2127e2a23da86e35.zip |
Detect the beginning of periodic transactions properly.
-rw-r--r-- | lisp/ledger-navigate.el | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/ledger-navigate.el b/lisp/ledger-navigate.el index 1843430a..2759d2df 100644 --- a/lisp/ledger-navigate.el +++ b/lisp/ledger-navigate.el @@ -64,9 +64,10 @@ beginning with whitespace" (interactive) ;; need to start at the beginning of a line incase we are in the first line of an xact already. (beginning-of-line) - (unless (looking-at ledger-xact-start-regex) - (re-search-backward ledger-xact-start-regex nil t) - (beginning-of-line)) + (let ((sreg (concat "\\(~\\|" ledger-iso-date-regexp "\\)"))) + (unless (looking-at sreg) + (re-search-backward sreg nil t) + (beginning-of-line))) (point)) (defun ledger-navigate-end-of-xact () @@ -104,7 +105,7 @@ Requires empty line separating xacts." (save-excursion (goto-char pos) (beginning-of-line) - (if (looking-at "[ 0-9]") + (if (looking-at "[ ~0-9]") (ledger-navigate-find-xact-extents pos) (ledger-navigate-find-directive-extents pos)))) ;;; ledger-navigate.el ends here |