Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
255 changes: 247 additions & 8 deletions Cargo.lock

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,20 @@ serde_json = { opt-level = 3 }
# This one is special as we can run into debug assertions otherwise.
# They have a time, but let's chose the time instead of always being hit by it.
gix-merge = { opt-level = 3, debug-assertions = false }
# Image decoding and resizing for the TUI's image diffs is far too slow unoptimized.
image = { opt-level = 3 }
png = { opt-level = 3 }
fdeflate = { opt-level = 3 }
miniz_oxide = { opt-level = 3 }
flate2 = { opt-level = 3 }
zune-jpeg = { opt-level = 3 }
zune-core = { opt-level = 3 }
image-webp = { opt-level = 3 }
gif = { opt-level = 3 }
tiff = { opt-level = 3 }
weezl = { opt-level = 3 }
color_quant = { opt-level = 3 }
byteorder-lite = { opt-level = 3 }

[profile.release.package.but-installer]
opt-level = "z" # Optimize for size instead of speed
Expand Down
12 changes: 12 additions & 0 deletions crates/but/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,18 @@ itertools.workspace = true
self_cell.workspace = true
rand.workspace = true
ratatui-textarea = "0.8.0"
ratatui-image = { version = "11", default-features = false, features = [
"crossterm",
] }
image = { version = "0.25.10", default-features = false, features = [
"png",
"jpeg",
"gif",
"webp",
"bmp",
"ico",
"tiff",
] }
arboard = { version = "3.6.1", default-features = false }
textwrap = "0.16.2"
syntect = { version = "5.3.0", default-features = false, features = [
Expand Down
5 changes: 5 additions & 0 deletions crates/but/src/command/legacy/diff2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,11 @@ impl DiffLineWriter for DiffWriter<'_> {
}
writeln!(self.out)?;
}
DetailsLine::Image(_) => {
// This writer never reports image support, so image lines are not produced
// for it; keep the placeholder in case that ever changes.
writeln!(self.out, "Binary file - no diff available")?;
}
DetailsLine::SectionSeparator => {
writeln!(self.out)?;
}
Expand Down
Loading
Loading