summaryrefslogtreecommitdiff
path: root/helix-view/src/input.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-view/src/input.rs')
-rw-r--r--helix-view/src/input.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/helix-view/src/input.rs b/helix-view/src/input.rs
index 3b03087d..9fa679df 100644
--- a/helix-view/src/input.rs
+++ b/helix-view/src/input.rs
@@ -6,12 +6,13 @@ use std::fmt;
pub use crate::keyboard::{KeyCode, KeyModifiers};
-#[derive(Debug, PartialOrd, PartialEq, Eq, Clone, Copy, Hash)]
+#[derive(Debug, PartialOrd, PartialEq, Eq, Clone, Hash)]
pub enum Event {
FocusGained,
FocusLost,
Key(KeyEvent),
Mouse(MouseEvent),
+ Paste(String),
Resize(u16, u16),
}
@@ -276,9 +277,7 @@ impl From<crossterm::event::Event> for Event {
crossterm::event::Event::Resize(w, h) => Self::Resize(w, h),
crossterm::event::Event::FocusGained => Self::FocusGained,
crossterm::event::Event::FocusLost => Self::FocusLost,
- crossterm::event::Event::Paste(_) => {
- unreachable!("crossterm shouldn't emit Paste events without them being enabled")
- }
+ crossterm::event::Event::Paste(s) => Self::Paste(s),
}
}
}