mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
term->grid->cursor.lcf = false;
|
||||||
if (term->grid->cursor.point.row == term->scroll_region.end - 1)
|
if (term->grid->cursor.point.row == term->scroll_region.end - 1)
|
||||||
term_scroll(term, 1);
|
term_scroll(term, 1);
|
||||||
else
|
else {
|
||||||
term_cursor_down(term, 1);
|
assert(term->grid->cursor.point.row < term->scroll_region.end - 1);
|
||||||
term_cursor_left(term, term->grid->cursor.point.col);
|
term->grid->cursor.point.row++;
|
||||||
|
}
|
||||||
|
|
||||||
|
term->grid->cursor.point.col = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue