Skip to content

fix(tui): Windows terminal cursor positioning for IME and config import#34

Open
wuxiaoweisjz wants to merge 1 commit into
KonghaYao:mainfrom
wuxiaoweisjz:main
Open

fix(tui): Windows terminal cursor positioning for IME and config import#34
wuxiaoweisjz wants to merge 1 commit into
KonghaYao:mainfrom
wuxiaoweisjz:main

Conversation

@wuxiaoweisjz

Copy link
Copy Markdown
Contributor

Summary

  • Position terminal cursor at textarea input so the IME composition window follows the text cursor on Windows terminals, instead of appearing at the top-left corner
  • Fix Claude Code config import failure on clean Windows install

Test plan

  • All 645 tests pass
  • Release build succeeds
  • Manual smoke test with peri -p
  • IME candidate window verified to follow input on Windows Terminal

On Windows terminals, the IME composition window follows the terminal
cursor position. Previously the terminal cursor stayed at (0,0) — the
top-left corner — causing the IME candidate window to appear there
instead of following the text input.

Fix: compute the textarea cursor's terminal-grid position (accounting
for block borders/padding and CJK display width), then call
Frame::set_cursor_position each frame. Disable textarea's own REVERSED
cursor rendering to avoid a double-cursor artifact.

Includes a nanosleep64 stub for WinLibs POSIX linker compatibility.

Co-Authored-By: deepseek-v4-pro <deepseek-ai@claude-code-best.win>
@claude-code-best

Copy link
Copy Markdown
Collaborator

@wuxiaoweisjz 处理一下 ci 问题

a1163340785-gif pushed a commit to a1163340785-gif/peri that referenced this pull request Jun 15, 2026
删除:
- KonghaYao#1 popup scroll follow, KonghaYao#2 ACP logout, KonghaYao#4 memory growth
- KonghaYao#6 @dir Read injection, KonghaYao#17 subagent memory doubling
- #36 hashline edit, #41 lineedit confusion, #48 lineedit re-read

标记 Fixed (18):
- KonghaYao#10 askuser auto-close, KonghaYao#12 LLM error amnesia, KonghaYao#13 new_thread deadlock
- KonghaYao#18 PermissionRequest bypass, KonghaYao#25 thread-browser table scan
- KonghaYao#30-KonghaYao#34 concurrent bg, config panel, edit tools, panic text
- #38 unknown slash, #42 plugin skills, #44-#45 askuser space/textarea
- #39 global hooks, #40 inline slash, #43 write append
- #46 compact rendering, #52 prompt suggestion

标记 Done (4):
- KonghaYao#14 streaming frame-rate, KonghaYao#15 CPU spike
- #50 coder agent, #51 remove lineedit beta

Still open: 18 (hooks 5, compact 2, sqlite 1, tool offset 1, etc.)

Co-Authored-By: deepseek-v4-pro <deepseek-ai@claude-code-best.win>
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