[BUG] Ctrl+W deletes across space boundaries, eating multiple words

Resolved 💬 4 comments Opened Mar 15, 2026 by sswthrower Closed Mar 18, 2026

Description

Ctrl+W in the Claude Code input prompt does not respect space as a word boundary. It deletes more text than expected, crossing spaces that should act as delimiters.

Steps to Reproduce

  1. Type abc 123 in the Claude Code input prompt
  2. With cursor at the end (after 3), press Ctrl+W
  3. Expected: 123 is deleted, leaving abc
  4. Actual: Both 123 and abc are deleted

Another example:

  1. Type abc " (abc, space, double quote)
  2. Press Ctrl+W
  3. Expected: " is deleted (or " and the space), leaving abc
  4. Actual: ", the space, and abc are all deleted in one keystroke

Expected Behavior

Ctrl+W should behave like unix-word-rubout (delete backward to the previous whitespace) or at minimum like backward-kill-word (which still respects spaces between alphanumeric tokens). Deleting abc 123 in a single Ctrl+W matches neither standard behavior.

Environment

  • Claude Code version: 2.1.76
  • Reproduced on Linux and Windows; likely platform-independent since the input handling is in Claude Code itself

View original on GitHub ↗

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