Repository: vscode
Issue: Too much ghost text can cause scroll event that pushes cursor off screen
Labels: bug,papercut :drop_of_blood:,inline-completions

Steps to Reproduce:

1. have some content that will cause copilot to generate a large amount of ghost text (content example below)
2. trigger the large ghost text and then press enter to continue editing without accepting
:bug: my edit location is scrolled off screen

![Recording 2024-01-24 at 11 31 22](https://github.com/microsoft/vscode/assets/2019016/00738098-5162-4c72-aa43-619f80ea4705)

<details>
<summary>The content I had</summary>

in my keybindings.json file:

```
// Place your key bindings in this file to override the defaultsauto[]
[
    {
        "key": "ctrl+-",
        "command": "-workbench.action.zoomOut"
    },
    {
        "key": "ctrl+=",
        "command": "-workbench.action.zoomIn"
    },
    {
        "key": "ctrl+r",
        "command": "-workbench.action.reloadWindow",
        "when": "isDevelopment"
    },
    {
        "key": "ctrl+k q",
        "command": "workbench.action.closeSidebar"
    },
    {
        "key": "ctrl+]",
        "command": "workbench.action.terminal.focusNext",
        "when": "terminalFocus && terminalHasBeenCreated && !terminalEditorFocus || terminalFocus && terminalProcessSupported && !terminalEditorFocus"
    },
    {
        "key": "ctrl+pagedown",
        "command": "-workbench.action.terminal.focusNext",
        "when": "terminalFocus && terminalHasBeenCreated && !terminalEditorFocus || terminalFocus && terminalProcessSupported && !terminalEditorFocus"
    },
    {
        "key": "ctrl+[",
        "command": "workbench.action.terminal.focusPrevious",
        "when": "terminalFocus && terminalHasBeenCreated && !terminalEditorFocus || terminalFocus && terminalProcessSupported && !terminalEditorFocus"
    },
    {
        "key": "ctrl+pageup",
        "command": "-workbench.action.terminal.focusPrevious",
        "when": "terminalFocus && terminalHasBeenCreated && !terminalEditorFocus || terminalFocus && terminalProcessSupported && !terminalEditorFocus"
    },
    {
        "key": "ctrl+shift+j",
        "command": "workbench.action.joinAllGroups"
    },
    {
        "key": "ctrl+shift+d ctrl+shift+d",
        "command": "jupyter.interactive.clearAllCells"
    },
    {
        "key": "ctrl+alt+win+n",
        "command": "-welcome.showNewFileEntries"
    },
    {
        "key": "ctrl+shift+up",
        "command": "interactive.history.focus",
        "when": "!suggestWidgetVisible && resourceScheme == 'vscode-interactive'"
    },
    {
        "key": "ctrl+shift+down",
        "command": "interactive.input.focus",
        "when": "!suggestWidgetVisible"
    },
    {
        "key": "ctrl+r ctrl+g",
        "command": "jupyter.runfromline"
    },
    {
        "key": "ctrl+r ctrl+enter",
        "command": "jupyter.runcell"
    },
    {
        "key": "ctrl+shift+e",
        "command": "editor.action.refactor",
        "args": {
            "kind": "refactor.extract",
            "preferred": true,
            "apply": "ifSingle"
        }
    },
    {
        "key": "ctrl+k ctrl+p",
        "command": "-workbench.action.showAllEditors"
    },
    {
        "key": "ctrl+k ctrl+p",
        "command": "workbench.action.pinEditor",
        "when": "!activeEditorIsPinned"
    },
    {
        "key": "ctrl+k shift+enter",
        "command": "-workbench.action.pinEditor",
        "when": "!activeEditorIsPinned"
    },
    {
        "key": "ctrl+k ctrl+p",
        "command": "workbench.action.unpinEditor",
        "when": "activeEditorIsPinned"
    },
    {
        "key": "ctrl+k shift+enter",
        "command": "-workbench.action.unpinEditor",
        "when": "activeEditorIsPinned"
    },
    {
        "key": "ctrl+enter",
        "command": "-github.copilot.generate",
        "when": "editorTextFocus && github.copilot.activated"
    },
    {
        "key": "shift+enter",
        "command": "interactive.execute",
        "when": "!notebookKernel && resourceScheme == 'vscode-interactive' || resourceScheme == 'vscode-interactive' && notebookKernel =~ /^ms-toolsai.jupyter\\//"
    },
    {
        "key": "ctrl+enter",
        "command": "interactive.execute",
        "when": "resourceScheme == 'vscode-interactive'"
    },
    {
        "key": "alt+shift+right",
        "command": "editor.action.inlineSuggest.acceptNextWord",
        "when": "inlineSuggestionVisible"
    },
    {
        "key": "alt+shift+left",
        "command": "undo",
        "when": "inlineSuggestionVisible"
    },
    {
        "key": "ctrl+alt+z",
        "command": "jupyter.notebookeditor.undocells"
    },
    {
        "key": "ctrl+shift+[",
        "command": "cursorWordPartLeft"
    },
    {
        "key": "ctrl+shift+]",
        "command": "cursorWordPartRight"
    },
    {
        "key": "alt+p",
        "command": "editor.actions.findWithArgs",
        "args": {
            "isRegex": true,
            "searchString": ""
        }
    },
    {
        "key": "ctrl+shift+k ctrl+shift+r",
        "command": "jupyter.notebookeditor.removeallcells"
    },
    {
        "key": "alt+right",
        "command": "-workbench.action.terminal.focusNextPane",
        "when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
    },
    {
        "key": "alt+right",
        "command": "-gitlens.key.alt+right",
        "when": "gitlens:key:alt+right"
    },
    {
        "key": "a",
        "command": "-notebook.cell.insertCodeCellAboveAndFocusContainer",
        "when": "notebookEditorFocused && !inputFocus && !notebookOutputFocused"
    },
    {
        "key": "ctrl+enter",
        "command": "-github.copilot.generate",
        "when": "editorTextFocus && github.copilot.activated && !inInteractiveInput && !interactiveEditorFocused"
    },
    {
        "key": "b",
        "command": "notebook.cell.insertCodeCellBelowAndFocusContainer",
        "when": "notebookEditorFocused && !inputFocus && !notebookOutputInputFocused"
    },
    {
        "key": "b",
        "command": "-notebook.cell.insertCodeCellBelowAndFocusContainer",
        "when": "notebookEditorFocused && !inputFocus && !notebookOutputFocused"
    }
]
```

</details>