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

19 Коммитов

Автор SHA1 Сообщение Дата
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
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
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
rhysd
8d2c201aff add tests for TextArea::selection_range 2024-08-08 22:40:15 +09:00
rhysd
9e3df38b54 fix inser_str doesn't handle \r\n and ignores newline at end of input 2023-11-19 22:08:25 +09:00
rhysd
1194331a02 fix TextArea::set_yank_text doesn't support CRLF (\r\n) for newline 2023-11-18 18:28:32 +09:00
rhysd
13ce6aa6d5 fix selected text is not deleted on paste 2023-11-15 01:57:48 +09:00
rhysd
523a888f26 implement TextArea::select_all
but it is not assigned to default key shortcuts because C-a is already
in use.
2023-11-15 00:11:18 +09:00
rhysd
9d03463237 test positions after undo/redo 2023-11-13 20:32:15 +09:00
rhysd
bae9d4cee3 refactor undo/redo implementation 2023-11-13 19:29:43 +09:00
rhysd
f0370e850c add more tests for deleting text 2023-11-12 23:06:25 +09:00
rhysd
a54ce36d22 refactor text selection and add more tests (fix #6) 2023-11-12 18:22:17 +09:00
pm100
5a2649abe9 implement select (#45)
* select, second go using new multiline code

* implemented internal delete_str, added tests

* delete_str_internal must not put non deleted strings into history. Ie ctrlc should not change history

* delete_str was taking lines out in the non delete case

* corrected comment

* fixes after feedback. Plus multichar bugs. change modal sample
2023-11-10 21:10:04 +09:00
rhysd
a7731be860 add tests for multi-bytes characters 2023-11-03 02:31:27 +09:00
rhysd
1283081f82 keep yanked lines in Vec 2023-11-02 22:54:28 +09:00
rhysd
9db8a3d31a test TextArea::undo after insert_str and delete_str 2023-11-02 21:08:21 +09:00
rhysd
b324ccd9fd allow TextArea::delete_str to delete across newlines 2023-11-02 21:01:27 +09:00
rhysd
8bc9ff4dba add tests for TextArea::insert_str 2023-11-01 21:32:15 +09:00
rhysd
68275e4932 consider wide chars on calculating tab width 2023-10-21 00:30:36 +09:00