Hi Jesse,
I’ve attached a short screen recording and the log file from Logs Explorer for reference. Hope this helps you reproduce and track down the issue.
I’ve been testing Bike 2 Preview and came across a small IME-related issue that I thought I’d report. It’s not a dealbreaker, but it does affect the typing experience with Chinese input methods.
Environment
Bike version: 2.0 preview (298)
macOS: 26.5 (25F71)
Input method: System Wubi (system language set to Chinese)
This issue does not occur in Bike 1.
What happens
When using System Wubi in Bike 2, after deleting an unfinished code string (i.e. before selecting a character), the editor seems to leave behind some kind of invisible placeholder at the end of the line. Specifically:
-
Pressing Delete (backspace) takes about 3 presses to remove the last visible character.
-
Pressing the left arrow key takes about 3 presses to move the cursor one position to the left.
Steps to reproduce
-
In Bike 2, place the cursor after some existing text (e.g. type “这个”).
-
Switch to System Wubi and type a code string like
ukjg— but do not press space to finalise the character selection. -
Press Delete (backspace) to remove the code string (
ukjg) completely. -
Now try pressing Delete or the left arrow key — the delay described above can be observed.
Log analysis (from the built-in Logs Explorer)
During the “cancel marked text” phase, the Logs Explorer shows the following state changes (cursor at position 2, after “这个”)
[trace] IME: setMarkedText: "" selectedRange: 0..<0 replacementRange: NSNotFound
[trace] IME: state after: selectedRowRange=Optional(Range(2..<2)), markedRowRange=Optional(Range(2..<2)), text=""
[trace] IME: hasMarkedText() -> true
[trace] IME: markedRange() -> 2..<2 (charRange: 2..<2)
What this seems to show:
-
When the input method calls
setMarkedText:""(empty string) to cancel the current input, Bike 2 setsmarkedRowRangetoRange(2..<2)— a zero-length range anchored at the cursor position. -
After that,
hasMarkedText()returnstrue, andmarkedRange()returns2..<2, suggesting that the system still believes there’s a “marked region” even though it’s empty. -
The subsequent Delete key press (
insertText: "\u{08}") interacts with that empty marked range first, and the cursor position then jumps around in the logs (selectedRangeflickers between 2, 3, and 1). It looks like the logical cursor offset gets out of sync with the actual text storage.
That’s everything I found from the Logs Explorer — just wanted to share the raw observations. The attached video and log file should make it easier to see the behaviour in action.
Thanks as always for your work on Bike!
ime log.txt (18.1 KB)