Close the non-last tab is very slow
What Operating System(s) are you seeing this problem on?
macOS
Which Wayland compositor or X11 Window manager(s) are you using?
No response
WezTerm version
wezterm 20240405-180910-cce0706b
Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?
Yes, and I updated the version box above to show the version of the nightly that I tried
Describe the bug
#5298 as this discuss described
To Reproduce
- create three tabs
- activate the first or second tab
- press cmd+w to close
Configuration
-- Pull in the wezterm API
local wezterm = require "wezterm"
-- This will hold the configuration.
local config = wezterm.config_builder()
local act = wezterm.action
config.hide_tab_bar_if_only_one_tab = true
-- This is where you actually apply your config choices
config.font = wezterm.font "Hack Nerd Font"
config.font_size = 14
-- 配色
config.color_scheme = "Dark+"
config.window_close_confirmation = "AlwaysPrompt"
config.skip_close_confirmation_for_processes_named = { }
-- 取消 Windows 原生标题栏
config.window_decorations = "INTEGRATED_BUTTONS|RESIZE"
config.window_frame = {
-- The size of the font in the tab bar.
-- Default to 10.0 on Windows but 12.0 on other systems
font_size = 12.0,
-- The overall background color of the tab bar when
-- the window is focused
active_titlebar_bg = "#000",
-- The overall background color of the tab bar when
-- the window is not focused
inactive_titlebar_bg = "#000",
}
config.keys = {
-- vim save key
{
key = "s",
mods = "CMD",
action = act.SendString ":w\n"
},
{
key = 'w',
mods = 'CMD',
action = act.CloseCurrentTab { confirm = true },
},
-- This will create a new split and run your default program inside it
{
key = 'n',
mods = 'ALT',
action = wezterm.action.SplitHorizontal
},
{
key = 'N',
mods = 'ALT',
action = wezterm.action.SplitVertical
},
{
key = "h",
mods = "ALT",
action = act.ActivatePaneDirection "Left",
},
{
key = "l",
mods = "ALT",
action = act.ActivatePaneDirection "Right",
},
{
key = "k",
mods = "ALT",
action = act.ActivatePaneDirection "Up",
},
{
key = "j",
mods = "ALT",
action = act.ActivatePaneDirection "Down",
},
}
config.ssh_domains = {
{
-- This name identifies the domain
name = "platform",
-- The hostname or address to connect to. Will be used to match settings
-- from your ssh config file
remote_address = "some ip",
-- The username to use on the remote host
username = "admin",
},
}
return config
Expected Behavior
close quickly
Logs
Debug Overlay wezterm version: 20240405-180910-cce0706b aarch64-apple-darwin Window Environment: macOS 12.6.1 (21G217) Lua Version: Lua 5.4 OpenGL: Apple M1 Pro 4.1 Metal - 76.3
Anything else?
No response
i will be grateful if someone who's familiar with the codebase points me the relevant code location
I did some research in the codebase and I found that hover on the tab bar with the mouse speeds up the closure of the tab, can't figure out why.
Hey @wez ,sorry to bother you, is this behavior intended?
It sounds like there's a missing ping/wakeup between the mux layer and the gui layer, so the tabs will look wrong until the next status update interval (default is 1 second).
Would you fix that? Or provide some instructions?
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.