Fix issue in ledger-fully-complete-xact to deal with possible trailing spaces after a payee
This commit is contained in:
parent
3b5f496536
commit
aec2c7af3f
1 changed files with 13 additions and 8 deletions
|
|
@ -171,11 +171,16 @@ Return list."
|
||||||
(throw 'pcompleted t)))
|
(throw 'pcompleted t)))
|
||||||
(ledger-accounts)))))
|
(ledger-accounts)))))
|
||||||
|
|
||||||
|
(defun ledger-trim-trailing-whitespace (str)
|
||||||
|
(let ((s str))
|
||||||
|
(when (string-match "[ \t]*$" s)
|
||||||
|
(replace-match "" nil nil s))))
|
||||||
|
|
||||||
(defun ledger-fully-complete-xact ()
|
(defun ledger-fully-complete-xact ()
|
||||||
"Completes a transaction if there is another matching payee in the buffer.
|
"Completes a transaction if there is another matching payee in the buffer.
|
||||||
Does not use ledger xact"
|
Does not use ledger xact"
|
||||||
(interactive)
|
(interactive)
|
||||||
(let* ((name (caar (ledger-parse-arguments)))
|
(let* ((name (ledger-trim-trailing-whitespace (caar (ledger-parse-arguments))))
|
||||||
(rest-of-name name)
|
(rest-of-name name)
|
||||||
xacts)
|
xacts)
|
||||||
(save-excursion
|
(save-excursion
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue