aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src/input.rs
diff options
context:
space:
mode:
authorIvan Tham2021-06-29 16:17:16 +0000
committerBlaž Hrastnik2021-07-04 09:01:59 +0000
commit9effe71b7d2133f18545d182cef384ea3fd1c0ff (patch)
treed8267e162be7079162cb534e63f507a370061912 /helix-view/src/input.rs
parent4c190ec9d9da49adedf2e14cd813725d979b42e8 (diff)
Apply suggestions from blaz for infobox
Diffstat (limited to 'helix-view/src/input.rs')
-rw-r--r--helix-view/src/input.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/helix-view/src/input.rs b/helix-view/src/input.rs
index 6e8292e9..2847bb69 100644
--- a/helix-view/src/input.rs
+++ b/helix-view/src/input.rs
@@ -1,5 +1,6 @@
//! Input event handling, currently backed by crossterm.
use anyhow::{anyhow, Error};
+use helix_core::unicode::width::UnicodeWidthStr;
use serde::de::{self, Deserialize, Deserializer};
use std::fmt;
@@ -90,9 +91,9 @@ impl fmt::Display for KeyEvent {
}
}
-impl unicode_width::UnicodeWidthStr for KeyEvent {
+impl UnicodeWidthStr for KeyEvent {
fn width(&self) -> usize {
- use unicode_width::UnicodeWidthChar;
+ use helix_core::unicode::width::UnicodeWidthChar;
let mut width = match self.code {
KeyCode::Backspace => keys::BACKSPACE.len(),
KeyCode::Enter => keys::ENTER.len(),