on master help sign in
switch to termini for terminfo
114610fPascal Kuthe
Cargo.lock+10−7
@@ -176,12 +176,6 @@ dependencies = [
176 "winapi",
176 "winapi",
177]
177]
178
178
179−[[package]]
180−name = "cxterminfo"
181−version = "0.2.0"
182−source = "registry+https://github.com/rust-lang/crates.io-index"
183−checksum = "da92c5e3aaf2cc1fea346d9b3bac0c59c6ffc1d1d46f18d991d449912a3e6f07"
184−
185[[package]]
179[[package]]
186name = "dirs-next"
180name = "dirs-next"
187version = "2.0.0"
181version = "2.0.0"
@@ -510,10 +504,10 @@ dependencies = [
510 "bitflags",
504 "bitflags",
511 "cassowary",
505 "cassowary",
512 "crossterm",
506 "crossterm",
513− "cxterminfo",
514 "helix-core",
507 "helix-core",
515 "helix-view",
508 "helix-view",
516 "serde",
509 "serde",
510+ "termini",
517 "unicode-segmentation",
511 "unicode-segmentation",
518]
512]
519
513
@@ -1105,6 +1099,15 @@ dependencies = [
1105 "winapi",
1099 "winapi",
1106]
1100]
1107
1101
1102+[[package]]
1103+name = "termini"
1104+version = "0.1.1"
1105+source = "registry+https://github.com/rust-lang/crates.io-index"
1106+checksum = "00733d628ac0a8bd4fd3171a28eb6c09759ae1b43d8b587eadebaccee01d01a3"
1107+dependencies = [
1108+ "dirs-next",
1109+]
1110+
1108[[package]]
1111[[package]]
1109name = "textwrap"
1112name = "textwrap"
1110version = "0.15.1"
1113version = "0.15.1"
helix-tui/Cargo.toml+1−1
@@ -20,7 +20,7 @@ bitflags = "1.3"
20cassowary = "0.3"
20cassowary = "0.3"
21unicode-segmentation = "1.10"
21unicode-segmentation = "1.10"
22crossterm = { version = "0.25", optional = true }
22crossterm = { version = "0.25", optional = true }
23−cxterminfo = "0.2"
23+termini = "0.1"
24serde = { version = "1", "optional" = true, features = ["derive"]}
24serde = { version = "1", "optional" = true, features = ["derive"]}
25helix-view = { version = "0.6", path = "../helix-view", features = ["term"] }
25helix-view = { version = "0.6", path = "../helix-view", features = ["term"] }
26helix-core = { version = "0.6", path = "../helix-core" }
26helix-core = { version = "0.6", path = "../helix-core" }
helix-tui/src/backend/crossterm.rs+3−3
@@ -27,13 +27,13 @@ impl Capabilities {
27 /// on the $TERM environment variable. If detection fails, returns
27 /// on the $TERM environment variable. If detection fails, returns
28 /// a default value where no capability is supported.
28 /// a default value where no capability is supported.
29 pub fn from_env_or_default() -> Self {
29 pub fn from_env_or_default() -> Self {
30− match cxterminfo::terminfo::TermInfo::from_env() {
30+ match termini::TermInfo::from_env() {
31 Err(_) => Capabilities::default(),
31 Err(_) => Capabilities::default(),
32 Ok(t) => Capabilities {
32 Ok(t) => Capabilities {
33 // Smulx, VTE: https://unix.stackexchange.com/a/696253/246284
33 // Smulx, VTE: https://unix.stackexchange.com/a/696253/246284
34 // Su (used by kitty): https://sw.kovidgoyal.net/kitty/underlines
34 // Su (used by kitty): https://sw.kovidgoyal.net/kitty/underlines
35− has_extended_underlines: t.get_ext_string("Smulx").is_some()
35+ has_extended_underlines: t.extended_cap("Smulx").is_some()
36− || *t.get_ext_bool("Su").unwrap_or(&false)
36+ || t.extended_cap("Su").is_some()
37 || vte_version() >= Some(5102),
37 || vte_version() >= Some(5102),
38 },
38 },
39 }
39 }