Skip to content

Clicking on editor while Go To Line is active should not jump back to the previous cursor location #35347

@BHSPitMonkey

Description

@BHSPitMonkey

Summary

When "Go to line" is visible, clicking (or dragging/etc.) on the editor should work as normal (and dismiss the "Go to line" dialog) instead of cancelling the operation and returning the scroll position back to where it was before.

Possibly related to #257

Description

Steps to reproduce:

  1. Have a long file open in the editor
  2. Open "Go to line" (using keyboard shortcut or command palette)
  3. Enter a line number for some other section of the file (without pressing Enter to finish)
  4. With the desired section of the file visible, try to place your text cursor somewhere or select a range using the mouse

Expected Behavior:

The click places the cursor (or selects the range etc.) as it normally would when editing

Actual Behavior:

The click cancels the "Go to line" activity and the scroll position jumps back to where it was before step 2

Zed Version and System Specs

Zed: v0.196.6 (Zed)
OS: Linux Wayland ubuntu 25.04
Memory: 61.1 GiB
Architecture: x86_64
GPU: Intel(R) Arc(tm) Graphics (MTL) || Intel open-source Mesa driver || Mesa 25.0.7-0ubuntu0.25.04.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bite-sizesmall issueseditorFeedback for code editing, formatting, editor iterations, etcgood first issueIssue suitable for first-time contributors

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions