[BUG] Ctrl+Left/Right/W treat punctuation and digit-ending tokens as whitespace

Resolved 💬 5 comments Opened Mar 20, 2026 by dnwpark Closed Apr 17, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Word navigation and deletion commands (Ctrl+Left, Ctrl+Right, Ctrl+W) skip over certain character sequences as if they were whitespace, causing jumps and deletions larger than expected.

Two classes of input are affected:

  1. Punctuation characters — treated as whitespace rather than word constituents
  2. Alphanumeric/underscore tokens ending in a digit — e.g. abc1, ab_1 — treated as whitespace

What Should Happen?

Punctuation surrounded by whitespace and tokens ending in digits should be treated as "words".

Error Messages/Logs

Steps to Reproduce

Type foo abc1 ... bar into the Claude Code input prompt, then repeatedly press Ctrl+Left.

Expected: cursor stops before bar, abc1, ... then foo.

foo abc1 ... bar|
foo abc1 ... |bar
foo abc1 |... bar
foo |abc1 ... bar
|foo abc1 ... bar

Actual: abc1 and ... are skipped as if it were whitespace.

foo abc1 ... bar|
foo abc1 ... |bar
|foo abc1 ... bar

Similarly, after typing foo abc1 ... bar into the input prompt, repeatedly press Ctrl+W to delete words.

Expected: each "word" is deleted one at a time

foo abc1 ... bar|
foo abc1 ... |
foo abc1 |
foo |
|

Actual: First Ctrl+W deletes bar. The second deletes the rest foo abc1 ....

foo abc1 ... bar|
foo abc1 ... |
|

Claude Model

Not sure / Multiple models

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.80 (Claude Code)

Platform

Other

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗