fix(ssh): Windows IME candidate window text not sent to terminal#1235
fix(ssh): Windows IME candidate window text not sent to terminal#1235LittleWool wants to merge 1 commit into
Conversation
📝 WalkthroughWalkthroughUpdated the Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR aims to fix Windows IME committed text not being sent to the terminal by switching the packages/xterm submodule to a fork/branch that contains the upstream fix.
Changes:
- Point
xtermsubmodule remote fromlollipopkit/xterm.darttoLittleWool/xterm.dart. - Set the
xtermsubmodule branch tofix/windows-ime-input.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| path = packages/xterm | ||
| url = https://github.com/lollipopkit/xterm.dart | ||
| branch = master | ||
| url = https://github.com/LittleWool/xterm.dart | ||
| branch = fix/windows-ime-input |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.gitmodules:
- Around line 7-8: Update the packages/xterm gitlink to record the commit
containing the Windows IME fix, in addition to the .gitmodules fetch target
change. Ensure the submodule SHA points to the intended fix/windows-ime-input
revision so normal checkouts retrieve the fix.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
| url = https://github.com/LittleWool/xterm.dart | ||
| branch = fix/windows-ime-input |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
git ls-tree HEAD packages/xterm
git -C packages/xterm rev-parse HEAD
git -C packages/xterm remote get-url origin
git -C packages/xterm log -1 --onelineRepository: lollipopkit/flutter_server_box
Length of output: 408
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "HEAD:"
git rev-parse --short HEAD
echo
echo "Changed files in HEAD commit:"
git show --stat --oneline --no-renames --format=medium HEAD -- .gitmodules packages/xterm || true
echo
echo "Parent gitlink vs HEAD gitlink:"
git ls-tree HEAD^ packages/xterm
git ls-tree HEAD packages/xterm
echo
echo "Submodule commit ancestry:"
git -C packages/xterm rev-list --max-count=5 --oneline HEAD
echo
echo "Is recorded gitlink commit reachable from submodule HEAD?"
git -C packages/xterm merge-base --is-ancestor 97632ae4cc1619e5417df17786093f8186ce7699 HEAD && echo yes || echo noRepository: lollipopkit/flutter_server_box
Length of output: 1211
🏁 Script executed:
#!/bin/bash
set -euo pipefail
cd packages/xterm
echo "Recorded gitlink commit in superproject:"
git ls-tree HEAD ../xterm 2>/dev/null || true
echo "Commit subjects:"
git show -s --format='%H %s' 97632ae4cc1619e5417df17786093f8186ce7699
git show -s --format='%H %s' f27aae6b3332f6cf73a9552c855798ed59f6828e
echo
echo "Reachability:"
if git merge-base --is-ancestor 97632ae4cc1619e5417df17786093f8186ce7699 f27aae6b3332f6cf73a9552c855798ed59f6828e; then
echo "recorded gitlink is an ancestor of the submodule HEAD"
else
echo "recorded gitlink is NOT an ancestor of the submodule HEAD"
fi
if git merge-base --is-ancestor f27aae6b3332f6cf73a9552c855798ed59f6828e 97632ae4cc1619e5417df17786093f8186ce7699; then
echo "submodule HEAD is an ancestor of the recorded gitlink"
else
echo "submodule HEAD is NOT an ancestor of the recorded gitlink"
fiRepository: lollipopkit/flutter_server_box
Length of output: 460
Update the packages/xterm gitlink in this PR.
.gitmodules only changes the fetch target; normal checkouts still use the recorded submodule SHA, so the Windows IME fix won’t land until the gitlink moves too.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.gitmodules around lines 7 - 8, Update the packages/xterm gitlink to record
the commit containing the Windows IME fix, in addition to the .gitmodules fetch
target change. Ensure the submodule SHA points to the intended
fix/windows-ime-input revision so normal checkouts retrieve the fix.
Source: MCP tools
Fix Windows IME candidate window text not sent to terminal.
Depends on lollipopkit/xterm.dart#11
Problem
On Windows, when using an IME (e.g., Microsoft Pinyin, Sogou), text selected from the candidate window is not sent to the terminal.
Root Cause
updateEditingValuein xterm'scustom_text_edit.dartincorrectly computes text deltas from the previous composing text length. When IME composing ends and commits text of a different length (e.g., "ni" → "你"), the code misinterprets it as a deletion.Changes
LittleWool/xterm.dartfix/windows-ime-input branch which contains the fixTesting
Summary by CodeRabbit