From d62b9dea3ec67221d2e2bcb3db397f1eed279c1a Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Sun, 15 Jan 2023 18:29:46 +0000 Subject: [PATCH] repair command completions --- command.fnl | 4 ++-- musing.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/command.fnl b/command.fnl index 620b88a..62d4f62 100644 --- a/command.fnl +++ b/command.fnl @@ -168,8 +168,8 @@ {:command nil} (set-completions - (collect [k _ (pairs commands)] - (if (= (k:find str 1 true) 1) (values k k))))))) + (icollect [k _ (pairs commands)] + (if (= (k:find str 1 true) 1) (completion { :text k}))))))) (fn activate [{: state : entry : prompt &as self}] (tset state :active true) diff --git a/musing.md b/musing.md index 070c055..0dc0455 100644 --- a/musing.md +++ b/musing.md @@ -65,6 +65,7 @@ focus from entry to step through the completions then RET activates * [done] display unbound key error * [done] back binding * [done] save url history, use it in completions +* [done] autocomplete command name * custom rendering for completions (e.g. buffer thumbnails) * less ugly default completions rendering @@ -74,7 +75,6 @@ focus from entry to step through the completions then RET activates * bind event to echo-area click, ideally dependent on what's being shown in there * in general, can we bind commands to widget events? -* autocomplete command name * command to create new buffer * keyboard navigation of completions