diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2023-06-16 14:33:15 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2023-06-20 12:55:32 +0000 |
| commit | 24f12c7b5e753a5152eac44da9024954d43250e9 (patch) | |
| tree | c9a67157b139dcb33aa5ffcdb21d3947dc7f2114 /terminal.c | |
| parent | vt: split up action_param() to three separate functions (diff) | |
term: add term_cursor_col()
Set cursor column, absolute.
term_cursor_to() needs to reload the current row pointer, and is thus
not very effective when we only need to modify the column.
Diffstat (limited to 'terminal.c')
| -rw-r--r-- | terminal.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -2558,6 +2558,15 @@ term_cursor_home(struct terminal *term) } void +term_cursor_col(struct terminal *term, int col) +{ + xassert(col < term->cols); + + term->grid->cursor.lcf = false; + term->grid->cursor.point.col = col; +} + +void term_cursor_left(struct terminal *term, int count) { int move_amount = min(term->grid->cursor.point.col, count); |
