In the middle of typing, IME frequently fails, I tried but still can't figure out how the failure is triggered, but only if I type and delete for a while, it always happen, so I get the chance to record a gif:

From the gif, you can see the first two characters were typed correctly, after that, nothing from the IME can be typed again.
Microsoft Windows [鐗堟湰 10.0.18362.476]
The gif is recorded in v0.10.761.0, and it still happens in v0.10.781.0
I have been using Terminal v0.9, which works fine, the error comes with v0.10
Can't figure out exactly, keep typing and deleting in a prompt for a while, it always happen
characters from IME can be typd onto terminal
IME fails
Just curious, what's the version of Windows you're running?
@etern I've managed to half repro the issue you're seeing (my work machine can't repro, but my personal PC can repro part of the bug), so I'm not sure if I'm fixing the exact issue you're seeing. I have a _potential_ fix in the branch named dev/lelian/imeweird. If you have a chance to take a look and try it out, it would help me know whether or not I'm encountering the same bug you are!
@leonMSFT My Windows version is 10.0.18362.476.
If you can fix this, you might know how it can be triggered (hope it's not random behavior). I can verify the trigger method on my PC, so we know if you fixed the right problem.
If that doesn't help, I will try to build your branch by this weekend. Since I'm not familiar with the code, I don't have the confidence to make it work
I believe the trigger is to start composition with something like "wei'yua" but backspace delete your composition completely before you complete the composition. After deleting the composition, try creating a composition again and nothing will show up but the composition picker box will show and update as if you're typing normally.
Yes, "delete composition completely" can reproduce the bug every time, you get it right. Please merge the fix.
Actually, I have one more follow up question: after deleting the composition "wei'yuan", does the starting letter 'w' reappear?
Yes, the first character reappear
One more thing, after the deletion triggers the bug, I just Enter to a new line, IME works.
But sometimes, when I switch from other place to terminal window, IME fails and can't be restored by Enter to a new prompt. In this occasion, I have to close the tab and open a new one.
These two problems may be related because they all come with v0.10, I don't know how to reproduce this, see the Enter operation in the gif:

I can reproduce this easily on my laptop with Windows 10.0.18363.720 and Windows Terminal at a3382276d7977fe521065793b366fa024fe519a7 under two different circumstances:
@leonMSFT Your fix seems to be working with both cases. But the reappearing is still there, which I suppose is something you are aware of.
Yeah the reappearing character is a particularly annoying problem. For some reason, I'm receiving a CompositionCompleted event _before_ getting the TextUpdate that the last character was deleted. This causes me to believe the Composition is finished, so I send what's in our buffer, but then right after sending it, I get an update saying the last character is deleted, so then I delete it from the buffer.
I've made a PR to at the very least allow y'all to continue typing in Chinese IME, but I haven't come up with a way to resolve the reappearing initial character due to not understanding why the text server API must act this way 馃槩
:tada:This issue was addressed in #5109, which has now been successfully released as Windows Terminal Preview v0.11.1121.0.:tada:
Handy links:
Most helpful comment
I can reproduce this easily on my laptop with Windows 10.0.18363.720 and Windows Terminal at a3382276d7977fe521065793b366fa024fe519a7 under two different circumstances:
@leonMSFT Your fix seems to be working with both cases. But the reappearing is still there, which I suppose is something you are aware of.