csi: add untested implementation of "horizontal index"

This commit is contained in:
Daniel Eklöf 2019-07-03 14:47:01 +02:00
parent 2fad8138e1
commit 92f0d64279
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

11
csi.c
View file

@ -473,6 +473,17 @@ csi_dispatch(struct terminal *term, uint8_t final)
break; break;
} }
case 'l': {
/* Horizontal index */
assert(false && "untested");
int param = param_get(term, 0, 1);
int col = term->cursor.col;
col = (col + param * 8) / 8 * 8;
term_cursor_right(term, col - term->cursor.col);
break;
}
case 'r': { case 'r': {
int start = param_get(term, 0, 1); int start = param_get(term, 0, 1);
int end = param_get(term, 1, term->rows); int end = param_get(term, 1, term->rows);