Skip to content

AI: Insert Selection in long New message doesn’t auto-scroll into view #39694

@oluckyman

Description

@oluckyman

Summary

Insert Selection (assistant::QuoteSelection / cmd->) adds the selection on the next line and moves the cursor after it, but the New message editor doesn’t scroll, so the UI shows no visible change.

Description

Here when I hit cmd->, cursor disappears. And then I have to scroll manually to see that selection was inserted.

SS.2025-10-07.at.17.58.36.mov

without visual feedback I often find myself trying to insert selection multiple times only to discover that it works, but I didn't see it.

Steps to trigger the problem:

  1. Open the Agent Panel.
  2. In the New message input, compose a long message that exceeds the textarea height so vertical scrolling appears.
  3. Ensure the caret is at the end of the last visible line (near the right-bottom of the viewport).
  4. Select some code in the editor buffer.
  5. Trigger the insert selection shortcut (assistant::QuoteSelection / cmd->).
  6. Observe that cursor disappears and UI appears unchanged. But if you scroll down the selection is inserted on the next line and the cursor is placed after it.

Expected Behavior:
After insertion, the editor should scroll to reveal the new line with inserted selection and caret position.

Actual Behavior:
Selection is inserted off-screen (next line), caret moves after it, but the editor does not auto-scroll, leaving the UI looking unchanged.

Model Provider Details

  • Mode: Agent Panel

Zed Version and System Specs

Zed: v0.206.7 (Zed)
OS: macOS 15.6.1
Memory: 16 GiB
Architecture: aarch64

Metadata

Metadata

Assignees

Labels

aiImprovement related to Agent Panel, Edit Prediction, Copilot, or other AI features

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions