mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-21 01:40:16 -05:00
render: resize; heuristics to prevent prompt from being printed on a newline
This commit is contained in:
parent
ea52d3e570
commit
a96a6c2c58
1 changed files with 5 additions and 5 deletions
10
render.c
10
render.c
|
|
@ -1229,15 +1229,15 @@ maybe_resize(struct terminal *term, int width, int height, bool force)
|
|||
while (cursor_row < 0)
|
||||
cursor_row += term->grid->num_rows;
|
||||
|
||||
#if 0
|
||||
if (term->cursor.point.col < term->cols - 1)
|
||||
/* Heuristic to prevent a new prompt from being printed a new line */
|
||||
if (term->cursor.point.col > 0)
|
||||
cursor_row--;
|
||||
#endif
|
||||
else if (cursor_row >= term->rows)
|
||||
term_linefeed(term);
|
||||
|
||||
assert(cursor_row < term->rows);
|
||||
term_cursor_to(
|
||||
term,
|
||||
max(cursor_row, 0),
|
||||
min(max(cursor_row, 0), term->rows - 1),
|
||||
min(term->cursor.point.col, term->cols - 1));
|
||||
|
||||
term->render.last_cursor.cell = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue