diff options
author | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-04-17 20:32:51 +0200 |
---|---|---|
committer | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-04-17 20:32:51 +0200 |
commit | b9e06282c88ffc3f9d3d08292a31c3dd157fb149 (patch) | |
tree | b05228c083d4238ad178ddab0cdc0ba4cb1b3b08 | |
parent | 892eeff1a9b08caa00a1ec4bdbdd3fdc02a6a396 (diff) | |
parent | 98720451918cb33a345021ce0f1541acbb4c918b (diff) |
Merge branch 'develop'
-rw-r--r-- | lisp/mastodon-toot.el | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el index c2c391d..e7cf22c 100644 --- a/lisp/mastodon-toot.el +++ b/lisp/mastodon-toot.el @@ -996,7 +996,12 @@ If TAGS, we search for tags, else we search for handles." ;; only search when necessary: (completion-table-dynamic (lambda (_) - (mastodon-toot--fetch-completion-candidates start end))) + ;; Interruptible candidate computation + ;; suggestion from minad (d mendler), thanks! + (let ((result + (while-no-input + (mastodon-toot--fetch-completion-candidates start end)))) + (and (consp result) result)))) :exclusive 'no :annotation-function (lambda (candidate) @@ -1015,7 +1020,12 @@ If TAGS, we search for tags, else we search for handles." ;; only search when necessary: (completion-table-dynamic (lambda (_) - (mastodon-toot--fetch-completion-candidates start end :tags))) + ;; Interruptible candidate computation + ;; suggestion from minad (d mendler), thanks! + (let ((result + (while-no-input + (mastodon-toot--fetch-completion-candidates start end :tags)))) + (and (consp result) result)))) :exclusive 'no :annotation-function (lambda (candidate) |