Commit 52d469a
Fix focus loss issue when AI is editing files
- Add preserveFocus parameter to revealRange calls in DiffViewProvider
- Use workflow detection to determine when to preserve focus during scrolling
- Prevents chat from losing focus when AI is editing files with diff view
- Addresses daniel-lxs's reported issue where focus was still being lost
This fix ensures that when the AI is actively processing (streaming, waiting
for chunks, or in auto-approval mode), the diff view won't steal focus from
the chat input, preventing accidental typing in the wrong window.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>1 parent 5bd6159 commit 52d469a
1 file changed
+24
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
464 | 465 | | |
465 | 466 | | |
466 | 467 | | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
471 | 479 | | |
472 | 480 | | |
473 | 481 | | |
| |||
481 | 489 | | |
482 | 490 | | |
483 | 491 | | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
484 | 497 | | |
485 | 498 | | |
486 | | - | |
487 | | - | |
488 | | - | |
489 | | - | |
490 | | - | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
491 | 506 | | |
492 | 507 | | |
493 | 508 | | |
| |||
0 commit comments