@@ -1,5 +1,6 @@
1//! Input event handling, currently backed by crossterm.
1//! Input event handling, currently backed by crossterm.
2use anyhow::{anyhow, Error};
2use anyhow::{anyhow, Error};
3+use helix_core::unicode::width::UnicodeWidthStr;
3use serde::de::{self, Deserialize, Deserializer};
4use serde::de::{self, Deserialize, Deserializer};
4use std::fmt;
5use std::fmt;
@@ -90,9 +91,9 @@ impl fmt::Display for KeyEvent {
93−impl unicode_width::UnicodeWidthStr for KeyEvent {
94+impl UnicodeWidthStr for KeyEvent {
94 fn width(&self) -> usize {
95 fn width(&self) -> usize {
95− use unicode_width::UnicodeWidthChar;
96+ use helix_core::unicode::width::UnicodeWidthChar;
96 let mut width = match self.code {
97 let mut width = match self.code {
97 KeyCode::Backspace => keys::BACKSPACE.len(),
98 KeyCode::Backspace => keys::BACKSPACE.len(),
98 KeyCode::Enter => keys::ENTER.len(),
99 KeyCode::Enter => keys::ENTER.len(),