branch: externals/cursory
commit bd7aa2a6e5cd6e360b4da3405c19c3e103577748
Author: Protesilaos Stavrou <i...@protesilaos.com>
Commit: Protesilaos Stavrou <i...@protesilaos.com>

    Do not complete if only 1 preset is set
    
    Just apply the preset directly.
---
 cursory.el | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/cursory.el b/cursory.el
index 23928c5f4d..2f0f75808c 100644
--- a/cursory.el
+++ b/cursory.el
@@ -132,7 +132,12 @@ STYLE is a symbol that represents the car of a list in
 
 With optional LOCAL as a prefix argument, set the
 `cursory-presets' only for the current buffer."
-  (interactive (list (cursory--set-cursor-prompt) current-prefix-arg))
+  (interactive
+   (list
+    (if (= (length cursory-presets) 1)
+        (caar cursory-presets)
+      (cursory--set-cursor-prompt))
+    current-prefix-arg))
   (when-let* ((styles (if (stringp style) (intern style) style))
               (properties (alist-get styles cursory-presets))
               (type (plist-get properties :cursor-type))

Reply via email to