Skip to content

Question: Why do certain API calls leave a [Scratch] buffer after they finish? #3045

Description

@ngpong

Description

Hi there!

I’ve noticed that after calling certain APIs, such as full-name.lua and Api.node.show_info_popup, a [Scratch] buffer remains in the buffer list. When I open the buffer list using :ls!, I see many [Scratch] buffers, which makes me a bit confused.

I’ve found that some plugins (but not all) also use this approach, but I don’t fully understand the purpose behind it. At the same time, I’m somewhat concerned that if there are a large number of [Scratch] buffers, it might impact performance (though this is just my speculation, and I don’t have actual benchmark data to support it).

This question is more of a discussion threads, so if you don't think it's quite right, I can move it to the discussion area. In any case, have a great life and thanks to everyone in the community for their hard work!

Best wishes!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    PR pleasenvim-tree team does not have the bandwidth to implement; a PR will be gratefully appreciatedbugSomething isn't workingreproducedIssue confirmed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions