Skip to content

Fix that enabled sticky_scroll does not show headings everywhere in Markdown files #45663

@Dima-369

Description

@Dima-369

Reproduction steps

  1. Start Zed
  2. Open any Markdown file (I chose this repository's README.md)
  3. Move cursor 2 lines below any heading
  4. Notice how the sticky scroll breadcrumb does not display the heading anymore

Current vs. Expected behavior

Current behavior

It works on the exact heading line or always the empty line below.

Image

But not anymore on any other lines down. Here I am on line 3 and the heading disappears from the sticky_scroll area, apparently:

Image

Expected behavior

When under a Markdown heading, it should always show the closest top heading in the sticky_scroll area.

Not having it, makes it easy to lose track under which heading one is without invoking outline::Toggle.

Zed version and system specs

Zed: v0.217.3+stable.105.80433cb239e868271457ac376673a5f75bc4adb1 (Zed)
OS: macOS 15.6.1
Memory: 16 GiB
Architecture: aarch64

Attach Zed log file

No response

Relevant Zed settings

settings.json
{
  "sticky_scroll": {
    "enabled": true
  }
}

Relevant Keymap

No response

(for AI issues) Model provider details

No response

If you are using WSL on Windows, what flavor of Linux are you using?

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:languages/markdownMarkdown markup supportarea:navigationFeedback for workspace navigation, breadcrumbs, definitions, files, panels, etcfrequency:commonBugs that happen for at least a third of the users across all platforms and kinds of usagepriority:P3Papercuts, minor issues with a clear workaround, cosmetic bugsstate:claimed by communitysomeone from the community has a PR in progressstate:reproducibleVerified steps to reproduce included and someone on the team managed to reproduce

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions