about summary refs log tree commit diff stats
diff options
context:
space:
mode:
author2014-01-26 18:48:52 +0100
committer2014-01-26 18:48:52 +0100
commit4b2dfb110f4c2698ab27ea6ad2f6f2e914631b9f (patch)
tree3d3373f69de6a4a3dd435e7b33068a7463ea38a6
parent0120447e0417e9f52b5c2ae081f07f922a2ea9c2 (diff)
downloadtabbed-4b2dfb110f4c2698ab27ea6ad2f6f2e914631b9f.tar.gz
-rw-r--r--tabbed.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tabbed.c b/tabbed.c
index 93a213a..5bc2b53 100644
--- a/tabbed.c
+++ b/tabbed.c
@@ -1089,8 +1089,8 @@ unmanage(int c) {
 			spawn(NULL);
 		}
 	} else {
-		if(c == lastsel) {
-			lastsel = -1;
+		if(c && lastsel >= nclients) {
+			lastsel = nclients - 1;
 		} else if(lastsel > c) {
 			lastsel--;
 		}