[emacs] When the first line is a txn, include it in ledger-sort-buffer
Without this fix, ledger-sort-region tends to skip the first transaction when sorting a region or the entire buffer.
This commit is contained in:
parent
7a0b004f9d
commit
c8dd5d4a0a
1 changed files with 2 additions and 0 deletions
|
|
@ -79,6 +79,8 @@
|
||||||
(goto-char beg)
|
(goto-char beg)
|
||||||
;; make sure point is at the beginning of a xact
|
;; make sure point is at the beginning of a xact
|
||||||
(ledger-navigate-next-xact)
|
(ledger-navigate-next-xact)
|
||||||
|
(unless (looking-at ledger-payee-any-status-regex)
|
||||||
|
(ledger-navigate-next-xact))
|
||||||
(setq new-beg (point))
|
(setq new-beg (point))
|
||||||
(goto-char end)
|
(goto-char end)
|
||||||
(ledger-navigate-next-xact)
|
(ledger-navigate-next-xact)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue