nandi/jolt-nativepublic Fork 0
70072e8
Commits
Clone
git clone https://git.rickub.com/nandi/jolt-native.git
git clone ssh://git@rickub.com/nandi/jolt-native.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Bound a fill-height region by :reserve

Everything from the cursor to the bottom of the window is too much when
something has to come after it: a fill-height column takes the whole
remainder and pushes the row below it — a compose bar under a message list
— against the bottom edge, whatever margin that row asked for. `:scroll`
already takes the number the caller actually knows; fill-height takes it
now too.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
nandi committed 2026-08-30T19:20:15-07:00 Browse files
70072e8 parent: fa4ecdf
modified crates/jolt-vidya/src/tree.rs +9 -1
@@ -805,8 +805,16 @@ impl Tree {
805805 // scrolling list inside it gets no room. `:fill-height` measures
806806 // against what is visible below the cursor instead, the way `:scroll`
807807 // does: everything from here to the bottom of the window.
808+ //
809+ // And `:reserve` bounds it the way it bounds a `:scroll`, for the same
810+ // reason: everything to the bottom of the window is too much when
811+ // something has to come after it. A column that takes the whole
812+ // remainder pushes the row below it — a compose bar under a message
813+ // list — against the bottom edge, whatever margin that row asked for.
814+ // The number is what the caller knows: the height of what follows.
808815 let height = if fill_height {
809- (ui.clip_rect().bottom() - ui.cursor().top()).max(0.0)
816+ let reserve = props.num("reserve", 0.0) as f32;
817+ ((ui.clip_rect().bottom() - ui.cursor().top()) - reserve).max(0.0)
810818 } else {
811819 ui.available_height().max(0.0)
812820 };
@@ -805,8 +805,16 @@ impl Tree {
805 // scrolling list inside it gets no room. `:fill-height` measures805 // scrolling list inside it gets no room. `:fill-height` measures
806 // against what is visible below the cursor instead, the way `:scroll`806 // against what is visible below the cursor instead, the way `:scroll`
807 // does: everything from here to the bottom of the window.807 // does: everything from here to the bottom of the window.
808+ //
809+ // And `:reserve` bounds it the way it bounds a `:scroll`, for the same
810+ // reason: everything to the bottom of the window is too much when
811+ // something has to come after it. A column that takes the whole
812+ // remainder pushes the row below it — a compose bar under a message
813+ // list — against the bottom edge, whatever margin that row asked for.
814+ // The number is what the caller knows: the height of what follows.
808 let height = if fill_height {815 let height = if fill_height {
809- (ui.clip_rect().bottom() - ui.cursor().top()).max(0.0)816+ let reserve = props.num("reserve", 0.0) as f32;
817+ ((ui.clip_rect().bottom() - ui.cursor().top()) - reserve).max(0.0)
810 } else {818 } else {
811 ui.available_height().max(0.0)819 ui.available_height().max(0.0)
812 };820 };