Skip to content

fix(tui): expand preview tabs to 4-cell stops - #40

Merged
gitkeniwo merged 3 commits into
mainfrom
perf/preview-tabs
Aug 21, 2026
Merged

fix(tui): expand preview tabs to 4-cell stops#40
gitkeniwo merged 3 commits into
mainfrom
perf/preview-tabs

Conversation

@gitkeniwo

@gitkeniwo gitkeniwo commented Aug 21, 2026

Copy link
Copy Markdown
Owner

Tabs reached ratatui as \t and were filtered as control characters, so
indentation vanished and wrap/selection drifted by one column per tab.

What changed:

  • src/tui/highlight.rs: expand_preview_tabs() + PREVIEW_TAB_WIDTH = 4
  • covered for fragment / README / note previews, before wrapping
  • whole-content copy (copy.content) still preserves source tabs; drag selection copies expanded spaces

Tests / checks:

  • new tests: tab stops, cross-span carry, CJK wrap, Makefile recipe highlight, preview document + integration check
  • cargo test --all-features 508 passed · cargo fmt --check / cargo clippy (all features + no-default) clean

Base: main · Branch: perf/preview-tabs

@gitkeniwo
gitkeniwo merged commit a93720f into main Aug 21, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant