diff options
author | Steve Purcell <steve@sanityinc.com> | 2014-12-09 14:40:39 +0000 |
---|---|---|
committer | Steve Purcell <steve@sanityinc.com> | 2014-12-09 14:40:39 +0000 |
commit | c8dd5d4a0a88b22e9923ac2b5746a1812386a848 (patch) | |
tree | 371b4d89ed32f391875b1e3a478b4538e933fc84 /lisp/ledger-sort.el | |
parent | 7a0b004f9d1f6dbdc93fef872bf8b5eb1fe794cd (diff) | |
download | fork-ledger-c8dd5d4a0a88b22e9923ac2b5746a1812386a848.tar.gz fork-ledger-c8dd5d4a0a88b22e9923ac2b5746a1812386a848.tar.bz2 fork-ledger-c8dd5d4a0a88b22e9923ac2b5746a1812386a848.zip |
[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.
Diffstat (limited to 'lisp/ledger-sort.el')
-rw-r--r-- | lisp/ledger-sort.el | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/ledger-sort.el b/lisp/ledger-sort.el index 534d3b24..23cfbae9 100644 --- a/lisp/ledger-sort.el +++ b/lisp/ledger-sort.el @@ -79,6 +79,8 @@ (goto-char beg) ;; make sure point is at the beginning of a xact (ledger-navigate-next-xact) + (unless (looking-at ledger-payee-any-status-regex) + (ledger-navigate-next-xact)) (setq new-beg (point)) (goto-char end) (ledger-navigate-next-xact) |