File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1055,7 +1055,7 @@ end
10551055function Previewer .base :attach_snacks_image_buf (buf , entry )
10561056 --- @diagnostic disable-next-line : undefined-field
10571057 local simg = self .snacks_image .enabled and (_G .Snacks or {}).image
1058- if not simg or not simg .supports (entry .path ) then
1058+ if not simg or not simg .config . enabled or not simg . supports (entry .path ) then
10591059 return false
10601060 end
10611061 simg .buf .attach (buf , { src = entry .path })
@@ -1067,6 +1067,7 @@ function Previewer.base:attach_snacks_image_inline()
10671067 local simg = (_G .Snacks or {}).image
10681068 local bufnr , preview_winid = self .preview_bufnr , self .win .preview_winid
10691069 if not simg
1070+ or not simg .config .enabled
10701071 or not self .snacks_image .enabled
10711072 or not self .snacks_image .render_inline
10721073 or vim .b [bufnr ].snacks_image_attached then
You can’t perform that action at this time.
0 commit comments