branch: externals/minuet commit 86998b748262f0a2edce792adbce56b2c52037e5 Author: Milan Glacier <d...@milanglacier.com> Commit: Milan Glacier <d...@milanglacier.com>
fix: don't show "(1/1)" when there is only 1 available suggestion. --- minuet.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/minuet.el b/minuet.el index 111392c8d1..f73aceef74 100644 --- a/minuet.el +++ b/minuet.el @@ -407,11 +407,12 @@ Also cancel any pending requests unless NO-CANCEL is t." minuet--current-suggestion-index index minuet--last-point (point)) (overlay-put ov 'after-string - (propertize (format "%s (%d/%d)" - suggestion - (1+ index) - total) - 'face 'minuet-suggestion-face)) + (propertize + (format "%s%s" + suggestion + (if (= total minuet-n-completions 1) "" + (format " (%d/%d)" (1+ index) total))) + 'face 'minuet-suggestion-face)) (overlay-put ov 'minuet t) (setq minuet--current-overlay ov) (minuet-active-mode 1)))