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

Messed up layout after opening tabs in close succession #621

Closed
a-kenji opened this issue Jul 20, 2021 · 3 comments · Fixed by #634
Closed

Messed up layout after opening tabs in close succession #621

a-kenji opened this issue Jul 20, 2021 · 3 comments · Fixed by #634

Comments

@a-kenji
Copy link
Contributor

a-kenji commented Jul 20, 2021

After opening many tabs in succession the layout seems somewhat messed up, for certain tabs.

zellij --version: 15
tput lines: 120
tput cols: 31
uname -av: Linux ezra 5.10.48 144 SMP Wed Jul 7 12:27:50 UTC 2021 x86_64 GNU/Linux

Further information
alacritty --version: 0.8.0

Reproduce:

  • Open tabs in succession
        - action: [NewTab , NewTab , NewTab , NewTab , NewTab , NewTab , NewTab , NewTab , NewTab , NewTab , NewTab , NewTab , NewTab , NewTab , NewTab , NewTab , NewTab , NewTab , NewTab , NewTab , NewTab , NewTab , NewTab , NewTab , NewTab , NewTab , ]
          key: [F: 5,]

  • Select a tab with the artifacts (see screenshot)
  • Close pane in the tab

Screenshots:
image
image

Logs:
zellij-9.log
zellij-13.log
zellij-14.log
zellij-15.log
zellij-16.log
zellij-17.log
zellij-18.log
zellij-19.log
zellij-20.log
zellij-21.log
zellij-22.log
zellij-23.log
zellij-24.log
zellij-25.log
zellij-26.log
zellij-27.log
zellij-28.log
zellij-29.log
zellij-30.log

cc @imsnif

@a-kenji
Copy link
Contributor Author

a-kenji commented Jul 21, 2021

On my machine it seems waiting 250 milliseconds before opening a new Tab
fixes this issue most of the times.

@a-kenji a-kenji changed the title Messed up layout after closing panes Messed up layout after opening tabs in close succession Jul 21, 2021
a-kenji added a commit to a-kenji/zellij that referenced this issue Jul 23, 2021
fixes zellij-org#603, fixes zellij-org#349

* The layout has now a unique `tabs` section,
  that can be used, like the `parts` section,
  everything that is not inside the tabs section
  is assumed to be present on every single tab
  that is opened.

  This is a BREAKING CHANGE for people that use
  custom `layouts` already, since the `tabs` section
  is not optional - for clarity and intentionality reasons.

  The functionality to specify multiple tabs is already there,
  but is still gated behind a panic, until zellij-org#621 is fixed.
  So for now one tab can be specified to load on startup.

* The `NewTab` action can optionally be bound to open
  a layout that is assumed to be in the new `tabs` section

  This is a BREAKING CHANGE for people that have the
  `NewTab` action already bound in the config file:

```
- action: [NewTab, ]
  key: [F: 5,]
```
must now be specified as:
```
- action: [NewTab: ,]
  key: [F: 5,]
```
  Optionally a layout that should be opened on the new tab can be
  specified:
```
- action: [NewTab: {
  direction: Vertical,
  parts: [ {direction: Horizontal, split_size: {Percent: 50}}, {direction: Horizontal, run: {command: {cmd: "htop"}}},],
  key: [F: 6,]
```
or:
```
- action: [NewTab: {direction: Vertical, run: {command: {cmd: "htop"} }},]
  key: [F: 7,]
```
or
```
- action: [NewTab: {
  direction: Vertical,
  parts: [ {direction: Vertical, split_size: {Percent: 25},run: {plugin: "strider" }}, {direction: Horizontal}],}, MoveFocus: Left,]
  key: [F: 8,]

```
@a-kenji
Copy link
Contributor Author

a-kenji commented Jul 25, 2021

This only seems to happen on layouts that load plugins,
with solely normal panes I can't reproduce this issue.

cc @TheLostLambda, maybe you have more input here.

@imsnif
Copy link
Member

imsnif commented Jul 25, 2021

On my machine it seems waiting 250 milliseconds before opening a new Tab
fixes this issue most of the times.

Just my quick 2 cents: my gut tells me this is an atomicity issue that we can solve with CommandIsExecuting - but maybe I'm wrong here. Haven't looked deeply into this.

a-kenji added a commit to a-kenji/zellij that referenced this issue Jul 31, 2021
Fixes zellij-org#621

* `ScreenInstruction::SetSelectable` etc.
  were not updating correctly, if a NewTab was spawned, before
  the plugin was finished setting the attributes.

  Now the `tab_index` is used to send the instructions to
  their respective tabs and plugins.
a-kenji added a commit that referenced this issue Aug 1, 2021
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