dailz
5cb56dafd8
fix(core): correct tab-stop alignment and width overflow in wrap_line_chars
...
- Extract TAB_WIDTH constant (4) replacing magic numbers
- Calculate tab stop as TAB_WIDTH - (col % TAB_WIDTH) for proper alignment
- Split tab expansion across rows when width < TAB_WIDTH
- Update test_wrap_with_tab expected value for new behavior
- Add tests: narrow width, stop alignment, line boundary, regression
Fixes : #27
2026-06-11 13:37:14 +08:00
dailz
e99861c76d
fix(tui): add MAX_WRAP_INPUT_LEN guard to prevent UI freeze on oversized lines ( closes #26 )
...
- compute_line_entry/compute_visual_height: double guard (raw + post-format)
- Skip detect_level on oversized raw input to avoid O(n) JSON parsing
- Add post-format guard for JSON lines that expand beyond 10MB
- progressive_reader: add post-format guard to compute_line_visual_height
- Add truncate_to_columns helper using existing wrap_line_chars
- Fix misleading docstring on MAX_WRAP_INPUT_LEN constant
- Add 6 regression tests covering all guard paths
2026-06-11 13:15:11 +08:00
dailz
b58d66f2aa
fix(io): use unicode-width for correct CJK/emoji/zero-width display width ( closes #12 )
2026-06-07 12:50:17 +08:00
dailz
210eecfa66
feat(core): extract wrap utilities and extend LineIndex for progressive loading
...
Move wrap_line_chars and format_json_line from app.rs to core/io/wrap.rs with MAX_WRAP_INPUT_LEN guard. Add serde derives, pub getters, and extend_from_bytes() to LineIndex for incremental index building.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai >
2026-04-14 09:06:52 +08:00