Skip to content

fix: add BufEnter to document integration autocmds#348

Open
charlesg3 wants to merge 1 commit into3rd:masterfrom
charlesg3:fix/document-bufenter-autocmd
Open

fix: add BufEnter to document integration autocmds#348
charlesg3 wants to merge 1 commit into3rd:masterfrom
charlesg3:fix/document-bufenter-autocmd

Conversation

@charlesg3
Copy link

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.
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

1 participant