use { super::util::spaces, ratatui::{ style::Style, text::{Line, Span}, }, std::{borrow::Cow, cmp::Ordering, iter}, unicode_width::UnicodeWidthChar as _, }; enum Boundary { Cursor(Style), Select(Style), End, } impl Boundary { fn cmp(&self, other: &Boundary) -> Ordering { fn rank(b: &Boundary) -> u8 { match b { Boundary::Cursor(_) => 3, Boundary::Select(_) => 1, Boundary::End => 0, } } rank(self).cmp(&rank(other)) } fn style(&self) -> Option