helix/helix-tui
Michael Davis d3fb8fc9b8
Fix prompt truncation for non-ASCII lines
The prompt was previously assuming that each grapheme cluster in the
line was single-width and single-byte. Lines like the one in the new
integration test would cause panics because the anchor attempted to
slice into a character.

This change rewrites the anchor and truncation code in the prompt to
account for Unicode segmentation and width. Now multi-width graphemes
can be hidden by multiple consecutive elipses - for example "十" is
hidden by "……" (2-width).

Co-authored-by: Narazaki, Shuji <shujinarazaki@protonmail.com>
2025-06-19 10:44:06 -04:00
..
src Fix prompt truncation for non-ASCII lines 2025-06-19 10:44:06 -04:00
tests tui: Constify functions, shrink Margin representation 2024-05-21 04:34:36 +09:00
.gitignore Inline tui as helix-tui fork. 2021-05-09 17:52:55 +09:00
Cargo.toml build(deps): bump the rust-dependencies group with 5 updates (#13070) 2025-03-11 08:29:38 -05:00
README.md Fix grammatical error (#1427) 2022-01-04 10:45:31 +09:00

README.md

helix-tui

This library is a fork of the great library tui-rs. We've mainly relied on the double buffer implementation and render diffing, side-stepping its widget and layouting.