summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAli Gholami Rudi <aliqrudi@gmail.com>2008-10-11 09:38:26 +0330
committerShawn <sabetts@juicebox.(none)>2008-10-12 17:11:55 -0700
commit098fc67c1a277286fc513ccb646e4054889063ab (patch)
treef4473b9ff5b39baa7142ee0358b8aea36ff7f058
parentda60eaebff265bafae3c7be1dee5a585ff3e2198 (diff)
downloadratpoison-098fc67c1a277286fc513ccb646e4054889063ab.zip
select the last visited group after gdelete
-rw-r--r--src/group.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/group.c b/src/group.c
index 069b677..7f29bd8 100644
--- a/src/group.c
+++ b/src/group.c
@@ -554,7 +554,8 @@ group_delete_group (rp_group *g)
/* we can safely delete the group */
if (g == rp_current_group)
{
- set_current_group_1 (group_next_group ());
+ rp_group *next = group_last_group ();
+ set_current_group_1 (next ? next : group_next_group ());
}
list_del (&(g->node));