mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
render: scrollback indicator: only leave room for search box when necessary
This commit is contained in:
parent
1109865c8e
commit
c8d0dc5750
1 changed files with 5 additions and 1 deletions
6
render.c
6
render.c
|
|
@ -1469,7 +1469,11 @@ render_scrollback_position(struct terminal *term)
|
|||
break;
|
||||
|
||||
case SCROLLBACK_INDICATOR_POSITION_RELATIVE: {
|
||||
int lines = term->rows - 3; /* Avoid using first and two last rows */
|
||||
int lines = term->rows - 2; /* Avoid using first and last rows */
|
||||
if (term->is_searching) {
|
||||
/* Make sure we don't collide with the scrollback search box */
|
||||
lines--;
|
||||
}
|
||||
assert(lines > 0);
|
||||
|
||||
int pixels = lines * term->cell_height - height + 2 * margin;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue