about summary refs log tree commit diff stats
diff options
context:
space:
mode:
author2014-01-21 19:18:00 +0100
committer2014-01-21 19:19:58 +0100
commit0214014fbedb905b5d09e2916e831d47f534d992 (patch)
tree6196a43d544985e61caebc8b28ba2f6b58c5db59
parente68297ed05c989f204a5e074e7528ee105067160 (diff)
downloadtabbed-0214014fbedb905b5d09e2916e831d47f534d992.tar.gz
-rw-r--r--tabbed.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tabbed.c b/tabbed.c
index 9405644..d30206b 100644
--- a/tabbed.c
+++ b/tabbed.c
@@ -1094,6 +1094,7 @@ unmanage(int c) {
 		} else if(lastsel > c) {
 			lastsel--;
 		}
+		lastsel = MIN(lastsel, nclients - 1);
 
 		if(c == sel) {
 			/* Note that focus() will never set lastsel == sel,