Expand description
Preview pane renderer: renders parsed markdown in the diff area.
Mermaid diagrams rendered as inline images by writing terminal-specific escape sequences (iTerm2 OSC 1337, Kitty graphics protocol) directly to stdout after ratatui’s buffer flush. This bypasses ratatui’s buffer system which cannot represent image protocol data.
Structs§
- Pending
Image - Info about where an image should be rendered (collected during layout, written to stdout after ratatui flushes).
Functions§
- clear_
stale_ images - Clear any stale inline images by overwriting all cells. Call when previous frame had images but current frame does not.
- flush_
images - Write pending images to stdout using the appropriate terminal protocol.
Call this AFTER terminal.draw() so ratatui’s buffer has already been flushed.
had_images_last_frame: if true andimagesis empty, clears stale images. - is_
current_ file_ markdown - render_
preview - Render markdown preview. Returns pending images that need to be written to stdout AFTER terminal.draw() completes.