QQxiaoming / quardCRT

Your All-in-One Tool for Terminal Emulation and Remote Desktop
https://quardcrt.rtfd.io
GNU General Public License v3.0
58 stars 6 forks source link

Cursor misalignment occurs in Windows LocalShell #39

Closed QQxiaoming closed 4 months ago

QQxiaoming commented 4 months ago

Adjusting the window size of the local terminal in Windows will cause the cursor position to be incorrect.

This issue may come from the reflow of the conpty,

refer to the following: https://github.com/microsoft/terminal/issues/16985 https://github.com/microsoft/terminal/issues/14291 https://github.com/microsoft/terminal/issues/1173

QuardCRT currently does not plan to support conpty‘s resize quirk. Waiting for the official support of passthrough may fundamentally solve this problem.

QQxiaoming commented 4 months ago

Now we can solve this problem by setting ResizeQuirk to false, but we need to check whether it will introduce other problems.

https://github.com/QQxiaoming/quardCRT/blob/723861569ff7c05d72c4deec8bf3fa64636c4636/lib/ptyqt/conptyprocess.cpp#L419-L432

QQxiaoming commented 4 months ago

After some testing, removing the "--resizeQuirk" setting has better display effects on PowerShell, SSH, and WSL than before. Although there are still some strange behaviors, they are completely consistent with the behavior of Microsoft Terminal, so this change is acceptable. We continue to look forward to further optimization of conpty by Microsoft in the future.