Skip to content

Fix stale rendering suppression from utility floats - #8

Merged
techwizrd merged 3 commits into
mainfrom
5-equation-rendering-turns-off-once-cursor-moves
Jun 17, 2026
Merged

techwizrd merged 3 commits into
mainfrom
5-equation-rendering-turns-off-once-cursor-moves

Conversation

@techwizrd

Copy link
Copy Markdown
Owner

Narrow floating-window suppression so render-latex only hides images for completion popups, focusable floating windows, and command-line floats when command-line hiding is explicitly enabled.

This prevents non-focusable utility floats from LazyVim-style UI plugins from permanently suppressing equation image placement after cursor movement. The previous behavior treated every floating window as blocking, which could delete already-rendered images and keep placement suppressed until the float closed.

Add regression coverage for completion popups continuing to suppress image placement, focusable floating windows continuing to suppress image placement, non-focusable utility floats being ignored, and command-line UI floats respecting render.hide_on_cmdline.

Narrow floating-window suppression so render-latex only hides images for completion popups, focusable floating windows, and command-line floats when command-line hiding is explicitly enabled.

This prevents non-focusable utility floats from LazyVim-style UI plugins from permanently suppressing equation image placement after cursor movement. The previous behavior treated every floating window as blocking, which could delete already-rendered images and keep placement suppressed until the float closed.

Add regression coverage for completion popups continuing to suppress image placement, focusable floating windows continuing to suppress image placement, non-focusable utility floats being ignored, and command-line UI floats respecting render.hide_on_cmdline.
@techwizrd techwizrd linked an issue Jun 13, 2026 that may be closed by this pull request
Do not treat arbitrary floating windows as a reason to hide or skip equation image placement. Completion popup menus still suppress placement, and command-line mode still suppresses placement when render.hide_on_cmdline is enabled.

The previous behavior allowed persistent plugin floats to set floating suppression globally. That caused rendered equations to be deleted on cursor movement and prevented them from being placed again while the float remained open.

LazyVim, Obsidian, noice, snacks, and similar UI integrations can keep focusable helper floats around, so filtering only non-focusable floats was still too broad.

Update tests to cover the revised suppression policy: completion popups still suppress image placement, normal floating windows do not suppress image placement, and command-line mode respects render.hide_on_cmdline.

Update help text to document that plugin floats do not hide images.

Validation: make test; make lint; make check; make smoke-base; make smoke-render-markdown; make smoke-doctor; make smoke-health; make smoke-help
Clear terminal image placements when leaving buffers, windows, or tabs, then requeue only markdown buffers visible in the current tab. This prevents Kitty graphics from old layouts from being rendered into a newly opened tab, buffer, or split.

Restrict render visibility checks to current-tab windows for display image placement, inline fallback ranges, cursor reveal checks, and viewport filtering. Also avoid relying on the current window during BufWinLeave, where Neovim event ordering can make it point at the wrong window.

Add regression coverage for transition cleanup, current-tab-only requeueing, inactive-tab markdown buffers, inactive-tab inline fallback behavior, and viewport filtering.

Fixes #9
@techwizrd
techwizrd merged commit c5a546b into main Jun 17, 2026
10 checks 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.

Equation rendering turns off once cursor moves

1 participant