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)))
|
||||
(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 ()
|
||||
"Completes a transaction if there is another matching payee in the buffer.
|
||||
Does not use ledger xact"
|
||||
(interactive)
|
||||
(let* ((name (caar (ledger-parse-arguments)))
|
||||
(let* ((name (ledger-trim-trailing-whitespace (caar (ledger-parse-arguments))))
|
||||
(rest-of-name name)
|
||||
xacts)
|
||||
(save-excursion
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue