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

Wezterm -> MUX -> tmux => garbled text #4041

Open
j-xella opened this issue Jul 21, 2023 · 3 comments
Open

Wezterm -> MUX -> tmux => garbled text #4041

j-xella opened this issue Jul 21, 2023 · 3 comments
Labels
bug Something isn't working multiplexer

Comments

@j-xella
Copy link

j-xella commented Jul 21, 2023

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 20230717-111633-94ab0496

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 run Wezterm on Windows, connecting to Ubuntu 20.4 server. Server connection details are stored in ssh config file. From there, I get into tmux session.

When I connect via ssh (wezterm-gui ssh myhost or wezterm-gui connect SSH:myhost), everything works fine.

When I connect via Wezterm MUX (wezterm-gui connect SSHMUX:myhost), I experience the following issues:

  1. Resizing wezterm window can break the display of the contents
  2. Tmux sessions are not displayed correctly

To Reproduce

To reproduce issue # 1 :

  1. After opening a session, in shell, produce many lines of text, way more than visible lines of the terminal. So that the cursor is comfortably at the bottom of the terminal window.
  2. Start resizing the terminal window. Make it bigger, stop. Make it smaller, stop. Repeat many times.
  3. In theory, the cursor should stay at the bottom of the terminal. But in practice, it may lag behind:
    • after increasing the terminal window, the bottom part of the window will be unused.
    • after decreasing the window, the cursor may be below the terminal window's bottom.

To reproduce issue # 2 :

See attached screencast.

wezterm-recording-ssh-135-63.cast.txt

This is how it looks when replayed in MUX session:

image

Configuration

config.ssh_domains = wezterm.default_ssh_domains()
for _,dom in ipairs(config.ssh_domains) do
  dom.assume_shell = 'Posix'
  dom.remote_wezterm_path = '/path/to/wezterm'
end

config.hide_tab_bar_if_only_one_tab = true
 
config.window_decorations = "INTEGRATED_BUTTONS|RESIZE"
 
config.window_frame = {
  border_left_width = 1,
  border_right_width = 1,
  border_bottom_height = 1,
  border_top_height = 1,
  border_left_color = 'silver',
  border_right_color = 'silver',
  border_bottom_color = 'silver',
  border_top_color = 'silver',
}
 
config.window_padding = {
  left = 3,
  -- right = 3,
  top = 3,
  bottom = 3,
}
 
config.enable_scroll_bar = true
-- How many lines of scrollback you want to retain per tab
config.scrollback_lines = 10000

Expected Behavior

Connecting via multiplexer works the same way as without it, in terms of displaying the session text.

Logs

No response

Anything else?

No response

@j-xella j-xella added the bug Something isn't working label Jul 21, 2023
@brandonchinn178
Copy link
Sponsor

+1. I'm working around this with set-option -g status-position top

@sedlund
Copy link

sedlund commented Jan 17, 2024

I think same thing when running btop in a bottom pane, and just pressing enter repeatedly on a zsh powerlevel10k prompt in the top pane. Moving the status bar to the top as mentioned above fixes it - if you can get used to it 🙃

wezterm-mux-tmux-statusline

Windows: wezterm 20230712-072601-f4abf8fd

@wez wez added the multiplexer label Feb 4, 2024
@pandada8
Copy link

Same on linux using MUX + tmux
I can reproduce the garbled text by keep pressing Enter only in the topmost pane. e.g. Pressing Enter in pane 2 don't generate garbled text

+------------+
|     1      |
+------------+
|     2      |
+------------+
|     3      |
+------------+

vertical split seems don't trigger the garbled text too (long pressing Enter in 1,2,3)

+---------+--------+
|         |        |
|      1  |        |
+---------+ 3      |
|      2  |        |
|         |        |
|         |        |
+---------+--------+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working multiplexer
Projects
None yet
Development

No branches or pull requests

5 participants