Skip to content

fix(ssh): Windows IME candidate window text not sent to terminal#1235

Open
LittleWool wants to merge 1 commit into
lollipopkit:mainfrom
LittleWool:fix/windows-ime-input
Open

fix(ssh): Windows IME candidate window text not sent to terminal#1235
LittleWool wants to merge 1 commit into
lollipopkit:mainfrom
LittleWool:fix/windows-ime-input

Conversation

@LittleWool

@LittleWool LittleWool commented Jul 19, 2026

Copy link
Copy Markdown

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

updateEditingValue in xterm's custom_text_edit.dart incorrectly 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

Testing

  • Build Windows version and test with Microsoft Pinyin IME
  • Committed text from candidate window should now appear in the terminal

Summary by CodeRabbit

  • Chores
    • Updated the bundled terminal component to use an updated source repository and branch.
    • No visible user-facing changes.

Copilot AI review requested due to automatic review settings July 19, 2026 09:00
@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Updated the xterm submodule configuration to use a new repository URL and track the fix/windows-ime-input branch while keeping the submodule path unchanged.

Suggested reviewers: copilot

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: fixing Windows IME candidate text not being sent to the terminal.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 xterm submodule remote from lollipopkit/xterm.dart to LittleWool/xterm.dart.
  • Set the xterm submodule branch to fix/windows-ime-input.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .gitmodules
Comment on lines 6 to +8
path = packages/xterm
url = https://github.com/lollipopkit/xterm.dart
branch = master
url = https://github.com/LittleWool/xterm.dart
branch = fix/windows-ime-input

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: e3b4cca2-9125-4ac3-9ebf-2dbf629b09fd

📥 Commits

Reviewing files that changed from the base of the PR and between 70e3c44 and f27aae6.

📒 Files selected for processing (1)
  • .gitmodules

Comment thread .gitmodules
Comment on lines +7 to +8
url = https://github.com/LittleWool/xterm.dart
branch = fix/windows-ime-input

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 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 --oneline

Repository: 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 no

Repository: 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"
fi

Repository: 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants