stumpwm-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[STUMP] [PATCH] Don't call string-trim in completing-read if the result


From: Ben Spencer
Subject: [STUMP] [PATCH] Don't call string-trim in completing-read if the result is nil.
Date: Sun, 25 Oct 2009 13:57:18 +0000
User-agent: Mutt/1.5.20 (2009-06-14)

This fixes the annoying 'Command 'NIL' not found' message when you
abort entering a command at the C-t ; prompt with C-g.
---
 input.lisp |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/input.lisp b/input.lisp
index 989dbbb..b12ae09 100644
--- a/input.lisp
+++ b/input.lisp
@@ -190,7 +190,8 @@ to return a list of matches."
   (let ((*input-completions* completions)
         (*input-current-completions* nil)
         (*input-current-completions-idx* nil))
-    (string-trim " " (read-one-line screen prompt initial-input))))
+    (let ((line (read-one-line screen prompt initial-input)))
+      (when line (string-trim " " line)))))
 
 (defun read-one-line (screen prompt &optional (initial-input ""))
   "Read a line of input through stumpwm and return it. returns nil if the user 
aborted."
-- 
1.6.5





reply via email to

[Prev in Thread] Current Thread [Next in Thread]