microsoft / terminal

The new Windows Terminal and the original Windows console host, all in the same place!
MIT License
95.65k stars 8.32k forks source link

Input method problem, cursor bar not following #3730

Closed etern closed 6 months ago

etern commented 4 years ago

Environment

Windows build number: Microsoft Windows [版本 10.0.18362.476]
Windows Terminal version: Version: 0.7.3291.0

Steps to reproduce

Open cmd in windows terminal, use input method,the cusor bar not following.

The emoji picker also not normal: terminal_emoji_error

Expected behavior

cursor should following the characters, like in cmd.exe: cmd_ime_cursor_follow

Actual behavior

cursor not following terminal_ime_cursor_not_follow

zadjii-msft commented 4 years ago

I bet conhost moves it's cursor in response to characters being typed in the IME, but remembers the right place to insert them into the buffer. Looks to me like the Terminal only moves the cursor once the characters are submitted. I bet we could get the Terminal to do this as well, with some sort of callback from TSFInputControl to TermControl

krokofant commented 4 years ago

I think I'm having this issue with my posh-gitmoji powershell module. When using it you'd end up with something like this, ready to put as string inside the single quotes:

gitmoji ⚡️ <# Improving performance. #> ''

If the cursor is moved furthest to the right it seems to be placed between the single qoutes ('|') but when I write it is outputted on the expected position (''|m). If I move to inside the single quotes it looks like it's on the left side |'' + m => '|m'.

It doesn't happen will all emojis.

lhecker commented 6 months ago

We just published a major update to our IME implementation in the nightly Canary branch. It was rewritten from the ground up and has tons of improvements! If you're interested in trying it out, you can get it here: https://aka.ms/terminal-canary-installer If you already have the Canary build installed, you can use this link to force an update.

If you encounter any issues or have any suggestions, or if you simply like/dislike the changes, please let us know! Thank you for bearing with us. 😊