mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
term: line-wrap: manually set cursor row+col
line-wrap is in the hot path, and term_cursor_down/left adds additional checks that we don't need.
This commit is contained in:
parent
803c87bb65
commit
b8c7dfba5c
1 changed files with 7 additions and 3 deletions
10
terminal.c
10
terminal.c
|
|
@ -2354,11 +2354,15 @@ print_linewrap(struct terminal *term)
|
|||
return;
|
||||
}
|
||||
|
||||
term->grid->cursor.lcf = false;
|
||||
if (term->grid->cursor.point.row == term->scroll_region.end - 1)
|
||||
term_scroll(term, 1);
|
||||
else
|
||||
term_cursor_down(term, 1);
|
||||
term_cursor_left(term, term->grid->cursor.point.col);
|
||||
else {
|
||||
assert(term->grid->cursor.point.row < term->scroll_region.end - 1);
|
||||
term->grid->cursor.point.row++;
|
||||
}
|
||||
|
||||
term->grid->cursor.point.col = 0;
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue