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

Closing the last pane in the second tab crashes wezterm #890

Closed
ModProg opened this issue Jun 19, 2021 · 4 comments
Closed

Closing the last pane in the second tab crashes wezterm #890

ModProg opened this issue Jun 19, 2021 · 4 comments
Labels
bug Something isn't working fixed-in-nightly This is (or is assumed to be) fixed in the nightly builds.

Comments

@ModProg
Copy link
Contributor

ModProg commented Jun 19, 2021

Describe the bug

When closing the last pane in a tab other than the first one, e.g. with:

    {key="q", mods="CTRL", action=wezterm.action{
      CloseCurrentPane={confirm=false}
    }},

Wezterm closes without actually exiting, and without any error message.

Environment (please complete the following information):

  • OS: Linux Wayland
  • Version: wezterm 20210617-233305-618f77f2
  • DE

To Reproduce

  • Open a new Tab
  • Press "CTRL+q"
  • Enjoy

Configuration

local wezterm = require 'wezterm';
return {
  keys = {
    {key="q", mods="CTRL", action=wezterm.action{
      CloseCurrentPane={confirm=false}
    }},
  }
}

Expected behavior

It should only close the currently opened tab

@ModProg ModProg added the bug Something isn't working label Jun 19, 2021
@wez
Copy link
Owner

wez commented Jun 19, 2021

What does wezterm log to stderr when this happens?

@ModProg
Copy link
Contributor Author

ModProg commented Jun 19, 2021

What does wezterm log to stderr when this happens?

Nothing:

❯ wezterm
 2021-06-19T16:48:00.553Z INFO  wezterm_mux_server_impl::local
> setting up /run/user/1000/wezterm/gui-sock-58943
 2021-06-19T16:48:00.624Z INFO  wezterm_gui::termwindow
> OpenGL initialized! Mesa Intel(R) UHD Graphics 620 (KBL GT2)
OpenGL ES 3.2 Mesa 21.1.1 is_context_loss_possible=false wezterm version: 20210617-233305-618f77f2
^C⏎
~ took 15s
❯

@wez
Copy link
Owner

wez commented Jun 19, 2021

Interesting: it's not crashing (it's still running), but the window gets closed

wez added a commit that referenced this issue Jun 19, 2021
The issue is that the pane was only removed from the tab when explicitly
closed, leaving it to be later detected and flushed.

However, in the meantime, when performing eg: cursor blink maintenance,
if the set of panes in the tab is empty then the window would close.

The resolution is to ask the mux (rather than the tab) to kill the pane,
so that the cascading closure of the tab causes the window's active
tab to reference the correct remaining tab.

refs: #890
@wez wez added the fixed-in-nightly This is (or is assumed to be) fixed in the nightly builds. label Jun 19, 2021
@wez wez closed this as completed Jun 19, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2023

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working fixed-in-nightly This is (or is assumed to be) fixed in the nightly builds.
Projects
None yet
Development

No branches or pull requests

2 participants