rhysd/tui-textarea (tui-textarea)
### [`v0.6.1`](https://togithub.com/rhysd/tui-textarea/blob/HEAD/CHANGELOG.md#v061---08-Aug-2024)
[Compare Source](https://togithub.com/rhysd/tui-textarea/compare/v0.6.0...v0.6.1)
- Add [`TextArea::selection_range`](https://docs.rs/tui-textarea/latest/tui_textarea/struct.TextArea.html#method.selection_range) method to get the range of the current selection. Please read the document for more details. ([#81](https://togithub.com/rhysd/tui-textarea/issues/81), thanks [@achristmascarl](https://togithub.com/achristmascarl))
```rust
let mut textarea = TextArea::from(["aaa"]);
// It returns `None` when the text selection is not ongoing
assert_eq!(textarea.selection_range(), None);
textarea.start_selection();
assert_eq!(textarea.selection_range(), Some(((0, 0), (0, 0))));
textarea.move_cursor(CursorMove::Forward);
assert_eq!(textarea.selection_range(), Some(((0, 0), (0, 1))));
// The first element of the pair is always smaller than the second one.
textarea.start_selection();
textarea.move_cursor(CursorMove::Back);
assert_eq!(textarea.selection_range(), Some(((0, 0), (0, 1))));
```
- Fix depending on the incorrect version of termion crate when `tuirs-termion` feature is enabled. Since tui crate depends on older version of termion crate v1.5.6, tui-textarea should depend on the same version but actually it depended on the latest version v4.0.0.
- If you use tui-textarea with tui crate and termion crate, please ensure that your project also depends on termion v1.5. Otherwise your project accidentally depends on multiple versions of termion crate.
\[Changes]\[v0.6.1]
### [`v0.6.0`](https://togithub.com/rhysd/tui-textarea/blob/HEAD/CHANGELOG.md#v060---07-Aug-2024)
[Compare Source](https://togithub.com/rhysd/tui-textarea/compare/v0.5.3...v0.6.0)
- **BREAKING:** Update [ratatui](https://ratatui.rs/) crate dependency from v0.27 to [v0.28](https://togithub.com/ratatui-org/ratatui/releases/tag/v0.28.0).
- **BREAKING:** Update [crossterm](https://crates.io/crates/crossterm) crate dependency from v0.27 to v0.28 because ratatui crate depends on the new version.
- Note: If you use tui crate, crossterm crate dependency remains at v0.25.
\[Changes]\[v0.6.0]
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
[ ] If you want to rebase/retry this PR, check this box
This PR contains the following updates:
0.5.3
->0.6.1
Release Notes
rhysd/tui-textarea (tui-textarea)
### [`v0.6.1`](https://togithub.com/rhysd/tui-textarea/blob/HEAD/CHANGELOG.md#v061---08-Aug-2024) [Compare Source](https://togithub.com/rhysd/tui-textarea/compare/v0.6.0...v0.6.1) - Add [`TextArea::selection_range`](https://docs.rs/tui-textarea/latest/tui_textarea/struct.TextArea.html#method.selection_range) method to get the range of the current selection. Please read the document for more details. ([#81](https://togithub.com/rhysd/tui-textarea/issues/81), thanks [@achristmascarl](https://togithub.com/achristmascarl)) ```rust let mut textarea = TextArea::from(["aaa"]); // It returns `None` when the text selection is not ongoing assert_eq!(textarea.selection_range(), None); textarea.start_selection(); assert_eq!(textarea.selection_range(), Some(((0, 0), (0, 0)))); textarea.move_cursor(CursorMove::Forward); assert_eq!(textarea.selection_range(), Some(((0, 0), (0, 1)))); // The first element of the pair is always smaller than the second one. textarea.start_selection(); textarea.move_cursor(CursorMove::Back); assert_eq!(textarea.selection_range(), Some(((0, 0), (0, 1)))); ``` - Fix depending on the incorrect version of termion crate when `tuirs-termion` feature is enabled. Since tui crate depends on older version of termion crate v1.5.6, tui-textarea should depend on the same version but actually it depended on the latest version v4.0.0. - If you use tui-textarea with tui crate and termion crate, please ensure that your project also depends on termion v1.5. Otherwise your project accidentally depends on multiple versions of termion crate. \[Changes]\[v0.6.1] ### [`v0.6.0`](https://togithub.com/rhysd/tui-textarea/blob/HEAD/CHANGELOG.md#v060---07-Aug-2024) [Compare Source](https://togithub.com/rhysd/tui-textarea/compare/v0.5.3...v0.6.0) - **BREAKING:** Update [ratatui](https://ratatui.rs/) crate dependency from v0.27 to [v0.28](https://togithub.com/ratatui-org/ratatui/releases/tag/v0.28.0). - **BREAKING:** Update [crossterm](https://crates.io/crates/crossterm) crate dependency from v0.27 to v0.28 because ratatui crate depends on the new version. - Note: If you use tui crate, crossterm crate dependency remains at v0.25. \[Changes]\[v0.6.0]Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.