aboutsummaryrefslogtreecommitdiff
path: root/helix-tui
diff options
context:
space:
mode:
authorNathan Vegdahl2021-07-06 03:27:49 +0000
committerNathan Vegdahl2021-07-06 03:27:49 +0000
commit85d5b399de70ff075a455ce2858549d1ed012fe3 (patch)
tree4824fcb47f39551d3b31a62931adaf0ee406c02b /helix-tui
parent6e15c9b8745e9708ee5271c8701d41a8393cb038 (diff)
parent3c31f501164080998975883eb6f93c49bd8d3efb (diff)
Merge branch 'master' into great_line_ending_and_cursor_range_cleanup
Diffstat (limited to 'helix-tui')
-rw-r--r--helix-tui/Cargo.toml1
-rw-r--r--helix-tui/src/backend/test.rs2
-rw-r--r--helix-tui/src/buffer.rs2
-rw-r--r--helix-tui/src/text.rs2
-rw-r--r--helix-tui/src/widgets/paragraph.rs2
-rw-r--r--helix-tui/src/widgets/reflow.rs2
-rw-r--r--helix-tui/src/widgets/table.rs2
7 files changed, 6 insertions, 7 deletions
diff --git a/helix-tui/Cargo.toml b/helix-tui/Cargo.toml
index dde2eafe..7f98144c 100644
--- a/helix-tui/Cargo.toml
+++ b/helix-tui/Cargo.toml
@@ -19,7 +19,6 @@ default = ["crossterm"]
bitflags = "1.0"
cassowary = "0.3"
unicode-segmentation = "1.2"
-unicode-width = "0.1"
crossterm = { version = "0.20", optional = true }
serde = { version = "1", "optional" = true, features = ["derive"]}
helix-view = { version = "0.3", path = "../helix-view", features = ["term"] }
diff --git a/helix-tui/src/backend/test.rs b/helix-tui/src/backend/test.rs
index a03bcd8e..3f56b49c 100644
--- a/helix-tui/src/backend/test.rs
+++ b/helix-tui/src/backend/test.rs
@@ -2,9 +2,9 @@ use crate::{
backend::Backend,
buffer::{Buffer, Cell},
};
+use helix_core::unicode::width::UnicodeWidthStr;
use helix_view::graphics::{CursorKind, Rect};
use std::{fmt::Write, io};
-use unicode_width::UnicodeWidthStr;
/// A backend used for the integration tests.
#[derive(Debug)]
diff --git a/helix-tui/src/buffer.rs b/helix-tui/src/buffer.rs
index 3a7ad144..377e3e39 100644
--- a/helix-tui/src/buffer.rs
+++ b/helix-tui/src/buffer.rs
@@ -1,7 +1,7 @@
use crate::text::{Span, Spans};
+use helix_core::unicode::width::UnicodeWidthStr;
use std::cmp::min;
use unicode_segmentation::UnicodeSegmentation;
-use unicode_width::UnicodeWidthStr;
use helix_view::graphics::{Color, Modifier, Rect, Style};
diff --git a/helix-tui/src/text.rs b/helix-tui/src/text.rs
index 4af6b09d..b8e52479 100644
--- a/helix-tui/src/text.rs
+++ b/helix-tui/src/text.rs
@@ -47,10 +47,10 @@
//! ]);
//! ```
use helix_core::line_ending::str_is_line_ending;
+use helix_core::unicode::width::UnicodeWidthStr;
use helix_view::graphics::Style;
use std::borrow::Cow;
use unicode_segmentation::UnicodeSegmentation;
-use unicode_width::UnicodeWidthStr;
/// A grapheme associated to a style.
#[derive(Debug, Clone, PartialEq)]
diff --git a/helix-tui/src/widgets/paragraph.rs b/helix-tui/src/widgets/paragraph.rs
index bdfb5b9a..fee35d25 100644
--- a/helix-tui/src/widgets/paragraph.rs
+++ b/helix-tui/src/widgets/paragraph.rs
@@ -7,9 +7,9 @@ use crate::{
Block, Widget,
},
};
+use helix_core::unicode::width::UnicodeWidthStr;
use helix_view::graphics::{Rect, Style};
use std::iter;
-use unicode_width::UnicodeWidthStr;
fn get_line_offset(line_width: u16, text_area_width: u16, alignment: Alignment) -> u16 {
match alignment {
diff --git a/helix-tui/src/widgets/reflow.rs b/helix-tui/src/widgets/reflow.rs
index ae561a4f..21847783 100644
--- a/helix-tui/src/widgets/reflow.rs
+++ b/helix-tui/src/widgets/reflow.rs
@@ -1,7 +1,7 @@
use crate::text::StyledGrapheme;
use helix_core::line_ending::str_is_line_ending;
+use helix_core::unicode::width::UnicodeWidthStr;
use unicode_segmentation::UnicodeSegmentation;
-use unicode_width::UnicodeWidthStr;
const NBSP: &str = "\u{00a0}";
diff --git a/helix-tui/src/widgets/table.rs b/helix-tui/src/widgets/table.rs
index ee5147b7..1ee4286a 100644
--- a/helix-tui/src/widgets/table.rs
+++ b/helix-tui/src/widgets/table.rs
@@ -9,9 +9,9 @@ use cassowary::{
WeightedRelation::*,
{Expression, Solver},
};
+use helix_core::unicode::width::UnicodeWidthStr;
use helix_view::graphics::{Rect, Style};
use std::collections::HashMap;
-use unicode_width::UnicodeWidthStr;
/// A [`Cell`] contains the [`Text`] to be displayed in a [`Row`] of a [`Table`].
///