From d58dbbe75813e341f8897006e032ee9310009fc3 Mon Sep 17 00:00:00 2001 From: Matt Spear Date: Thu, 26 May 2011 20:14:23 -0700 Subject: [PATCH] change the window-number algorithm --- command.lisp | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/command.lisp b/command.lisp index 85d6b61..b621b1d 100644 --- a/command.lisp +++ b/command.lisp @@ -348,10 +348,12 @@ then describes the symbol." (mapcar 'window-map-number (group-windows (current-group))))))) (when n - (let ((indx (position (elt n 0) *window-number-map*))) - (if indx - indx - (throw 'error (format NIL "Invalid window index: ~A" n))))))) + (let ((win (find n (group-windows (current-group)) + :test #'string= + :key (lambda (w) (princ-to-string (window-map-number w)))))) + (if win + (window-number win) + (throw 'error "No Such Window.")))))) (define-stumpwm-type :number (input prompt) (let ((n (or (argument-pop input) -- 1.7.4.1