Skip to content

fix: add BufEnter to document integration autocmds#348

Merged
3rd merged 1 commit into
3rd:masterfrom
charlesg3:fix/document-bufenter-autocmd
May 11, 2026
Merged

fix: add BufEnter to document integration autocmds#348
3rd merged 1 commit into
3rd:masterfrom
charlesg3:fix/document-bufenter-autocmd

Conversation

@charlesg3
Copy link
Copy Markdown
Contributor

Summary

  • Add BufEnter event to the document integration autocmd group in lua/image/utils/document.lua
  • Without this, images don't render when revisiting an already-loaded buffer (e.g. opening from nvim-tree, :bnext/:bprev)
  • BufWinEnter only fires the first time a buffer is displayed in a window; BufEnter fires every time

Fixes #347

Without BufEnter, images don't re-render when switching buffers in the
same window (e.g. :bnext, :bprev). BufEnter fires on buffer switches
within a window, complementing WinNew, BufWinEnter, and TabEnter.
@3rd
Copy link
Copy Markdown
Owner

3rd commented May 11, 2026

Thank you for your work!

@3rd 3rd merged commit 72e5a91 into 3rd:master May 11, 2026
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.

Document integration images don't render when opening files from nvim-tree or revisiting buffers

2 participants