-
What Operating System(s) are you running on?Windows Which Wayland compositor or X11 Window manager(s) are you using?komorebi WezTerm version20240203-110809-5046fc22 Ask your question!Actual questionIs there a way to set the padding to 0 only when I have neovim open in the active tab? BackgroundI often have neovim in one tab and a development server running in another. When Im in the neovim tab I want 0 padding, but when i go the powershell tab with my dev server running I want 8px padding. I've seen some gh issues mentioning the same, but the best solution I found was to use the "VimEnter" and "VimLeavePre" events to set change padding. The issue is that I often leave neovim running while i open another tab. Since I never left vim my padding is still set to zero. I've also tried using |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
You could try the approach I posted in #3839 (comment) |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot! I changed it a bit so the padding is 0 as long as one of the panes in the active tab has an alt screen active wezterm.on("update-status", function(window, _)
local tab = window:active_tab()
local panes = tab:panes()
local alt_screen_active = false
for i = 1, #panes, 1 do
local pane = panes[i]
if pane:is_alt_screen_active() then
alt_screen_active = true
break
end
end
if alt_screen_active then
window:set_config_overrides({
window_padding = { left = 0, right = 0, top = 0, bottom = 0 },
})
else
window:set_config_overrides({
window_padding = default_padding,
})
end
end) |
Beta Was this translation helpful? Give feedback.
Thanks a lot! I changed it a bit so the padding is 0 as long as one of the panes in the active tab has an alt screen active