[BUG] Dictating at a cursor point deletes all whitespace (including newlines) prior to the cursor (Claude Code Desktop)
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?
In Claude Code for Desktop, I use Claude built-in dictation, not OS-level dictation.
When I start a new paragraph of my response by pressing Shift+Enter twice and begin dictation, so my response looks like this (| representing the text cursor):
Lorem ipsum.
|
And then I speak "Dolor sit amet", the result becomes this:
Lorem ipsum. Dolor sit amet.|
What Should Happen?
The result should be this:
Lorem ipsum.
Dolor sit amet.|
Note that this is not just a problem with newlines -- as far as I can tell, dictation simply replaces all continuous whitespace immediately preceding the cursor with a single space. And while this is reasonable behavior _within_ a line (though unnecessary), it is unreasonable behavior _across_ lines, because the whole point of my inserting newlines is to start a new paragraph.
Error Messages/Logs
Steps to Reproduce
See "What's Wrong" above, which contains the steps to reproduce.
Claude Model
None
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.260 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
Note that this is specific to the Claude Desktop app, but it applies to Claude Code since Claude Code has the dictation feature as a button directly underneath the prompt text box.