Open chtenb opened 2 years ago
Is there any chance we'll get a fix for this in the not-too-distant future? It's a pretty crucial bug as I sometimes miss lines in command output, which obviously is something that induces mistakes and slowdowns.
If there is anything I can do to help, provide more info etc, I'd be happy to do it!
I think it may be due to:
as this issue doesn't occur on other platforms.
Are you able to disable coloring of the output to see if the issue goes away? If so, then it adds weight to that theory.
Other things to look at to try to isolate this:
wezterm ssh
to connect to the same (presumably local?) host and see if the issue persists? (that removes ConPTY from the wezterm side, but depending on your ssh server, there may be a separate instance on the server side)It may also be useful to capture a session recording:
wezterm record
to start a recording session.exit
*** Finished recording to /var/tmp/wezterm-recording-sF6B3u.cast.txt
The file is an asciicast (compatible with https://asciinema.org/) and can also be replayed using wezterm replay
.
The terminal recording allows me to replicate what is being sent to the terminal without requiring me to install the same applications as you and replicate your configuration for everything.
wezterm-recording-vUPbou.cast.txt
Here is a cast of me reproducing the issue.
I noticed however when replaying it with wezterm replay
that I couldn't see the scroll actions being performed. But the issue is ONLY ever visible when I scroll up and notice that lines are missing there. Even though I have seen the missing lines pass by when they were still visible in the default viewport.
Okay, I was sure I tried reproducing this on other terminals without success before I created the issue here. But I just reproduced it on VSCode's integrated terminal using the same method. This adds more weight to your theory of it being an upstream issue.
What I don't understand though, is that those lines only disappear once they fall off the default viewport and you scroll up. I have limited knowledge about how terminal emulators work but I always thought the history/scroll feature was a emulator-specific implementation.
Simplifying your prompt printing setup.
Good call. I removed my starship configuration and after that I couldn't reproduce the issue anymore. Neither in VSCode and wezterm. I wonder what it is about starship that throws conpty off.
This looks like the same issue but it got closed: https://github.com/starship/starship/issues/4635
I think it may be due to: https://github.com/microsoft/terminal/issues/8698 as this issue doesn't occur on other platforms.
Is conpty also used when using WSL? I can reproduce the issue both on native windows and WSL.
So there is a workaround posted in the other thread which works for me. Feel free to close this issue if you want. Other people with the same issue can follow the instructions in the linked thread.
To reproduce:
wezterm -n
$ for i in (seq 1 30); echo $i $i; end
clear
History is not missing if we do not clear the screen.
To anyone who want to keep scrollback buffer after clear: https://github.com/fish-shell/fish-shell/issues/2855#issuecomment-201377349
What Operating System(s) are you seeing this problem on?
Windows
WezTerm version
wezterm 20220421-183827-26500c67
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
Let's print a list of numbers
Then scrolling up
there appear to be missing lines right at the edge of the screen
To Reproduce
No response
Configuration
no config
Expected Behavior
No response
Logs
15:15:09.359 INFO wezterm_client::discovery::windows > published gui path as gui-sock-23932 15:15:09.419 WARN window::os::windows::window > EGL init failed Config says to avoid EGL, fall back to WGL 15:15:09.687 INFO wezterm_gui::termwindow > OpenGL initialized! Quadro M2200/PCIe/SSE2 4.5.0 NVIDIA 472.91 is_context_loss_possible=true wezterm version: 20220421-183827-26500c67
Anything else?
No response