1
0
зеркало из https://github.com/glebtv/tui-textarea.git synced 2026-09-03 22:35:50 +03:00
Этот коммит содержится в:
cstef
2024-02-27 14:34:54 +01:00
родитель 39075bb641
Коммит 1625d0b603
2 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@@ -37,6 +37,7 @@ tuirs-termion = ["tuirs", "dep:termion", "tui/termion"]
tuirs-no-backend = ["tuirs"]
# Other optional features
search = ["dep:regex"]
serde = ["dep:serde"]
[dependencies]
arbitrary = { version = "1", features = ["derive"], optional = true }
@@ -48,6 +49,7 @@ termion = { version = "2.0", optional = true }
termwiz = { version = "0.20.0", optional = true }
tui = { version = "0.19", default-features = false, optional = true }
unicode-width = "0.1.11"
serde = { version = "1", optional = true }
[[example]]
name = "minimal"

Просмотреть файл

@@ -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.
/// ```