Detect the beginning of periodic transactions properly.
This commit is contained in:
parent
af15887ecb
commit
6f3dad2024
1 changed files with 5 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue