EdJoPaTo

Results 355 comments of EdJoPaTo

Selection is something done normally with the cursor. Which row is selected is moved up / down by keyboard / mouse. Maybe split the naming more clearly, mark and cursor?...

I am also fine with cursor and selection. Currently, the selection is the cursor. Mixing these feels weird to me. > Generally most widgets / controls in other frameworks will...

Keep in mind that benchmarks are likely biased to the specific problem added in them and might not reflect user usage. It might miss something user code uses that might...

> Side note: there's also a [truncate](https://crates.io/crates/truncate) crate, which does various unicode split_at things, but it uses `unicode-segmentation` instead of `unicode-width` for calculating positions - there's some subtle incompatibilities with...

Added heavily inspired by unicode-truncate code to find the index in order to get the starting index. This allows for taking a reference rather than cloning into an ever-more-allocating String....

> Some test cases expect `" c"` with a space in the beginning where the multi width Unicode was. > This requires padding → Owned data → has a bigger...

> I think there might be some general assumed area.x == 0 in here due to code that uses the span_offset. This works for the tests if the line is...

Out of curiosity I enabled all pedantic and nursery lints for the affected files. They were annoyed about possible truncations and I found a bug with long lines because of...

The logic is somewhat horribly complex as a lot of stuff isn't intuitive… The widths are usize and not u16 as the truncation of the end is implicitly done. That...

> I'm not too worried - most text that's rendered in the context of a tui app isn't > u16::MAX, and when it is the resultant bug is easy to...