You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
letmut textarea = TextArea::from(["aaa"]);// It returns `None` when the text selection is not ongoingassert_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.