A patch for handling ambiguous width characters in ConPTY on Windows 10 (1903).
A bug in libvterm's internal buffer, which needed to be fixed together.
The logic has been changed again in Insider preview. However, Microsoft needs to resolve this issue first.
microsoft/terminal#724
https://github.com/vim/vim/pull/4411
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
Can a few people try this out? On different MS-Windows versions, ideally.
Merging #4411 into master will decrease coverage by
0.02%.
The diff coverage is28.57%.
@@ Coverage Diff @@ ## master #4411 +/- ## ========================================== - Coverage 80.39% 80.37% -0.03% ========================================== Files 109 109 Lines 142726 142778 +52 ========================================== + Hits 114750 114755 +5 - Misses 27976 28023 +47
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/libvterm/src/vterm_internal.h | 100% <ø> (ø) |
⬆️ |
| src/misc2.c | 83.96% <0%> (-0.12%) |
⬇️ |
| src/libvterm/src/state.c | 89.51% <20.83%> (-1.58%) |
⬇️ |
| src/libvterm/src/termscreen.c | 88.68% <27.77%> (-2.42%) |
⬇️ |
| src/libvterm/src/parser.c | 90.16% <40%> (-1.41%) |
⬇️ |
| src/libvterm/src/unicode.c | 89.13% <57.14%> (-5.75%) |
⬇️ |
| src/gui_gtk_x11.c | 48.35% <0%> (-0.3%) |
⬇️ |
| src/ex_cmds2.c | 87.8% <0%> (-0.12%) |
⬇️ |
| src/ex_cmds.c | 82.18% <0%> (-0.1%) |
⬇️ |
| src/gui.c | 57.99% <0%> (-0.06%) |
⬇️ |
| ... and 4 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing data
Powered by Codecov. Last update 5c017b2...e9d8933. Read the comment docs.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.![]()
People have not yet tested it.
The operation check was done with Vista, 7, Win10 (1607), Win10 (1809), Win10 (1903), Insider build 18898.
The display of ambiguios characters on Win10 (1809) is buggy and can not be fixed in userland.
The cursor turns red in Insider build 18898. Since the transmitted sequence is also super buggy, I have to look at it.
This patch makes the little buggy Win10 (1903) ConPTY work properly.
This works with winpty. It only responds to ConPTY sequences.
The changes in libvterm are different from other optional flags. Please discuss this with the libvterm author, Paul Evans. I would like to keep the Vim copy of libvterm close to the original, as well as we can.
The return value of vterm_get_special_pty_type() is unclear. It seems that only the value 2 matters. Perhaps it can just return true/fals?
ping @leonerd
The reason for not making it true/fals, special exceptions will increase in the future.
For an environment where the number is 0 and not related to ConPTY.
The number is 1, which is reserved for Windows 10 (1809 or earlier). However, ConPTY seems to be broken, so I do not know if I can correct it.
The number is 2, Windows 10 (1903). This is also broken but corrected.
InsiderBuild has been changed to ConPTY, which requires a value of 3. The logic of 2 can not be used anymore. This ConPTY (now Build 18898) has problems with correction, as the cursor is red and it is overly broken, such as drawing dust.
ConPTY and WindowsTerminal are API compatible but behave differently and can not be identified (the device ID is the same), probably the number is 4.
The current patch is combined with the libvterm bug fix, so I'll start by separating it.
Is there still work planned on this?
Insider build does not fix a bug that cannot display 2 cell characters.
microsoft/terminal#724
If this is not fixed, there is nothing I can do now.
There is no more work planned.
It's an easy-to-understand and fatal bug in Windows, but it has been left for more than four months.
Problem with WriteConsoleOutputW().
I think applying a patch is a better way to fix this problem than continuing to pray.