Fix payees and accounts matching to themselves
This would sometimes cause a double tab to be necessary for completion, although did also provide an accidental "feature" that repeated tabs would cycle all the way back to the original input
This commit is contained in:
parent
2c07d4152a
commit
a052898b60
1 changed files with 56 additions and 52 deletions
|
|
@ -124,6 +124,7 @@ Return list."
|
||||||
root (cdr xact))
|
root (cdr xact))
|
||||||
(setq root nil elements nil)))
|
(setq root nil elements nil)))
|
||||||
(setq elements (cdr elements)))
|
(setq elements (cdr elements)))
|
||||||
|
(setq root (delete (list (car elements) t) root))
|
||||||
(and root
|
(and root
|
||||||
(sort
|
(sort
|
||||||
(mapcar (function
|
(mapcar (function
|
||||||
|
|
@ -144,9 +145,12 @@ Return list."
|
||||||
(if (eq (save-excursion
|
(if (eq (save-excursion
|
||||||
(ledger-thing-at-point)) 'transaction)
|
(ledger-thing-at-point)) 'transaction)
|
||||||
(if (null current-prefix-arg)
|
(if (null current-prefix-arg)
|
||||||
(ledger-payees-in-buffer) ;; this completes against payee names
|
(delete
|
||||||
|
(caar (ledger-parse-arguments))
|
||||||
|
(ledger-payees-in-buffer)) ;; this completes against payee names
|
||||||
(progn
|
(progn
|
||||||
(let ((text (buffer-substring-no-properties (line-beginning-position)
|
(let ((text (buffer-substring-no-properties
|
||||||
|
(line-beginning-position)
|
||||||
(line-end-position))))
|
(line-end-position))))
|
||||||
(delete-region (line-beginning-position)
|
(delete-region (line-beginning-position)
|
||||||
(line-end-position))
|
(line-end-position))
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue