helix/helix-term/tests/test
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
..
commands fix: trim whitespace up to the last selection on insert_newline (#13673) 2025-06-03 08:45:19 -05:00
languages Trim all trailing whitespace on insert_newline 2024-12-05 20:53:53 +09:00
auto_indent.rs Factor out line ending handling in integration tests (#9921) 2024-03-31 07:12:17 -05:00
auto_pairs.rs Factor out line ending handling in integration tests (#9921) 2024-03-31 07:12:17 -05:00
command_line.rs Improve %% escaping error message (#13018) 2025-03-04 10:03:11 -06:00
commands.rs Fix prompt truncation for non-ASCII lines 2025-06-19 10:44:06 -04:00
helpers.rs feat: passing multile of the same files in the arguments places a cursor at each position (#12192) 2025-01-23 14:04:02 -06:00
movement.rs feat: highlight rust string interpolation macros that use `format_args!` (#13533) 2025-05-24 10:02:32 -05:00
splits.rs Use a temporary file for writes (#9236) 2024-03-31 17:43:09 -05:00