Open christianbrugger opened 1 month ago
I'm wondering if you have solved this problem? I have the same problem.
@christianbrugger Have you solved this problem? I have the same problem.
@jutbin Thank you for confirming the issue.
I have not been able to resolve it. I think some change is necessary from WezTerm side.
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
20240719-081740-643d85f8
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 am using WezTerm with
bash.exe
provided by Git Bash. When resizing the window the bash prompt flicker and duplicate endlessly. The output buffer gets totally garbled. The problem starts at 0:12:https://github.com/user-attachments/assets/9e39999c-634d-47ee-9c5f-2e6acfd42e9f
To Reproduce
1) Install 64-bit Git for Windows Setup from https://git-scm.com/download/win I used Git version 2.45.2, which comes with bash version 5.2.26(1). 2) Extract Nightly Windows (zip): https://wezfurlong.org/wezterm/install/windows.html#installing-on-windows 3) Open PowerShell in extracted folder and run WezTerm with:
4) Run a command that has long output lines that need to be wrapped like
ls -la
in the home directory. 5) Resize the WezTerm window, such that the wrapping changes.At this point the command line should duplicate as in the video. Especially when increasing the size.
Configuration
WezTerm: no config / default Bash: no config / default
Expected Behavior
I expect the prompt to stay the same after resizing. Nothing should duplicate on resize.
Logs
Debug Overlay wezterm version: 20240719-081740-643d85f8 x86_64-pc-windows-msvc Window Environment: Windows Lua Version: Lua 5.4 OpenGL: NVIDIA GeForce RTX 3060 Laptop GPU/PCIe/SSE2 4.5.0 NVIDIA 555.99 Enter lua statements or expressions and hit Enter. Press ESC or CTRL-D to exit
Anything else?
I tested the above
bash.exe
with Mintty that comes with Git and Windows Terminal. They behave much better.Git Bash / Mintty Does preserve the command prompt perfectly. Although re-wrapping / reflowing the text on resize is not supported.
https://github.com/user-attachments/assets/ebc312d6-c090-44e5-bd4c-cb28eed7d5da
Windows Terminal Preview Does preserve the command line mostly. Sometimes there is some problem as well (0:17, 0:30), although more rare and less severe.
https://github.com/user-attachments/assets/50c6a3e7-cff7-4baa-b379-b3b060c7407f
Other things I tried
I tested WezTerm with
bash.exe
provided by Cygwin as well as MSYS2. All show the same behaviour.I changed the prompt to a single line
PS1="\u@\h:\w\$ "
. Still causes the same problem.I tried some
.bash_profile
settings likeshopt -s checkwinsize
to no success.I tried the shell integration script for bash and WezTerm. While semantic highlighting works, the resize problem remains the same.
I looked for settings that influence the wrapping behaviour or anything related, but couldn't find something that made a difference in behaviour.
Related Bug Reports
I looked at the related open bug reports regarding resizing:
https://github.com/wez/wezterm/issues/2987 Similar problem, but for resizing panes within WezTerm, not the window itself. Also seems to only happen for special prompts, while this here is for any prompt and is very easy to show.
https://github.com/wez/wezterm/issues/5100 Related to alternate mode / exiting vim. Here happens in normal mode.
https://github.com/wez/wezterm/issues/4265 Prompt misbehaves if window gets to thin to fit the prompt. Not the problem here.