From 6ca54617ce1fe0ac4dbd8094e13b38a0aa375200 Mon Sep 17 00:00:00 2001
From: C. McEnroe
Date: Wed, 5 Feb 2020 22:25:34 -0500
Subject: Add /window name variant
---
command.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
(limited to 'command.c')
diff --git a/command.c b/command.c
index f9362dc..e4f035f 100644
--- a/command.c
+++ b/command.c
@@ -14,6 +14,7 @@
* along with this program. If not, see .
*/
+#include
#include
#include
@@ -64,8 +65,13 @@ static void commandQuit(size_t id, char *params) {
}
static void commandWindow(size_t id, char *params) {
- (void)id;
- if (params) uiShowNum(strtoul(params, NULL, 10));
+ if (!params) return;
+ if (isdigit(params[0])) {
+ uiShowNum(strtoul(params, NULL, 10));
+ } else {
+ id = idFind(params);
+ if (id) uiShowID(id);
+ }
}
static const struct Handler {
--
cgit 1.4.1-2-gfad0