-
fix: artifacts from previous frames were bleeding through in TUI (#989)
发布于
2025-05-17 17:51:11 +00:00 Prior to this PR, I would frequently see glyphs from previous frames
"bleed" through like this:I think this was due to two issues (now addressed in this PR):
- We were not making use of
ratatui::widgets::Clearto clear out the
buffer before drawing into it. - To calculate the
widthused withwrapped_line_count_for_cell(), we
were not accounting for the scrollbar. - Now we calculate
effective_widthusing
inner.width.saturating_sub(1)where the1is for the scrollbar. - We compute
text_areausingeffective_withand pass thetext_area
toparagraph.render(). - We eliminate the conditional
needs_scrollbarcheck and always call
render(Scrollbar)
I suspect this bug was introduced in
https://github.com/openai/codex/pull/937, though I did not try to
verify: I'm just happy that it appears to be fixed!下载附件
- We were not making use of