Input method problem, cursor bar not following #5219

Closed
opened 2026-01-31 00:07:50 +00:00 by claunia · 3 comments
Owner

Originally created by @etern on GitHub (Nov 27, 2019).

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

Originally created by @etern on GitHub (Nov 27, 2019). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none 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. <!-- A description of how to trigger this bug. --> The emoji picker also not normal: ![terminal_emoji_error](https://user-images.githubusercontent.com/4412793/69696708-7f8da580-111b-11ea-9b90-5e4fd968d22b.gif) # Expected behavior cursor should following the characters, like in cmd.exe: ![cmd_ime_cursor_follow](https://user-images.githubusercontent.com/4412793/69696717-874d4a00-111b-11ea-8e65-58d15c7ed1a0.gif) <!-- A description of what you're expecting, possibly containing screenshots or reference material. --> # Actual behavior cursor not following ![terminal_ime_cursor_not_follow](https://user-images.githubusercontent.com/4412793/69696725-8c11fe00-111b-11ea-978d-b95325f8aec6.gif) <!-- What's actually happening? -->
Author
Owner

@zadjii-msft commented on GitHub (Nov 27, 2019):

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

@zadjii-msft commented on GitHub (Nov 27, 2019): 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`
Author
Owner

@krokofant commented on GitHub (Jul 13, 2020):

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.

@krokofant commented on GitHub (Jul 13, 2020): 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: ```powershell 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.
Author
Owner

@lhecker commented on GitHub (Apr 18, 2024):

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. 😊

@lhecker commented on GitHub (Apr 18, 2024): 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. 😊
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#5219