зеркало из
https://github.com/glebtv/tui-textarea.git
synced 2026-09-06 07:35:51 +03:00
Add serde feature
Этот коммит содержится в:
@@ -2,14 +2,17 @@ use crate::widget::Viewport;
|
||||
use crate::word::{find_word_start_backward, find_word_start_forward};
|
||||
#[cfg(feature = "arbitrary")]
|
||||
use arbitrary::Arbitrary;
|
||||
#[cfg(feature = "serde")]
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::cmp;
|
||||
|
||||
/// Specify how to move the cursor.
|
||||
///
|
||||
/// This type is marked as `#[non_exhaustive]` since more variations may be supported in the future.
|
||||
#[non_exhaustive]
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
|
||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||
pub enum CursorMove {
|
||||
/// Move cursor forward by one character. When the cursor is at the end of line, it moves to the head of next line.
|
||||
/// ```
|
||||
|
||||
Ссылка в новой задаче
Block a user