You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
BUG: Division by zero potential in imageRows when cellHeight is 0 #865
In imageRows() (view/html.go:274-278), cellHeight from getCellHeightFromFd() could return 0 if the terminal doesn't support the ioctl query. The division (h + cellHeight - 1) / cellHeight would then panic with division by zero.
To reproduce
Run matcha in a terminal that doesn't report cell size via ioctl
Open an email with an inline image
Observe division by zero panic
Expected behavior
Check cellHeight > 0 before dividing, default to a reasonable fallback (e.g. 16px).
Activity
mavonx commentedon Apr 28, 2026
/assign
fix: handle zero terminal cell height (#1184)