fix(tui): harden rendering and centralize tests
This commit is contained in:
1 parent
9b17ec96c5
commit
64bb5e2d16
66 files changed
+271
-48
No files matched your search
@@ -165,7 +165,7 @@ pub fn confirm_popup_area(frame_area: Rect, target: &ConfirmTarget) -> Rect {
|
||||
use super::word_wrap_size;
|
||||
use ratatui::layout::Constraint;
|
||||
const MAX_W: usize = 48;
|
||||
let title_w = target.name().len() + 12;
|
||||
let title_w = Span::raw(target.name()).width() + 12;
|
||||
let (body_w, _) = word_wrap_size(target.body(), MAX_W);
|
||||
let inner_w = title_w.max(body_w).min(MAX_W);
|
||||
let (_, lines) = word_wrap_size(target.body(), inner_w);
|
||||
|
||||
Reference in new issue
Block a user