Skip to content

Commit fccf70e

Browse files
committed
[tuify] Make text clipping function pub, so other crates can use it, eg: r3bl_terminal_async
1 parent 8c9f995 commit fccf70e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tuify/src/components/select_component.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,10 @@ impl<W: Write> FunctionComponent<W, State<'_>> for SelectComponent<W> {
358358
}
359359
}
360360

361-
fn clip_string_to_width_with_ellipsis(mut header_text: String, viewport_width: ChUnit) -> String {
361+
pub fn clip_string_to_width_with_ellipsis(
362+
mut header_text: String,
363+
viewport_width: ChUnit,
364+
) -> String {
362365
let unicode_string = UnicodeString::from(header_text);
363366
let unicode_string_width = unicode_string.display_width;
364367
let available_space_col_count: ChUnit = viewport_width;

0 commit comments

Comments
 (0)