summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Davison <dandavison7@gmail.com>2022-05-13 11:59:45 -0400
committerDan Davison <dandavison7@gmail.com>2022-05-13 12:21:16 -0400
commita8c79aa9de00e61dd2a92ac53923984391c461ae (patch)
tree95981c960f3535b2d606a4d2b18ca9c393579430
parenta53dc02c4a81c6ff2423cb7e8f2397a20437a918 (diff)
Update bat, git2, and syntect
-rw-r--r--Cargo.lock73
-rw-r--r--Cargo.toml10
-rw-r--r--src/paint.rs6
3 files changed, 55 insertions, 34 deletions
diff --git a/Cargo.lock b/Cargo.lock
index dd8749d9..94788573 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -75,9 +75,9 @@ checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd"
[[package]]
name = "bat"
-version = "0.20.0"
+version = "0.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f59cdca60e52d7c8ea28dd2b627ab0478e4d4a2df7cc30a13322aadb21035217"
+checksum = "fd1212d80800b3d7614b3725e0b2ee3b45b2b7484805d54b5660c8fa6f706305"
dependencies = [
"ansi_colours",
"ansi_term",
@@ -144,9 +144,9 @@ dependencies = [
[[package]]
name = "bugreport"
-version = "0.4.1"
+version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0014b4b2b4f63bfe69c3838470121290cc437fdc79785d408a761a21e8b2404c"
+checksum = "535120b8182547808081a66f1f77a64533c780b23da26763e0ee34dfb94f98c9"
dependencies = [
"git-version",
"shell-escape",
@@ -207,7 +207,7 @@ dependencies = [
"libc",
"num-integer",
"num-traits",
- "time",
+ "time 0.1.44",
"winapi",
]
@@ -573,9 +573,9 @@ dependencies = [
[[package]]
name = "git2"
-version = "0.13.25"
+version = "0.14.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f29229cc1b24c0e6062f6e742aa3e256492a5323365e5ed3413599f8a5eff7d6"
+checksum = "3826a6e0e2215d7a41c2bfc7c9244123969273f3476b939a226aac0ab56e9e3c"
dependencies = [
"bitflags",
"libc",
@@ -681,6 +681,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736"
[[package]]
+name = "itoa"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35"
+
+[[package]]
name = "jobserver"
version = "0.1.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -696,12 +702,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
[[package]]
-name = "lazycell"
-version = "1.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
-
-[[package]]
name = "libc"
version = "0.2.112"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -709,9 +709,9 @@ checksum = "1b03d17f364a3a042d5e5d46b053bbbf82c92c9430c592dd4c064dc6ee997125"
[[package]]
name = "libgit2-sys"
-version = "0.12.26+1.3.0"
+version = "0.13.2+1.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "19e1c899248e606fbfe68dcb31d8b0176ebab833b103824af31bddf4b7457494"
+checksum = "3a42de9a51a5c12e00fc0e4ca6bc2ea43582fc6418488e8f615e905d886f258b"
dependencies = [
"cc",
"libc",
@@ -828,10 +828,19 @@ dependencies = [
]
[[package]]
+name = "num_threads"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44"
+dependencies = [
+ "libc",
+]
+
+[[package]]
name = "once_cell"
-version = "1.9.0"
+version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "da32515d9f6e6e489d7bc9d84c71b060db7247dc035bbe44eac88cf87486d8d5"
+checksum = "87f3e037eac156d1775da914196f0f37741a274155e34a0b7e427c35d2a2ecb9"
[[package]]
name = "onig"
@@ -961,15 +970,15 @@ checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c"
[[package]]
name = "plist"
-version = "1.0.1"
+version = "1.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4dc57ccf442c7414b790e8e7b72fb4d776a66c7680129360946d9aaa6f5311e9"
+checksum = "bd39bc6cdc9355ad1dc5eeedefee696bb35c34caf21768741e81826c0bbd7225"
dependencies = [
"base64",
- "chrono",
"indexmap",
"line-wrap",
"serde",
+ "time 0.3.9",
"xml-rs",
]
@@ -1187,7 +1196,7 @@ version = "1.0.70"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e277c495ac6cd1a01a58d0a0c574568b4d1ddf14f59965c6a58b8d96400b54f3"
dependencies = [
- "itoa",
+ "itoa 0.4.7",
"ryu",
"serde",
]
@@ -1212,9 +1221,9 @@ checksum = "45bb67a18fa91266cc7807181f62f9178a6873bfad7dc788c42e6430db40184f"
[[package]]
name = "shell-words"
-version = "1.0.0"
+version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b6fa3938c99da4914afedd13bf3d79bcb6c277d1b2c398d23257a304d9e1b074"
+checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde"
[[package]]
name = "siphasher"
@@ -1262,22 +1271,23 @@ dependencies = [
[[package]]
name = "syntect"
-version = "4.6.0"
+version = "5.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8b20815bbe80ee0be06e6957450a841185fcf690fe0178f14d77a05ce2caa031"
+checksum = "c6c454c27d9d7d9a84c7803aaa3c50cd088d2906fe3c6e42da3209aa623576a8"
dependencies = [
"bincode",
"bitflags",
"flate2",
"fnv",
"lazy_static",
- "lazycell",
+ "once_cell",
"onig",
"plist",
"regex-syntax",
"serde",
"serde_derive",
"serde_json",
+ "thiserror",
"walkdir",
"yaml-rust",
]
@@ -1383,6 +1393,17 @@ dependencies = [
]
[[package]]
+name = "time"
+version = "0.3.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c2702e08a7a860f005826c6815dcac101b19b5eb330c27fe4a5928fec1d20ddd"
+dependencies = [
+ "itoa 1.0.1",
+ "libc",
+ "num_threads",
+]
+
+[[package]]
name = "tinyvec"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
diff --git a/Cargo.toml b/Cargo.toml
index ecb7f191..0ed99402 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -15,7 +15,7 @@ name = "delta"
path = "src/main.rs"
[dependencies]
-bat = "0.20.0"
+bat = "0.21.0"
chrono = "0.4.19"
chrono-humanize = "0.2.1"
ansi_colours = "1.0.4"
@@ -38,21 +38,17 @@ serde = { version = "1.0.118", features = ["derive"] }
serde_json = "1.0.70"
shell-words = "1.0.0"
smol_str = "0.1.21"
+syntect = "5.0.0"
unicode-segmentation = "1.9.0"
unicode-width = "0.1.9"
vte = "0.10.1"
xdg = "2.4.1"
[dependencies.git2]
-version = "0.13.25"
+version = "0.14.0"
default-features = false
features = []
-[dependencies.syntect]
-version = "4.6.0"
-default-features = false
-features = ["parsing", "assets", "yaml-load", "dump-load", "regex-onig"]
-
[dependencies.sysinfo]
version = "0.23.0"
# no default features to disable the use of threads
diff --git a/src/paint.rs b/src/paint.rs
index 7f497fe1..8da56cda 100644
--- a/src/paint.rs
+++ b/src/paint.rs
@@ -677,7 +677,11 @@ pub fn get_syntax_style_sections_for_lines<'a>(
) {
(Some(highlighter), true) => {
for (line, _) in lines.iter() {
- line_sections.push(highlighter.highlight(line, &config.syntax_set));
+ line_sections.push(
+ highlighter
+ .highlight_line(line, &config.syntax_set)
+ .unwrap(),
+ );
}
}
_ => {