aboutsummaryrefslogtreecommitdiff
path: root/helix-tui
diff options
context:
space:
mode:
authorPascal Kuthe2022-10-06 18:46:24 +0000
committerPascal Kuthe2022-10-06 18:46:24 +0000
commit114610f7dc5d6395ef5cce9111a363f7c8d879a4 (patch)
tree3ca8208c847a64a09eaa03ff985c6838558ac3eb /helix-tui
parent71ee589bbc723e7a55585ddc2ca43c29ee93fabe (diff)
switch to termini for terminfo
Diffstat (limited to 'helix-tui')
-rw-r--r--helix-tui/Cargo.toml2
-rw-r--r--helix-tui/src/backend/crossterm.rs6
2 files changed, 4 insertions, 4 deletions
diff --git a/helix-tui/Cargo.toml b/helix-tui/Cargo.toml
index 1c6a6a8d..a4a1c389 100644
--- a/helix-tui/Cargo.toml
+++ b/helix-tui/Cargo.toml
@@ -20,7 +20,7 @@ bitflags = "1.3"
cassowary = "0.3"
unicode-segmentation = "1.10"
crossterm = { version = "0.25", optional = true }
-cxterminfo = "0.2"
+termini = "0.1"
serde = { version = "1", "optional" = true, features = ["derive"]}
helix-view = { version = "0.6", path = "../helix-view", features = ["term"] }
helix-core = { version = "0.6", path = "../helix-core" }
diff --git a/helix-tui/src/backend/crossterm.rs b/helix-tui/src/backend/crossterm.rs
index 3e6dc5f5..4d8c6650 100644
--- a/helix-tui/src/backend/crossterm.rs
+++ b/helix-tui/src/backend/crossterm.rs
@@ -27,13 +27,13 @@ impl Capabilities {
/// on the $TERM environment variable. If detection fails, returns
/// a default value where no capability is supported.
pub fn from_env_or_default() -> Self {
- match cxterminfo::terminfo::TermInfo::from_env() {
+ match termini::TermInfo::from_env() {
Err(_) => Capabilities::default(),
Ok(t) => Capabilities {
// Smulx, VTE: https://unix.stackexchange.com/a/696253/246284
// Su (used by kitty): https://sw.kovidgoyal.net/kitty/underlines
- has_extended_underlines: t.get_ext_string("Smulx").is_some()
- || *t.get_ext_bool("Su").unwrap_or(&false)
+ has_extended_underlines: t.extended_cap("Smulx").is_some()
+ || t.extended_cap("Su").is_some()
|| vte_version() >= Some(5102),
},
}