Cursor jumps to the line above after accepting an inline completion that adds an auto-import
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
### Extension Version
0.20260708.2
### VS Code Version
1.129.1
### Operating system Version
macOS 26.5.2 (25F84)
### Steps to reproduce
```json
"editor.quickSuggestions": {
"other": "inline",
"comments": "inline",
"strings": "inline"
}
```
1. Apply the `quickSuggestions` setting above.
2. Open a `.ts` or `.tsx` file.
3. Start typing an identifier that isn't imported yet, so the inline ghost-text suggestion also triggers an auto-import.
4. Accept the suggestion with Tab.
5. Observe cursor position.
### Issue
### Gif
### Expected behavior
Cursor stays on the line I was typing on.
### Actual behavior
Cursor ends up one line above.
### Additional context
Output from VS Code after accepting inline ghost-text suggestion that triggered auto-import.
```
2026-07-19 19:52:24.749 [info] handled method 'textDocument/didChange' in 29.666µs
2026-07-19 19:52:24.749 [info] Processed 1 file changes in 181.625µs
2026-07-19 19:52:24.789 [info] Adopted snapshot 46 (parent 45) as current session snapshot (replacing 45)
2026-07-19 19:52:24.789 [info] ======== Cloning snapshot 45 ========
[19:52:24.743] Reason: RequestedLanguageService (pending file changes) - Documents: [file:///Users/svipas/redacted/index.tsx]
[19:52:24.743] DidChangeCustomConfigFileName
[19:52:24.743] DidChangeFiles
[19:52:24.743] Checking for changes affecting config files
[19:52:24.743] Summarizing file changes
[19:52:24.743] Checking if any changed files are config files
[19:52:24.743] Marking project /Users/svipas/redacted/tsconfig.json as dirty due to changes in /users/svipas/redacted/index.tsx
[19:52:24.743] DidRequestFile
[19:52:24.743] Acquiring config for project
[19:52:24.743] CompilerHost
[19:52:24.788] Program update for /Users/svipas/redacted/tsconfig.json completed in 44.414625ms
[19:52:24.788] UpdateAutoImports
[19:52:24.788] Building autoimport registry
[19:52:24.788] Updated buckets and directories in 21.084µs
[19:52:24.788] Built autoimport registry in 29.375µs
[19:52:24.788] Finished cloning snapshot 45 into snapshot 46 in 44.534166ms
2026-07-19 19:52:24.790 [info]
2026-07-19 19:52:24.790 [info] handled method 'textDocument/linkedEditingRange' (163) in 87.958µs
2026-07-19 19:52:24.790 [info] Updated watches in 10.334µs
2026-07-19 19:52:24.790 [info] handled method 'textDocument/inlayHint' (161) in 47.428208ms
2026-07-19 19:52:24.792 [info] handled method 'textDocument/documentHighlight' (164) in 3.340208ms
2026-07-19 19:52:24.797 [info] Adopted snapshot 47 (parent 46) as current session snapshot (replacing 46)
2026-07-19 19:52:24.797 [info] ======== Cloning snapshot 46 ========
[19:52:24.792] DidChangeCustomConfigFileName
[19:52:24.792] DidRequestFile
[19:52:24.792] Acquiring config for project
[19:52:24.792] UpdateAutoImports
[19:52:24.792] Building autoimport registry
[19:52:24.792] Updated buckets and directories in 54.792µs
[19:52:24.796] Built autoimport registry in 3.834917ms
[19:52:24.796] Finished cloning snapshot 46 into snapshot 47 in 3.935917ms
2026-07-19 19:52:24.819 [info] handled method 'textDocument/inlayHint' (162) in 29.519333ms
2026-07-19 19:52:24.825 [info] handled method 'textDocument/foldingRange' (166) in 1.627875ms
2026-07-19 19:52:24.873 [info] handled method 'textDocument/codeLens' (167) in 33.708µs
2026-07-19 19:52:24.874 [info] handled method 'textDocument/codeAction' (168) in 23.333µs
2026-07-19 19:52:24.905 [info] handled method 'textDocument/diagnostic' (165) in 115.838166ms
2026-07-19 19:52:24.976 [info] handled method 'textDocument/documentSymbol' (170) in 556.333µs
2026-07-19 19:52:24.993 [info] handled method 'textDocument/semanticTokens/full' (169) in 71.1895ms
2026-07-19 19:52:25.345 [info] handled method 'textDocument/codeAction' (171) in 129.291µs
2026-07-19 19:52:25.407 [info] handled method 'textDocument/diagnostic' (172) in 67.834µs
2026-07-19 19:52:25.423 [info] handled method 'textDocument/inlayHint' (173) in 195.208µs
2026-07-19 19:52:25.425 [info] handled method 'textDocument/inlayHint' (174) in 1.069459ms
```
Contributor guide
Assessment
This issue has not been assessed yet.