jellydn / CopilotChat.nvim

Chat with GitHub Copilot in Neovim
GNU General Public License v3.0
100 stars 9 forks source link

fix: Close spinner if the buffer does not exist #11

Closed qoobes closed 8 months ago

qoobes commented 8 months ago

WHAT

Hide the spinner if the buffer it's targeting does not exist.

WHY

If you close the vertical split before it's done generating you're going to get spammed with errors because the buffer it's trying to access is invalid.

HOW

Use builtin vim functions to check if the buffer that's being targeted is valid, if it isn't hide the spinner.

Screenshots (if appropriate):

Types of changes

Checklist:

Note: I'm very very new to lua.

changeset-bot[bot] commented 8 months ago

⚠️ No Changeset found

Latest commit: a3c9d81983e8a8876ee6734cfb40b40318d684d1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

jellydn commented 8 months ago

Thanks @qoobes LGTM!

jellydn commented 8 months ago

@all-contributors add @gptlang for code,doc

allcontributors[bot] commented 8 months ago

@jellydn

I've put up a pull request to add @gptlang! :tada:

jellydn commented 8 months ago

@all-contributors add @jellydn for code,doc

allcontributors[bot] commented 8 months ago

@jellydn

I've put up a pull request to add @jellydn! :tada:

jellydn commented 8 months ago

@all-contributors add @qoobes for code

allcontributors[bot] commented 8 months ago

@jellydn

I've put up a pull request to add @qoobes! :tada:

jellydn commented 8 months ago

@all-contributors add @ziontee113 for code

allcontributors[bot] commented 8 months ago

@jellydn

I've put up a pull request to add @ziontee113! :tada: