render: scrollback indicator: subtract visible rows from populated rows

This prevents the indicator from starting too high up when the number
of used scrollback rows is low.
This commit is contained in:
Daniel Eklöf 2020-08-26 19:10:00 +02:00
parent cc24c5f2e0
commit 1109865c8e
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -1424,7 +1424,7 @@ render_scrollback_position(struct terminal *term)
double percent =
rebased_view + term->rows == populated_rows
? 1.0
: (double)rebased_view / populated_rows;
: (double)rebased_view / (populated_rows - term->rows);
wchar_t _text[64];
const wchar_t *text = _text;