зеркало из
https://github.com/glebtv/tui-textarea.git
synced 2026-08-29 12:06:16 +03:00
fix double input on windows (closes #17)
Этот коммит содержится в:
@@ -1,7 +1,7 @@
|
||||
#[cfg(any(feature = "crossterm", feature = "ratatui-crossterm"))]
|
||||
use crate::crossterm::event::{
|
||||
Event as CrosstermEvent, KeyCode, KeyEvent, KeyModifiers, MouseEvent as CrosstermMouseEvent,
|
||||
MouseEventKind as CrosstermMouseEventKind,
|
||||
Event as CrosstermEvent, KeyCode, KeyEvent, KeyEventKind, KeyModifiers,
|
||||
MouseEvent as CrosstermMouseEvent, MouseEventKind as CrosstermMouseEventKind,
|
||||
};
|
||||
#[cfg(feature = "arbitrary")]
|
||||
use arbitrary::Arbitrary;
|
||||
@@ -100,7 +100,7 @@ impl From<CrosstermEvent> for Input {
|
||||
/// Convert [`crossterm::event::Event`] to [`Input`].
|
||||
fn from(event: CrosstermEvent) -> Self {
|
||||
match event {
|
||||
CrosstermEvent::Key(key) => Self::from(key),
|
||||
CrosstermEvent::Key(key) if key.kind == KeyEventKind::Press => Self::from(key),
|
||||
CrosstermEvent::Mouse(mouse) => Self::from(mouse),
|
||||
_ => Self::default(),
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user