-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Rendering errors in tmux split panes #6987
Comments
I have observed the same. It worked well with the first official release and then broke in the first official update. I installed a preview release in which it was working, but also recently broke with an update. I was about to try and test all the recent releases to see where it does/does not work. I noticed an odd thing. If I launch WSL2 and get a tmux session running in an old working version of the official terminal, and then attach a broken version of the preview terminal to the same tmux session the display will remain correct in both terminals. However if I close both terminals and For now I've run out of time to try and track this down. |
Oh, I missed the close and start again comment. Maybe that is the factor that has made me think certain versions were fixed/broken and explains the render keeps working with both the preview and release versions. |
Observing identical problems with: |
First - very sorry that this got lost in the triage queue. Second - does this only repro in tmux 3.0a? Maybe they're using something new in 3.0 that we don't support quite yet? I'm sitting here on 18.04 with tmux 2.6 and I just can not repro this. Lemme pull a 20.04 and see if I can't get this to happen with an updated tmux. |
Alright other findings here
|
Alright last update: This has definitely got something to do with line wrapping. My gut thinks that this is related to #6901/#7028/#7253, but I can't be sure, since I can't get a solid repro right now. Take a look at this output copied from a broken tmux and a working one. They should both have the same contents in their panes: Note that the first one has all copied as one single wrapped line. I've also got the attached tracking of me opening tmux, making a [|] split, and running htop in it: There's nothing terribly out of the ordinary there. I split the pane around L958, and start htop around 2215. I'm gonna toss this on V2, and link it up with #5800. If anyone's got a way to more consistently repro this from a fresh WT window, that'd be much appreciated. Thanks all! |
Ho boy this looks awfully a lot like Tmux pane content gets garbled after refreshing tmux client #4029 |
Any updates on this? Having the exact same issue pretty consistently as well. Let me know if I can contribute to the troubleshooting process. |
I am having a slightly different problem, where the status bar for tmux should grow "taller" by duplicating itself. It also inserts a line with To note, all these problems go away should I stay with wsltty. |
@llinfeng there are so many different variables here. Are you using Windows Terminal or the original windows console? What version of Terminal? What version of Windows? |
I now attribute the "new variant " of rendering error to vim-prosession, a Vim-plugin. To be more specific, I was including an
Note, on the 2nd line, there was an For a good number of months, though, the |
Hi, got the same issue recently. Everything was working great all those months. |
I am running into this issue also. It seems to happen when I start my React applications in a tmux split pane and the start up script would automatically open up the React application in Edge. Switching context back into Windows Terminal and I can see this issue. I can fix it simply by closing the terminal, reopening it and re-attaching the running tmux session. Windows Terminal |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
I honestly don't really think there's anything in 1.16.3460 that would have fixed this.... I'd be excited to find out that it was fixed by chance. Maybe: okay 200 commits later and that looks like the only one that might affect this. But I'm pretty sure WSL wouldn't be invoking a |
This comment was marked as resolved.
This comment was marked as resolved.
So above works for me too!
Steps above are well aligned for my specific Alacritty setup which attaches to tmux when launched - via alias - and that also makes detaching quits the terminal. And after these steps, it stays fine even after a triggering action that breaks pane in the first place. A triggering action for me is the use of starship with zsh via toggleterm in neovim and this didn't happen with other platforms like macOS but only with WSL. (starship in tmux directly seems to be fine) This also happens with Alacritty (Windows native) as well as the windows Terminal app. Also when I see this issue with Tmux, I don't see that with Zellij (possibly because Zellij doesn't support passthrough yet). |
The original console output modes were considered attributes of the buffer, while later additions were treated as global state, and yet both were accessed via the same buffer-based API. This could result in the reported modes being out of sync with the way the system was actually behaving, and a call to `SetConsoleMode` without updating anything could still trigger unpredictable changes in behavior. This PR attempts to address that problem by making all modes part of the buffer state, and giving them predictable default values. While this won't solve all the tmux layout-breaking issues in #6987, it does at least fix one case which was the result of an unexpected change in the `DISABLE_NEWLINE_AUTO_RETURN` mode. All access to the output modes is now done via the `OutputMode` field in `SCREEN_INFORMATION`. The fields that were tracking global state in the `Settings` class (`_fAutoReturnOnNewline` and `_fRenderGridWorldwide`) have now been removed. We still have a global `_dwVirtTermLevel` field, though, but that now serves as a default value for the `ENABLE_VIRTUAL_TERMINAL_PROCESSING` mode when creating a new buffer. It's enabled for conpty mode, and when the VT level in the registry is not 0. That default doesn't change. For the VT alternate buffer, things works slightly differently, since there is an expectation that VT modes are global. So when creating an alt buffer, we copy the current modes from the main buffer, and when it's closed, we copy them back again. ## Validation Steps Performed I've manually confirmed that this fixes the problem described in issue #14690. I've also added a basic feature test that confirms the modes are initialized as expected when creating new buffers, and changes to the modes in one buffer do not impact any other buffers. Closes #14690
Also getting this issue when running any kind of terminal process. Whether using tmux or not. As soon as I have a terminal process running somewhere, glitches start showing up. The glitches take a while to creep in, but can be triggered instantly by opening a floating window in Vim: glitches.mp4 |
@j4james sure thing. Here is a video of a working terminal window becoming "corrupted", as well as the script as requested. glitches.mp4 |
@jradam Thanks for that script capture, but you need to run |
@j4james no problem, here's a video and scripts showing the complete flow. There are two scripts, as I ran it again for the new tmux window. I presume the first script would not capture what was happening in a new window. This was in a different directory, so the first script was not overwritten.
To recreate the issue, you have to use something like tmux (or in the case of my previous video, Neovim's built-in terminal) to run a process. In the video below I use tmux. You can see visual glitches start to appear in the numberline on the left once I start editing a file. When I do it through tmux, opening windows does not instantly cause glitches like in my previous video. But the glitches seem to be of the same type, and either way they slowly get worse over time and spread all over the window - until your code is illegible and you have to restart Windows Terminal. Hope this helps! more-glitches.mp4 |
@jradam That was perfect, thanks. This looks to me like the same problem as #14690. The In your case I'm assuming the mode change was triggered by yarn rather than wslsys (this would be an internal API call, so it's not something I can tell from the script log), but I'm hoping it will also be fixed by PR #14735. |
@j4james great! Hopefully that will sort it. Thanks James, looking forward to the next release then. |
"Redraw entire screen when display updates" was causing me a lot of issues with Tmux, Vim and React-Scripts (the start command). Disabled and everything is fine now. Windows 10 - Version 21H2 - OS Build 19044.2604 |
FWIW none of the above worked for me. What ended up doing the trick for me was setting
in my |
Environment
Steps to reproduce
Run
tmux
in Windows terminal WSL2 (Ubuntu), after a fresh boot into Windows.Create some horizontal split panes in
tmux
(works)Create some vertical split panes in
tmux
Run some commands with output (in some panes)
Oddly, the symptom disappears if I close and start Windows terminal again and re-attach to
tmux
.Expected behavior
Text output is clear and readable and output in their respective panes.
Actual behavior
The text output from different processes seems to bleed across panes.
This occurs with a vanilla/empty
tmux
config too.My
TERM
is set toxterm-256color
outside tmux andtmux-256color
in tmux.This behaviour also seems to happen in Alacritty (0.4.2), which in my understanding shares the same backend (
ConPTY
?) as Windows Terminal.The text was updated successfully, but these errors were encountered: