Skip to content

Conversation

@tobwen
Copy link

@tobwen tobwen commented Jan 16, 2026

Implements word-by-word cursor navigation using ALT+Left and ALT+Right:

  • Adds moveCursorWordLeft and moveCursorWordRight methods
  • Includes comprehensive test cases for various scenarios
  • Creates a demo for testing and showing compatibility
  • Handles multiple spaces and partial word positions

The implementation supports both standard terminals and PuTTY's alternative input mode (see additional fix).

Hint: Different from moveWordForward/moveWordBackward which are text-direction aware (Forward goes to logical end of text). moveWordLeft/Right are visually direction aware - Left always moves cursor visually left on screen.

Implements word-by-word cursor navigation using ALT+Left and ALT+Right:
- Adds moveCursorWordLeft and moveCursorWordRight methods
- Includes comprehensive test cases for various scenarios
- Creates a demo for testing and showing compatibility
- Handles multiple spaces and partial word positions

The implementation supports both standard terminals and PuTTY's alternative input mode (see additional fix).

Hint: Different from moveWordForward/moveWordBackward which are text-direction aware (Forward goes to logical end of text). moveWordLeft/Right are visually direction aware - Left always moves cursor visually left on screen.
@kommander
Copy link
Collaborator

I don't fully understand the difference currently. But there are word boundaries calculated natively, which support CJK/emojis etc.

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