-
-
Notifications
You must be signed in to change notification settings - Fork 820
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
conpty: Images rendered by imgcat is cut off by cmd.exe or wsl prompts #3624
Comments
On Windows, ConPTY can swallow or re-order escape sequences that it doesn't understand in a number of situations.
What I suspect is happening here is that, because conpty doesn't understand the iterm2 image protocol, it doesn't know that the cursor position should have moved, and conpty decides to place the cursor position on the next line. See: https://wezfurlong.org/wezterm/what-is-a-terminal.html#windows-and-conpty for more information about conpty and how it fits into the architecture. I'd recommend bypassing conpty when using image protocols on windows and using |
Move the blob lease init into the common code, rather than just the bit that runs for the regular gui init. refs: #3624
Ah, yes; that's a bug that I have now fixed, and that will be available to download within the next hour or so. |
To clarify, that fix will be in a nightly download available from https://wezfurlong.org/wezterm/install/windows.html |
Neither of these understand image protocols, and both are an additional processing layer between the application and wezterm. This commit detects and wraps OSC sequences in tmux's passthru sequence so that the data is passed on to wezterm rather than elided from the data stream. For image protocols in both tmux and conpty, work a little smarter and explicitly move the cursor position to the same location that wezterm would move it to. That prevents the display from being as mangled by tmux/conpty due to a diverging understanding of the cursor position. The logic isn't perfect, and can result in the x-coordinate being incorrect, and this won't work with the new --position argument either in its current state, without adding a lot of complexity to deal with scrolling and relative and absolute positioning handling. To facilitate that, a new termwiz Terminal trait method has been added to probe the terminal name, version, cell and pixel dimensions. It's not pretty. refs: #3624 refs: #3716
@adelarsq I just pushed a commit that I think might help with the presentation you saw with clink. It typically takes about an hour before commits are available as nightly builds for all platforms. Please take a few moments to try out the fix and let me know how that works out. You can find the nightly downloads for your system in the wezterm installation docs. If you prefer to use packages provided by your distribution or package manager of choice and don't want to replace that with a nightly download, keep in mind that you can download portable packages (a |
@wez Thanks for looking into that. I did some tests with nightly. With clink/cmd shows the same behaviour: But there is some odd behaviour with PowerShell. Calling imgcat on the first line shows like this: Environment:
|
@adelarsq Thanks! Please confirm the wezterm version you're using; open the debug overlay (CTRL-SHIFT-L) and share the version info from there |
For pwsh, if you scroll up, does the scrollback look correct and fully intact? |
@wez I have confirmed that its working on my side, on both cmd and powershell. CMD: PowerShell: The reason for the bug was a missconfig on my side, with nightly and current conflicting each other. |
Thanks for confirming! Let's close this! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
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
20230424-110818-dc2cd706
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
It seems that in Windows,
wezterm imgcat
is cutoff by the prompt ofcmd.exe
or inwsl
.To Reproduce
On windows, open wezterm in
cmd.exe
orwsl
. Then runwezterm imgcat
on a relatively large image.Configuration
No config.
Expected Behavior
The prompt should be printed below the image instead of cutting it.
Logs
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: