Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stack pane position not persisting when switching tabs #3006

Open
robbienohra opened this issue Dec 13, 2023 · 0 comments · May be fixed by #3795
Open

Stack pane position not persisting when switching tabs #3006

robbienohra opened this issue Dec 13, 2023 · 0 comments · May be fixed by #3795
Assignees

Comments

@robbienohra
Copy link

robbienohra commented Dec 13, 2023

Screen.Recording.2023-12-12.at.4.53.09.PM.mov

Issue description

Here is my layout config

layout {
	default_tab_template {
		pane size=1 borderless=true {
			plugin location="zellij:compact-bar"
		}
		children
	}

	swap_tiled_layout name="stack" {
		tab {
			pane stacked=true {
				pane
			}
		}
	}

	swap_tiled_layout name="tile" {
		tab {
		  pane
		}
	}
}

The issue I'm noticing is the following:

Suppose I'm focusing on pane 2 of tab 2 in a stacked view, I toggle to tab 1 and then toggle back to tab 2, the focus is on pane 1 and not on the original pane of focus (pre-tab-toggle). The expected behaviour would be that the focus remains on the originally focused pane in the stacked view after toggling between tabs.

Other relevant information

Attached a recording.

Also I have noted that this does not occur for the GoToTab action, or if I explicitly click on a tab, or if I go to next/previous tab in tab mode. It seems like it exclusively occurs for the MoveFocusOrTab action.

@robbienohra robbienohra changed the title Stack pane position persistence when switching tabs Stack pane position not persisting when switching tabs Dec 13, 2023
@imsnif imsnif self-assigned this Mar 13, 2024
Pyxels added a commit to Pyxels/zellij that referenced this issue Nov 21, 2024
When multiple Panes have the same x coord in a MoveTabOrFocus event that switches tabs, instead of picking the pane at the top to focus, choose the one biggest one. This ensures that in stacked layouts, the focused pane is opened again when moving, instead of always focusing the top pane.

closes zellij-org#3006
@Pyxels Pyxels linked a pull request Nov 21, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants