1
0
зеркало из https://github.com/glebtv/tui-textarea.git synced 2026-08-28 11:36:17 +03:00

32 Коммитов

Автор SHA1 Сообщение Дата
Gleb Tv
b542e179ae feat(keymap): bind Ctrl+Backspace/Ctrl+Delete to word deletion
Add the de-facto standard terminal/editor hotkeys to the default key map:
- Ctrl+Backspace -> delete_word
- Ctrl+Delete -> delete_next_word

Previously only Alt+Backspace/Ctrl+w and Alt+Delete/Alt+d were bound,
which conflicts with muscle memory from readline, VS Code and other TUIs.
2026-08-17 20:47:38 +03:00
srothgan
475f0beb82 feat(textarea): add native cursor render mode (#26)
* feat(textarea): add native cursor render mode

- Add CursorRenderMode::{Cell, Hidden} and TextArea accessors for render mode plus rendered_cursor_position().
- Store the terminal-relative cursor position from a shared render plan that accounts for blocks, line numbers, scroll, wrapping, tabs, and wide Unicode.
- Let hidden mode suppress only the textarea-owned cursor cell while preserving default Cell rendering and set_cursor_style behavior.
- Document native cursor integration and add focused tests for default rendering, hidden rendering, placeholders, and cursor-position edge cases.

* chore: prepare 0.12.1 release
2026-07-10 20:14:27 +10:00
srothgan
d6335585bc chore: prepare 0.12.0 release (#25) 2026-07-01 05:12:31 +10:00
srothgan
8f708cfdc7 feat: add screen/data cursor maps for wrapped movement (#17)
* feat!: remove tui-rs support and map screen cursors

* docs(examples): add fixed-size recording mode

* chore(release): bump to v0.11.0
2026-05-03 16:48:05 +10:00
srothgan
f20df6b965 feat: set lines measure cache (#16)
* feat(textarea): add bulk replace API and transparent measure() caching

- add TextArea::set_lines(lines, cursor) for direct whole-buffer replacement
- preserve widget configuration while resetting history, selection, highlights, viewport scroll, and cached measurement state
- cache measure(width_cols) results by outer width and reuse them until dependencies change
- invalidate cached measurement on content edits, undo/redo, and measure-affecting setters
- add focused tests for set_lines behavior and cache correctness

* chore(release): bump to v0.10.2 and refresh docs

- prepare the v0.10.2 release with updated crate version and changelog entry
- refresh README coverage for fork-added APIs including wrapping, measurement, bulk replace, and custom highlights
2026-03-13 20:58:29 +10:00
srothgan
cb6c431908 feat: wrapped line cursor navigation (#15)
* feat(cursor): add Up/Down navigation between wrapped visual lines

- Extend CursorMove::next_cursor() with optional wrapped rows parameter so Up/Down use visual row indices when wrapping is active
- Compute wrapped rows in move_cursor_with_shift() and pass them through
- Fix cursor_at_visual_row() boundary clamping for non-last wrapped segments to prevent the cursor landing on the next visual line
- Preserve visual column offset when moving between wrapped rows so the cursor moves straight vertically instead of jumping to row start/end

* chore(release): bump to v0.10.1 and update changelog
2026-03-06 04:15:19 +10:00
srothgan
1a64a949b6 Feat/textarea row measurement min max (#14)
* feat(textarea): add row measurement API with configurable min/max bounds

- add TextAreaMeasure and TextArea::measure(width_cols)
- make measurement wrap-aware and include block chrome rows
- add set_min_rows/set_max_rows (+ getters) with invariant normalization
- clamp preferred_rows to effective [min_rows, max_rows]
- export TextAreaMeasure at crate root
- switch examples/variable.rs to measured preferred_rows
- add integration tests for measure + min/max behavior

* chore(release): bump to v0.10.0 and update changelog
2026-02-26 01:00:26 +10:00
srothgan
56f531a73f chore: migrate to Rust 2024 edition and bump to v0.9.2 (#12)
* chore: migrate to Rust 2024 edition and bump to v0.9.2

- Bump edition to 2024 and rust-version to 1.85.0
- Replace f64::log10 with usize::ilog10 in num_digits
- Fix clippy lints surfaced by edition bump: repeat_n, derived Default, then_some
- Expand watch-check and watch-test aliases to cover all feature paths (crossterm_0_28, no-backend, tuirs variants, serde, arbitrary)
- Expand CI test and clippy workflows to full 6/8-entry feature matrices including termion on Ubuntu
- Apply rustfmt import reordering from edition 2024 rules

* fix: revert turis linux checks
2026-02-20 03:38:50 +10:00
srothgan
f03a7b9ec1 fix(textarea): clamp undo/redo cursor after oversized delete_str (#9) 2026-02-19 07:37:00 +10:00
srothgan
1740facd24 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
2026-02-19 03:26:48 +10:00
srothgan
43afdc5ce1 chore/integrate-open-prs (#5)
* docs: integrate upstream PR #116

* feat: integrate upstream PR #113

* chore: add portable-atomic for viewport atomics (upstream PR #111)

* fix(examples): integrate upstream PR #100

* fix(word): integrate upstream PR #98

* fix(widget): handle wide unicode char widths in horizontal scroll (upstream PR #94)

* feat(highlight): integrate upstream PR #93

* chore(release): prepare v0.8.0 docs and CI-clean merged upstream updates

* docs(license): rename LICENSE.txt to LICENSE and fix header capitalization
2026-02-18 23:34:50 +10:00
srothgan
b361f74b06 chore: rename crate to tui-textarea-2 and update metadata/docs links (#2)
* chore: rename crate to tui-textarea-2 and update metadata/docs links

* chore: prepare v0.7.1 publish for tui-textarea-2

* ci(release): automate publish, tag, and release after merge to main
2026-02-18 21:39:59 +10:00
rhysd
7f2722256d update changelog for v0.7.0 changes 2024-10-23 01:28:45 +09:00
rhysd
d4342dceef update changelog for v0.6.1 changes 2024-08-09 01:04:23 +09:00
rhysd
93cfabdc69 update changelog for v0.6.0 changes 2024-08-08 00:34:30 +09:00
rhysd
1a639ed931 update changelog for v0.5.3 changes 2024-08-03 23:55:53 +09:00
rhysd
774f68c1b7 update changelog for v0.5.1 changes 2024-07-12 23:52:33 +09:00
rhysd
b2f805bbe5 update changelog for v0.5.0 changes 2024-07-07 23:52:09 +09:00
rhysd
8b092dcdcf update changelog for v0.4.0 changes 2023-11-19 23:44:18 +09:00
rhysd
2740b89a51 update changelog for v0.3.1 changes 2023-11-05 01:09:31 +09:00
rhysd
80e1db129a update changelog for v0.3.0 changes 2023-10-25 00:10:56 +09:00
rhysd
e3783d1baf update changelog for v0.2.4 changes 2023-10-22 01:24:05 +09:00
rhysd
3f7db1db84 update changelog for v0.2.2 and v0.2.3 changes 2023-10-20 22:25:17 +09:00
rhysd
43286092c6 update changelog for v0.2.1 changes 2023-10-02 02:09:41 +09:00
rhysd
623eea58fe update changelog for v0.2.0 changes 2022-10-18 20:00:40 +09:00
rhysd
21aa0ee638 update changelog for v0.1.6 changes 2022-09-28 23:27:37 +09:00
rhysd
75af9fa5ab update changelog for v0.1.5 changes 2022-07-18 20:21:26 +09:00
rhysd
f5e3347e4c update changelog for v0.1.4 changes 2022-07-11 01:07:54 +09:00
rhysd
e11a97ce49 update changelog for v0.1.3 changes 2022-07-08 18:30:44 +09:00
rhysd
6a5e92c10e update changelog for v0.1.2 changes 2022-06-25 11:53:33 +09:00
rhysd
fdd48efb39 update changelog for v0.1.1 changes 2022-06-21 16:02:34 +09:00
rhysd
a852f84fbc add changelog for v0.1.0 release 2022-06-19 21:27:30 +09:00