Skip to content

bug: Cursor position offset in CLI input prompt on Linux (same class as #3364) #7463

@nabeelshirazi

Description

@nabeelshirazi

On Linux, the CLI input prompt has a cursor positioning offset that causes the first character of typed input to appear separated from the rest by a space. For example, typing "what" displays as "w hat".
This is the same class of issue as #3364 (Windows cursor shift), which was fixed in PR #4464 by stripping ANSI escape sequences on Windows. The Linux prompt still uses styled ANSI sequences and the 🪿 emoji, both of which can cause rustyline to miscalculate display width.

To Reproduce

  1. Run goose (interactive mode) on Linux
  2. Type any message at the prompt
  3. Observe the first character is visually separated from the rest of the input

Expected behavior
Text should appear contiguous as typed, with no spurious space after the first character. Currently it looks like:
🪿w hat" instead of "what"

Environment

  • OS & Arch: Linux 6.14.0-37-generic (x86_64)
  • Interface: CLI (VS Code integrated terminal / Cursor IDE)
  • Version: 1.25.0
  • Provider & Model: lemonade / Qwen3-Coder-30B-A3B-Instruct-GGUF

Additional context

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions