helix/helix-tui/src
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
..
backend tui: Port improvement from ratatui on crossterm 0.28 (https://github.com/ratatui-org/ratatui/pull/1072) 2024-08-07 04:30:38 +09:00
widgets Make signature_help more like hover, fix overflow and lack of scrolling in signature_help (#13566) 2025-05-27 10:18:12 -05:00
buffer.rs Fix prompt truncation for non-ASCII lines 2025-06-19 10:44:06 -04:00
layout.rs tui: Constify functions, shrink Margin representation 2024-05-21 04:34:36 +09:00
lib.rs Add undercurl config option #6196 (#6253) 2023-03-14 11:53:38 +09:00
symbols.rs Inline tui as helix-tui fork. 2021-05-09 17:52:55 +09:00
terminal.rs Stop Terminal::drop from overriding work of Terminal::restore. (#7931) 2023-08-15 12:19:24 +09:00
text.rs fix(clippy): clippy 1.83 lints (#12150) 2024-12-02 08:23:32 -06:00