about summary refs log tree commit diff stats
path: root/cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd.c')
-rw-r--r--cmd.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/cmd.c b/cmd.c
index c14c3e6..baa3ae9 100644
--- a/cmd.c
+++ b/cmd.c
@@ -23,16 +23,18 @@ void
 sel(void *aux)
 {
 	const char *arg = aux;
-	Client *c;
+	Client *c = NULL;
 
 	if(!arg || !stack)
 		return;
 	if(!strncmp(arg, "next", 5))
-		focus(stack->snext ? stack->snext : stack);
-	else if(!strncmp(arg, "prev", 5)) {
+		c = stack->snext ? stack->snext : stack;
+	else if(!strncmp(arg, "prev", 5))
 		for(c = stack; c && c->snext; c = c->snext);
-		focus(c ? c : stack);
-	}
+	if(!c)
+		c = stack;
+	raise(c);
+	focus(c);
 }
 
 void
t;dickey@invisible-island.net> 2014-01-09 00:29:11 -0500 committer Thomas E. Dickey <dickey@invisible-island.net> 2014-01-09 00:29:11 -0500 snapshot of project "lynx", label v2-8-8pre_2a' href='/ingrix/lynx-snapshots/commit/lynx_help/keystrokes/xterm_help.html?id=7c7d8c9582cea3ed0ff52f6e7d212fa85b3cd75f'>7c7d8c95 ^
bc0fa578 ^

7c7d8c95 ^
bc0fa578 ^


























1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45