Skip to content

Zed don't collapse the whole function when meet a text block #15378

@Wangmz-1211

Description

@Wangmz-1211

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

I'm writing some Rust code like this:

struct SomeStruct;
impl Display for SomeStruct {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let a = "a";
        write!(
            f,
            r#"
Some contents....{}

"#,
            a
        )?;
                

        Ok(())
    }
}

but when I collapse the function (or impl block), it behaves like this:

(before collapsing)
image

(after collapsing)
image

Environment

Zed: v0.145.1 (Zed)
OS: macOS 15.0.0
Memory: 16 GiB
Architecture: aarch64

If applicable, add mockups / screenshots to help explain present your vision of the feature

As described earlier

If applicable, attach your Zed.log file to this issue.

Zed.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:editorFeedback for code editing, formatting, editor iterations, etcarea:languagesAn umbrella label for all programming languages syntax behaviorsarea:languages/rustRust programming language supportbugDEPRECATED label: use issue type 'Bug' insteadstaleLabel used by `stale` action

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions