Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added select-window-by-name command.

Differs from select-window in that it requires an exact match for the
window name.  This is useful if you use completion and have windows
whose names are a prefix of others.
  • Loading branch information...
commit 3d153bf9df2347e7eb92192f79967ba760651a77 1 parent e07cf3c
@dangerousben dangerousben authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 window.lisp
View
7 window.lisp
@@ -879,6 +879,13 @@ window. Default to the current window. if
(defcommand-alias select select-window)
+(defcommand select-window-by-name (name) ((:window-name "Select: "))
+ "Switch to the first window whose name is exactly @var{name}."
+ (let ((win (find name (group-windows (current-group))
+ :test #'string= :key #'window-name)))
+ (when win
+ (group-focus-window (current-group) win))))
+
(defcommand select-window-by-number (num &optional (group (current-group)))
((:window-number "Select: "))
"Find the window with the given number and focus it in its frame."
Please sign in to comment.
Something went wrong with that request. Please try again.