Skip to content

Add buffer-kill-hooks to abort gptcommit when magit buffers are killed #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 20, 2025

Conversation

rogsme
Copy link
Contributor

@rogsme rogsme commented Mar 19, 2025

  • Added a new function magit-gptcommit--buffer-kill-hook to abort the gptcommit process when a magit buffer is killed.
  • Added a hook kill-buffer-hook to call the magit-gptcommit--buffer-kill-hook function when a buffer is killed.
  • This change aims to ensure that the gptcommit process is not interrupted if a magit buffer is killed, preventing potential issues in the workflow.

Fixes #20

fixed.mp4

- Added a new function `magit-gptcommit--buffer-kill-hook` to abort the gptcommit process when a magit buffer is killed.
- Added a hook `kill-buffer-hook` to call the `magit-gptcommit--buffer-kill-hook` function when a buffer is killed.
- This change aims to ensure that the gptcommit process is not interrupted if a magit buffer is killed, preventing potential issues in the workflow.
@douo
Copy link
Owner

douo commented Mar 20, 2025

Thank you for your work.

@douo douo merged commit dd39f92 into douo:master Mar 20, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

If I close the magit window before GPT commit finishes generating a result, magit-gptcommit breaks hard
2 participants