[PATCH 1/3] select the last visited group after gdelete

Ali Gholami Rudi <[email protected]>
Newsgroups gmane.comp.window-managers.ratpoison.devel
Message-ID <[email protected]>
---
 src/group.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/group.c b/src/group.c
index e5d66f9..de8b9a6 100644
--- a/src/group.c
+++ b/src/group.c
@@ -546,7 +546,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));
-- 
1.6.0.2.307.gc427.dirty
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.