on master help sign in
switch to termini for terminfo
commit114610f7dc5d6395ef5cce9111a363f7c8d879a4 authorPascal Kuthe <pascal.kuthe@semimod.de> dateThu 6 Oct 2022, 20:46 (4 years ago) parent71ee589
3 files changed+14−11
Cargo.lock+10−7 helix-tui/Cargo.toml+1−1 helix-tui/src/backend/crossterm.rs+3−3
Cargo.lock+10−7
@@ -176,12 +176,6 @@ dependencies = [
176176 "winapi",
177177]
178178
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−
185179[[package]]
186180name = "dirs-next"
187181version = "2.0.0"
@@ -510,10 +504,10 @@ dependencies = [
510504 "bitflags",
511505 "cassowary",
512506 "crossterm",
513− "cxterminfo",
514507 "helix-core",
515508 "helix-view",
516509 "serde",
510+ "termini",
517511 "unicode-segmentation",
518512]
519513
@@ -1105,6 +1099,15 @@ dependencies = [
11051099 "winapi",
11061100]
11071101
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+
11081111[[package]]
11091112name = "textwrap"
11101113version = "0.15.1"
helix-tui/Cargo.toml+1−1
@@ -20,7 +20,7 @@ bitflags = "1.3"
2020cassowary = "0.3"
2121unicode-segmentation = "1.10"
2222crossterm = { version = "0.25", optional = true }
23−cxterminfo = "0.2"
23+termini = "0.1"
2424serde = { version = "1", "optional" = true, features = ["derive"]}
2525helix-view = { version = "0.6", path = "../helix-view", features = ["term"] }
2626helix-core = { version = "0.6", path = "../helix-core" }
helix-tui/src/backend/crossterm.rs+3−3
@@ -27,13 +27,13 @@ impl Capabilities {
2727 /// on the $TERM environment variable. If detection fails, returns
2828 /// a default value where no capability is supported.
2929 pub fn from_env_or_default() -> Self {
30− match cxterminfo::terminfo::TermInfo::from_env() {
30+ match termini::TermInfo::from_env() {
3131 Err(_) => Capabilities::default(),
3232 Ok(t) => Capabilities {
3333 // Smulx, VTE: https://unix.stackexchange.com/a/696253/246284
3434 // Su (used by kitty): https://sw.kovidgoyal.net/kitty/underlines
35− has_extended_underlines: t.get_ext_string("Smulx").is_some()
36− || *t.get_ext_bool("Su").unwrap_or(&false)
35+ has_extended_underlines: t.extended_cap("Smulx").is_some()
36+ || t.extended_cap("Su").is_some()
3737 || vte_version() >= Some(5102),
3838 },
3939 }