term: line-wrap: use term_cursor_{down,left}

This commit is contained in:
Daniel Eklöf 2020-07-14 10:08:57 +02:00
parent b9719673a1
commit bbce760ab0
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -2352,11 +2352,11 @@ print_linewrap(struct terminal *term)
return;
}
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_cursor_to(term, term->grid->cursor.point.row, 0);
} else
term_cursor_to(term, min(term->grid->cursor.point.row + 1, term->rows - 1), 0);
else
term_cursor_down(term, 1);
term_cursor_left(term, term->grid->cursor.point.col);
}
static inline void