wez / wezterm

A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
https://wezfurlong.org/wezterm/
Other
18.06k stars 807 forks source link

ssh causes issues with TUI apps drawing correctly #5491

Open ferdinandyb opened 6 months ago

ferdinandyb commented 6 months ago

What Operating System(s) are you seeing this problem on?

Windows

Which Wayland compositor or X11 Window manager(s) are you using?

No response

WezTerm version

wezterm 20240520-135708-b8f94c47

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

I've been seeing various drawing issues over ssh, when connecting to WSL:

This is what happens if I use an ssh domain to connect or plain ssh, it starts broken with things not being where they are shown, and seems to figure itself out with a resize. I also saw the aerc in-built terminal not being able to clear the screen when I initially opened it, which may or may not be related.

https://github.com/wez/wezterm/assets/6343487/7c50a49d-2e2c-4280-a5c5-cff7f9525bf4

This is how it looks without ssh:

https://github.com/wez/wezterm/assets/6343487/18f411a2-bfb9-4ddc-999c-aa7788d29b74

To Reproduce

No response

Configuration

I doubt I have anything relevant, but here's my entire config: https://github.com/ferdinandyb/dotfiles/blob/master/.config/wezterm/wezterm.lua

Expected Behavior

No response

Logs

Debug Overlay wezterm version: 20240520-135708-b8f94c47 x86_64-pc-windows-msvc Window Environment: Windows Lua Version: Lua 5.4 OpenGL: AMD Radeon(TM) Graphics 4.5.0 Core Profile Context 23.10.24.05.230830 Enter lua statements or expressions and hit Enter. Press ESC or CTRL-D to exit 14:59:08.858 ERROR wezterm_client::client > ssh stderr: 14:59:08.857 WARN wezterm_client::client > While connecting to Socket("/run/user/1000/wezterm/sock"): connecting to /run/user/1000/wezterm/sock. Will try spawning the server. 14:59:08.857 WARN wezterm_client::client > Running: "/usr/bin/wezterm-mux-server" "--daemonize"

Anything else?

No response

ferdinandyb commented 6 months ago

Hmm, I can basically repro the same thing on linux, with a non-full screen wezterm. Note that other terminals don't do this, so it's not an issue with vim.

AeliusSaionji commented 5 months ago

I'm having issues over ssh as well, and this did not used to be the case.

Senpai (irc client) and aerc are the current troublemakers for me.

Running said programs within tmux fixes the output- a temporary solution as I prefer to stick with the wezterm mux.

tekhnus commented 2 months ago

I also occasionally experience similar drawing issues when using helix editor in an sshmux tab. The screen gets corrupted, it looks like not all drawing commands are applied. Helix's :redraw command fixes those. In my case, unfortunately, the issue doesn't seem to be reproducible