Fix navigate bug keeping prev-xact key binding from working.
This commit is contained in:
parent
6f3dad2024
commit
8a87fd1310
3 changed files with 7 additions and 6 deletions
|
|
@ -96,11 +96,11 @@
|
||||||
"Start a ledger session with the current month, but make it customizable to ease retro-entry.")
|
"Start a ledger session with the current month, but make it customizable to ease retro-entry.")
|
||||||
|
|
||||||
(defun ledger-read-account-with-prompt (prompt)
|
(defun ledger-read-account-with-prompt (prompt)
|
||||||
(let* ((context (ledger-context-at-point))
|
(let ((context (ledger-context-at-point)))
|
||||||
(default (if (eq (ledger-context-line-type context) 'acct-transaction)
|
(ledger-read-string-with-default prompt
|
||||||
(regexp-quote (ledger-context-field-value context 'account))
|
(if (eq (ledger-context-line-type context) 'acct-transaction)
|
||||||
nil)))
|
(regexp-quote (ledger-context-field-value context 'account))
|
||||||
(ledger-read-string-with-default prompt default)))
|
nil))))
|
||||||
|
|
||||||
(defun ledger-read-date (prompt)
|
(defun ledger-read-date (prompt)
|
||||||
"Returns user-supplied date after `PROMPT', defaults to today."
|
"Returns user-supplied date after `PROMPT', defaults to today."
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,7 @@ beginning with whitespace"
|
||||||
|
|
||||||
(defun ledger-navigate-prev-xact ()
|
(defun ledger-navigate-prev-xact ()
|
||||||
"Move point to beginning of previous xact."
|
"Move point to beginning of previous xact."
|
||||||
|
(interactive)
|
||||||
(ledger-navigate-beginning-of-xact)
|
(ledger-navigate-beginning-of-xact)
|
||||||
(re-search-backward ledger-xact-start-regex nil t))
|
(re-search-backward ledger-xact-start-regex nil t))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
(defun ledger-highlight-xact-under-point ()
|
(defun ledger-highlight-xact-under-point ()
|
||||||
"Move the highlight overlay to the current transaction."
|
"Move the highlight overlay to the current transaction."
|
||||||
(if ledger-highlight-xact-under-point
|
(if ledger-highlight-xact-under-point
|
||||||
(let ((exts (ledger-navigate-find-xact-extents (point)))
|
(let ((exts (ledger-navigate-find-element-extents (point)))
|
||||||
(ovl ledger-xact-highlight-overlay))
|
(ovl ledger-xact-highlight-overlay))
|
||||||
(if (not ledger-xact-highlight-overlay)
|
(if (not ledger-xact-highlight-overlay)
|
||||||
(setq ovl
|
(setq ovl
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue