From 96a22b457caff3a2413ce035690855863d1b94cd Mon Sep 17 00:00:00 2001 From: elviosak <33790211+elviosak@users.noreply.github.com> Date: Sun, 26 Apr 2026 08:47:26 -0300 Subject: [PATCH] add comment for "view_move_to_back()" --- src/action.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/action.c b/src/action.c index 67c7ffdd..820b9bb3 100644 --- a/src/action.c +++ b/src/action.c @@ -1150,6 +1150,15 @@ run_action(struct view *view, struct action *action, if (action_get_bool(action, "immediate", false)) { cycle_finish(true); if (view && dir == LAB_CYCLE_DIR_FORWARD) { + /* + * With immediate=no, running NextWindow just + * once places the previously selected view + * second from the top, causing the next call + * to select it again. For immediate=yes, to + * prevent getting stuck between the topmost + * two views, we move the previously selected + * view to the bottom. + */ view_move_to_back(view); } }