stumpwm-devel
[Top][All Lists]
Advanced

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

[STUMP] [PATCH] Corrected a bug in program completion


From: Lionel Flandrin
Subject: [STUMP] [PATCH] Corrected a bug in program completion
Date: Mon, 28 Apr 2008 21:32:39 +0200

* When you wanted to complete a program name (for instance
  firef<TAB>), programs matching a substring could be globbed
  incorrectly (for instance fire). This commit fixes this.
---
 user.lisp |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/user.lisp b/user.lisp
index 4b3217e..1bd93e1 100644
--- a/user.lisp
+++ b/user.lisp
@@ -571,11 +571,11 @@ each directory seperated by a colon."
 with base. If @var{*program-list*} is nil, run @code{rehash} first."
   (or *program-list* (rehash))
   (remove-if-not #'(lambda (p)
-                    (string= base p
-                             :end1 (min (length base)
-                                        (length p))
-                             :end2 (min (length base)
-                                        (length p))))  *program-list*))
+                    (if (> (length base) (length p))
+                        '()
+                        (string= base p
+                             :end1 (length base)
+                             :end2 (length base))))  *program-list*))
 
 (defcommand run-shell-command (cmd &optional collect-output-p) ((:shell 
"/bin/sh -c "))
   "Run the specified shell command. If @var{collect-output-p} is @code{T}
-- 
1.5.5





reply via email to

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