fix(ui): reclaim pad by dead space instead of absolute height #135

Manually merged
jabber.developer merged 2 commits from fix/pad-dead-space-reclaim into master 2026-06-24 16:23:14 +00:00
Showing only changes of commit 36512d9dde - Show all commits

View File

@@ -58,7 +58,7 @@ _win_ensure_pad_capacity(ProfWin* window, WINDOW* win, int lines_needed)
if (lines_needed >= cur_height - 1) {
// redraw to reclaim dead pad space (cursor far past live buffer, e.g. a long
// append-only session); dead space never accrues while scrolling, only here
int dead = window ? lines_needed - window->layout->buffer->lines : 0;
int dead = window ? getcury(win) - window->layout->buffer->lines : 0;
if (window && dead > PAD_DEAD_SPACE_LIMIT && !_in_redraw) {
win_redraw(window);
} else {