mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-31 07:11:09 -04:00
Revert "vt: replace pre_print() with term_autowrap()"
This reverts commit fd8a399274.
This commit is contained in:
parent
7f4b2c5755
commit
04cbee7593
1 changed files with 14 additions and 2 deletions
16
vt.c
16
vt.c
|
|
@ -712,6 +712,18 @@ esc_dispatch(struct terminal *term, uint8_t final)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void
|
||||||
|
pre_print(struct terminal *term)
|
||||||
|
{
|
||||||
|
if (unlikely(term->cursor.lcf) && term->auto_margin) {
|
||||||
|
if (term->cursor.point.row == term->scroll_region.end - 1) {
|
||||||
|
term_scroll(term, 1);
|
||||||
|
term_cursor_to(term, term->cursor.point.row, 0);
|
||||||
|
} else
|
||||||
|
term_cursor_to(term, term->cursor.point.row + 1, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
post_print(struct terminal *term)
|
post_print(struct terminal *term)
|
||||||
{
|
{
|
||||||
|
|
@ -742,7 +754,7 @@ print_insert(struct terminal *term, int width)
|
||||||
static void
|
static void
|
||||||
action_print_utf8(struct terminal *term)
|
action_print_utf8(struct terminal *term)
|
||||||
{
|
{
|
||||||
term_autowrap(term);
|
pre_print(term);
|
||||||
|
|
||||||
struct row *row = term->grid->cur_row;
|
struct row *row = term->grid->cur_row;
|
||||||
struct cell *cell = &row->cells[term->cursor.point.col];
|
struct cell *cell = &row->cells[term->cursor.point.col];
|
||||||
|
|
@ -786,7 +798,7 @@ action_print_utf8(struct terminal *term)
|
||||||
static void
|
static void
|
||||||
action_print(struct terminal *term, uint8_t c)
|
action_print(struct terminal *term, uint8_t c)
|
||||||
{
|
{
|
||||||
term_autowrap(term);
|
pre_print(term);
|
||||||
|
|
||||||
struct row *row = term->grid->cur_row;
|
struct row *row = term->grid->cur_row;
|
||||||
struct cell *cell = &row->cells[term->cursor.point.col];
|
struct cell *cell = &row->cells[term->cursor.point.col];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue