fix(terminal): use grapheme_width for accurate column slicing
text_in_cols and text_slice_cols now walk grapheme clusters with grapheme_width() instead of assuming 1 char = 1 column. This fixes column slicing for: - Wide characters (CJK, emoji) that occupy 2 grid columns - Combining marks that occupy 0 columns The prior 1:1 char∶col mapping caused selection-copy and serialize output to misalign column ranges when wide/combining characters were present in a row. - Update roadmap: mark both P0 follow-up items as resolved
This commit is contained in:
@@ -62,7 +62,7 @@
|
||||
- 实现于 `component.rs`(`Selection`/`selection_rects`/`point_to_cell`/鼠标处理)+ `core.rs::selection_text` + `core.rs::TerminalRow::text_in_cols`,均有单元测试。
|
||||
3. **快捷键**:Ctrl-Shift-C 复制 / Ctrl-V 粘贴。
|
||||
|
||||
**已知后续项(非阻塞)**:拖拽到视窗边缘时**没有自动滚动延伸选区**(需先滚到位再选);行内 wide+组合字符混排的列切片为近似。
|
||||
**已知后续项(非阻塞)**:拖拽到视窗边缘时**没有自动滚动延伸选区**(✅ 已通过上一轮 auto-scroll 实现);行内 wide+组合字符混排的列切片(✅ 已通过 grapheme_width 修正 text_in_cols / text_slice_cols)。
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user