commit 80249d6aa039c0c1bbec1ccd84ab7eb616d39938
parent 6de58d8203a60868b476af58421e49fb046ba91d
Author: William Casarin <jb55@jb55.com>
Date: Mon, 26 Jan 2026 18:11:26 -0800
dave: auto-shrink diff ScrollArea to fit content
Adds auto_shrink([false, true]) to prevent the diff view from taking
up more vertical space than needed.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/crates/notedeck_dave/src/ui/diff.rs b/crates/notedeck_dave/src/ui/diff.rs
@@ -23,6 +23,7 @@ pub fn file_update_ui(update: &FileUpdate, ui: &mut Ui) {
.show(ui, |ui| {
egui::ScrollArea::vertical()
.max_height(max_diff_height)
+ .auto_shrink([false, true]) // shrink vertically to fit content
.show(ui, |ui| {
render_diff_lines(&diff_lines, &update.update_type, ui);
});