[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RP] [PATCH] cmd_info: also display a window not in the current group
From: |
Bernhard R. Link |
Subject: |
[RP] [PATCH] cmd_info: also display a window not in the current group |
Date: |
Sat, 30 Jun 2012 15:10:40 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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.
---
src/actions.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
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;
--
1.7.10
- [RP] [PATCH] cmd_info: also display a window not in the current group,
Bernhard R. Link <=