fix(ui): reclaim pad by dead space instead of absolute height #135
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user