зеркало из
https://github.com/glebtv/tui-textarea.git
synced 2026-09-08 00:15:50 +03:00
feat: add unicode-aware soft-wrap modes and wrapped rendering (#8)
* feat(textarea): add unicode-aware soft-wrap modes and wrapped rendering
- add WrapMode API/state: None, Word, Glyph, WordOrGlyph
- keep None behavior unchanged (horizontal scroll)
- implement wrapped render path with logical-to-visual row mapping
- add Unicode-aware wrapping via unicode-segmentation + unicode-width
- make wrap width tab-aware to prevent hidden text
- apply cursor-line style on wrapped continuation rows
- fix selection at soft-wrap boundaries (no synthetic highlighted space)
- add wrap-focused tests for long text, newlines, tabs, tiny widths, and line-number
continuations
* chore(release): bump to v0.9.0 and update README/CHANGELOG
Этот коммит содержится в:
@@ -3,7 +3,7 @@ name = "tui-textarea-2"
|
||||
homepage = "https://github.com/srothgan/tui-textarea#readme"
|
||||
repository = "https://github.com/srothgan/tui-textarea"
|
||||
documentation = "https://docs.rs/tui-textarea-2/latest/tui_textarea/"
|
||||
version = "0.8.0"
|
||||
version = "0.9.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.56.1" # for `tui` crate support
|
||||
authors = ["Simon Peter Rothgang <simonrothgang@icloud.com>", "rhysd <lin90162@yahoo.co.jp>"]
|
||||
@@ -53,6 +53,7 @@ termion-15 = { package = "termion", version = "1.5", optional = true }
|
||||
termwiz = { version = "0.23.0", optional = true }
|
||||
tui = { version = "0.19", default-features = false, optional = true }
|
||||
unicode-width = "0.2.0"
|
||||
unicode-segmentation = "1.10.1"
|
||||
serde = { version = "1", optional = true , features = ["derive"] }
|
||||
|
||||
[[example]]
|
||||
|
||||
Ссылка в новой задаче
Block a user