1
0
зеркало из https://github.com/glebtv/tui-textarea.git synced 2026-09-03 22:35:50 +03:00
Граф коммитов

165 Коммитов

Автор SHA1 Сообщение Дата
rhysd
8c0a76b052 add simple modal text editor example 2022-10-20 08:39:19 +09:00
rhysd
2c553674a9 add more mappings to Vim-like mappings usage 2022-10-20 08:09:35 +09:00
rhysd
f3404707f6 add scroll mappings to modal editor usage in document 2022-10-19 21:34:22 +09:00
rhysd
623eea58fe update changelog for v0.2.0 changes 2022-10-18 20:00:40 +09:00
rhysd
76d3d8f41b bump up version to v0.2.0 2022-10-18 19:36:19 +09:00
rhysd
eb4103e581 add default key maps for scrolling down/up by page 2022-10-17 21:54:36 +09:00
rhysd
972dfead2d separate Scrolling to src/scroll.rs 2022-10-14 21:44:02 +09:00
rhysd
5b4d1cc7c7 add documents and tests for scrolling by half/full page with Scrolling 2022-10-14 21:44:02 +09:00
rhysd
a4c51a4812 implement scrolling down/up by half/full page 2022-10-14 21:44:02 +09:00
rhysd
ce5dc54cd4 add regression test case for #4 2022-10-04 17:58:18 +09:00
rhysd
0ca8573982 fix panic when max history is zero (fix #4) 2022-10-04 17:25:32 +09:00
rhysd
4e1a99988f implement Scrolling enum to specify scrolling more flexibly
this is a breaking change. next release should be v0.2.0.
2022-10-03 20:59:26 +09:00
rhysd
2f300b9dfa add #[non_exhaustive] to CursorMove 2022-10-03 10:34:30 +09:00
rhysd
3f26740072 fix tui dependency version in benchmark crate 2022-10-02 21:20:27 +09:00
rhysd
21aa0ee638 update changelog for v0.1.6 changes 2022-09-28 23:27:37 +09:00
rhysd
b44870a0af bump up version to v0.1.6 2022-09-28 23:05:57 +09:00
rhysd
d805c3709a improve textarea.alignment and textarea.set_alignment document and add doc tests for them 2022-09-28 21:24:23 +09:00
rhysd
0ffaee324f disable line numbers when right or center alignment is set 2022-09-28 21:23:41 +09:00
rhysd
ffd8b1c5f7 fix errors reported by lints 2022-09-28 21:07:20 +09:00
Alexander Ananiev
3387f93319 Alignment for TextArea (#3)
* Add alignment for text

* Add alignment for text

* Go back tui version
2022-09-28 21:06:42 +09:00
rhysd
bf4246482e update tui to 0.19 and crossterm to 0.25 2022-08-15 20:39:01 +09:00
rhysd
be6eed684d rename parameters of TextArea::scroll 2022-07-24 10:37:15 +09:00
rhysd
4d6ad3d76b Merge branch 'scroll' (fix #2) 2022-07-24 10:30:31 +09:00
rhysd
63ae3503d4 add document and doc tests for TextArea::scroll and CursorMove::InViewport 2022-07-24 10:05:27 +09:00
rhysd
b54fe5c01d implement vertial mouse scroll with both crossterm and termion supports 2022-07-23 20:09:26 +09:00
rhysd
2f7fd0c53d implement TextArea::scroll and CursorMove::InViewport 2022-07-23 19:21:29 +09:00
rhysd
ae4dc99eea use rust-cache action v2 2022-07-23 11:22:09 +09:00
rhysd
8097183e75 add tests for CursorMove::Top and CursorMove::Bottom 2022-07-20 15:50:00 +09:00
rhysd
851db5eadb add CursorMove tests for multi-byte characters 2022-07-19 18:49:13 +09:00
rhysd
a7206db6f9 add tests for CursorMove::Head and CursorMove::End 2022-07-19 18:00:04 +09:00
rhysd
0341a4beaa add tests for CursorMove::Up and CursorMove::Down 2022-07-19 14:36:29 +09:00
rhysd
479b060624 set MSRV to 1.56.1 depending on tui v0.18.0 2022-07-19 11:17:57 +09:00
rhysd
cd14cc10d6 separate section to run a fuzzer in CONTRIBUTING.md 2022-07-18 20:30:44 +09:00
rhysd
75af9fa5ab update changelog for v0.1.5 changes 2022-07-18 20:21:26 +09:00
rhysd
6af9b24b59 bump up version to v0.1.5 2022-07-18 19:49:09 +09:00
rhysd
dbee036ce6 support generating random CursorMove with arbitrary 2022-07-18 11:43:30 +09:00
rhysd
952158f93a describe versioning and add search operation to modal usage 2022-07-17 22:01:54 +09:00
rhysd
4e5b684baf Merge branch 'perf'
```
group                       base                                   main
-----                       ----                                   ----
cursor::char::back          1.00     32.8±0.63ms        ? ?/sec    1.15     37.7±0.81ms        ? ?/sec
cursor::char::down          1.00     29.9±0.62ms        ? ?/sec    1.19     35.6±0.82ms        ? ?/sec
cursor::char::forward       1.00     31.8±0.74ms        ? ?/sec    1.06     33.8±0.90ms        ? ?/sec
cursor::char::up            1.00     30.3±0.86ms        ? ?/sec    1.02     30.8±0.73ms        ? ?/sec
cursor::edge::head_end      1.00     33.2±0.63ms        ? ?/sec    1.03     34.3±0.84ms        ? ?/sec
cursor::edge::top_bottom    1.00     31.5±0.81ms        ? ?/sec    1.11     34.9±0.82ms        ? ?/sec
cursor::paragraph::down     1.00     30.1±0.83ms        ? ?/sec    1.19     35.7±0.76ms        ? ?/sec
cursor::paragraph::up       1.00     30.0±0.68ms        ? ?/sec    1.03     30.9±0.63ms        ? ?/sec
cursor::word::back          1.00     30.4±0.61ms        ? ?/sec    1.05     32.1±0.64ms        ? ?/sec
cursor::word::forward       1.00     31.9±0.65ms        ? ?/sec    1.18     37.7±0.89ms        ? ?/sec
delete::char                1.00      3.4±0.10ms        ? ?/sec    4.48     15.3±0.82ms        ? ?/sec
delete::line                1.00  1243.4±42.36µs        ? ?/sec    7.71      9.6±0.38ms        ? ?/sec
delete::word                1.00      2.7±0.10ms        ? ?/sec    5.35     14.2±0.37ms        ? ?/sec
insert::append::10_lorem    1.00    327.2±4.89ms        ? ?/sec    1.00    327.6±4.92ms        ? ?/sec
insert::append::1_lorem     1.00      7.0±0.16ms        ? ?/sec    1.00      7.0±0.15ms        ? ?/sec
insert::append::50_lorem    1.00       3.1±0.02s        ? ?/sec    2.24       7.0±0.03s        ? ?/sec
insert::random::10_lorem    1.00    133.8±2.78ms        ? ?/sec    1.90    254.6±3.95ms        ? ?/sec
insert::random::1_lorem     1.00      6.7±0.16ms        ? ?/sec    1.01      6.8±0.14ms        ? ?/sec
insert::random::50_lorem    1.00    709.0±7.70ms        ? ?/sec    5.97       4.2±0.03s        ? ?/sec
search::back_long           1.00      4.3±0.15ms        ? ?/sec    3.02     13.0±0.49ms        ? ?/sec
search::back_short          1.01      4.3±0.14ms        ? ?/sec    1.00      4.2±0.10ms        ? ?/sec
search::forward_long        1.00      4.4±0.14ms        ? ?/sec    2.37     10.5±0.29ms        ? ?/sec
search::forward_short       1.02      4.2±0.14ms        ? ?/sec    1.00      4.1±0.10ms        ? ?/sec
```
2022-07-17 15:27:17 +09:00
rhysd
ee4162c451 explicitly use subslice of lines
this improved performance by 2~5%

```
insert::append::1_lorem time:   [7.0412 ms 7.0825 ms 7.1268 ms]
                        change: [-8.5796% -7.8935% -7.1723%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 2 outliers among 100 measurements (2.00%)
  1 (1.00%) high mild
  1 (1.00%) high severe

Benchmarking insert::append::10_lorem: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 33.6s, or reduce sample count to 10.
insert::append::10_lorem
                        time:   [328.15 ms 329.60 ms 331.12 ms]
                        change: [-9.6975% -9.1606% -8.6231%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high mild

Benchmarking insert::append::50_lorem: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 321.1s, or reduce sample count to 10.
insert::append::50_lorem
                        time:   [3.1633 s 3.1727 s 3.1826 s]
                        change: [-7.3473% -7.0339% -6.6629%] (p = 0.00 < 0.05)
                        Performance has improved.
```
2022-07-17 12:09:08 +09:00
rhysd
40e4bfbe15 render only displayed lines in Paragraph
by handling vertical scroll by ourselves
2022-07-17 09:23:47 +09:00
rhysd
b56f252f08 include rendering in fuzzing tests 2022-07-16 21:54:10 +09:00
rhysd
ac04feb5ea add arbitrary crate as optional dependency
to avoid converting `Input` in fuzz test for making arbitrary inputs
2022-07-16 21:42:58 +09:00
rhysd
8b3b0aa34c fix bench suite names 2022-07-16 11:18:22 +09:00
rhysd
025ce6b187 add tests for CursorMove::Forward and CursorMove::Back 2022-07-14 22:57:31 +09:00
rhysd
c1622c197d add benchmarks to delete text 2022-07-13 21:44:37 +09:00
rhysd
59d5d473d4 reduce overhead to build textarea instance using .clone() in benchmarks 2022-07-13 09:27:59 +09:00
rhysd
421691d602 implement Clone for TextArea and its dependencies 2022-07-12 22:56:06 +09:00
rhysd
9032320a7e add benchmark for cursor moves 2022-07-12 20:18:06 +09:00
rhysd
e8df4c4127 show 'Available on crate feature search only' on docs.rs 2022-07-12 01:02:12 +09:00
rhysd
fd174b316e use single atomic u32 value instead of two atomic u16 values
to ensure load/store row and col atomically
2022-07-11 10:55:48 +09:00