Skip to content

feat(api): add global emitter for DiffviewFilesStaged User autocmd#98

Merged
dlyongemallo merged 1 commit intomainfrom
add_files_staged_emitter
Apr 9, 2026
Merged

feat(api): add global emitter for DiffviewFilesStaged User autocmd#98
dlyongemallo merged 1 commit intomainfrom
add_files_staged_emitter

Conversation

@dlyongemallo
Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings April 9, 2026 08:45
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new User autocmd (DiffviewFilesStaged) by forwarding the internal “files staged/unstaged” event to DiffviewGlobal.emitter, and bridging that to Neovim’s :autocmd User mechanism.

Changes:

  • Forward EventName.FILES_STAGED from DiffView’s local emitter to DiffviewGlobal.emitter.
  • Emit User autocmd DiffviewFilesStaged when the global files_staged event fires.
  • Document the new DiffviewFilesStaged User autocmd.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
lua/diffview/scene/views/diff/diff_view.lua Forwards the view-local FILES_STAGED event to the global emitter.
lua/diffview/init.lua Bridges the new global files_staged event to a User autocmd.
doc/diffview.txt Documents the new DiffviewFilesStaged User autocmd.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lua/diffview/scene/views/diff/diff_view.lua Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dlyongemallo dlyongemallo merged commit 7a6c57e into main Apr 9, 2026
6 checks passed
@dlyongemallo dlyongemallo deleted the add_files_staged_emitter branch April 9, 2026 09:18
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.

2 participants