Commit 9ddeb43
fix(macos): disable undo registration for ghost text in text storage
Ghost text insertions/removals via setAttributedString: on the text
storage were getting on the undo stack, causing Cmd+Z to undo the
invisible ghost text change instead of the user's actual typing.
Wrap the text storage mutation in disableUndoRegistration/
enableUndoRegistration specifically when ghostTextChanging, keeping
it tightly scoped to avoid corrupting the undo manager state.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 571dbf9 commit 9ddeb43
1 file changed
Lines changed: 11 additions & 6 deletions
Lines changed: 11 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
335 | 340 | | |
| 341 | + | |
| 342 | + | |
336 | 343 | | |
337 | | - | |
338 | | - | |
339 | 344 | | |
340 | 345 | | |
341 | 346 | | |
| |||
0 commit comments