mirror of
https://github.com/patriceckhart/zot.git
synced 2026-06-27 22:06:31 +02:00
Two fixes for image-block rendering after the box refactor. clipBottomClippedImages decides whether to suppress an image escape this frame by scanning forward for the matching "image - ..." info line, treating any non-blank intervening row as a blocker. The image block layout is: escape row + N blank reservation rows + info row. With tool boxes, the reservation rows are wrapped as "\u2502 \u2026 \u2502" and the naive whitespace check now sees them as non-blank \u2014 the scan broke before reaching the info line, decided the image was clipped, and zeroed out the escape sequence. Result: a tall blank gap inside the box where the image should be, with only the metadata caption visible at the bottom (visible on iTerm2 / Kitty / WezTerm). Add isBoxBlankLine() that strips ANSI escapes, surrounding whitespace, and \u2502 box edges before checking for emptiness. Use it in both clipBottomClippedImages and snapViewportStartToImageBlock so the viewport snap-back also recognises wrapped reservation rows. Also add one extra blank reservation row between the image footprint and the muted "image - mime - WxH - sizeKB" caption, so the caption doesn't sit flush against the last pixel row of the image. |
||
|---|---|---|
| .. | ||
| agent | ||
| assets | ||
| auth | ||
| core | ||
| extproto | ||
| provider | ||
| skills | ||
| tui | ||