diff options
author | Bernhard R. Link <brlink@debian.org> | 2012-06-30 15:03:45 +0200 |
---|---|---|
committer | Bernhard R. Link <brlink@debian.org> | 2012-07-01 13:40:19 +0200 |
commit | 0509e1dbde7b246e1bfec177ecb451e57bde8788 (patch) | |
tree | 71a79ed5a2ccac4b2efa18beec3cfa0939d28df3 /src | |
parent | c21c28d64b5495ec6534d24f5de5200a9e9a7fed (diff) | |
download | ratpoison-0509e1dbde7b246e1bfec177ecb451e57bde8788.zip |
cmd_info: also display a window not in the current group
Without this change, cmd_info displays "No Window" if called
with the current window not in the current group (for example
directly after a gselect).
This change makes it also look in other groups. In that case
it might show a number not the one to switch back to it without
switching the group first, but I guess that is less confusing
than just claiming there is no window.
Diffstat (limited to 'src')
-rw-r--r-- | src/actions.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/actions.c b/src/actions.c index b3baadb..bf381c8 100644 --- a/src/actions.c +++ b/src/actions.c @@ -4215,7 +4215,14 @@ cmd_info (int interactive UNUSED, struct cmdarg **args) win_elem = group_find_window (&rp_current_group->mapped_windows, win); if (!win_elem) win_elem = group_find_window (&rp_current_group->unmapped_windows, win); - + if (!win_elem) + { + rp_group *g = groups_find_group_by_window(win); + if (g != NULL) + win_elem = group_find_window (&g->mapped_windows, win); + if (!win_elem && g != NULL) + win_elem = group_find_window (&g->unmapped_windows, win); + } if (win_elem) { char *s; |