aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-06-22 20:25:19 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-06-22 20:25:19 +0000
commit7998ce9ee45174e6c677c9f9612f1902f7f28e7c (patch)
treee94a29cd8a738a1645a2ce29510ae1a5783aecde
parentrender: implement 'reverse' attribute (diff)
csi: remove commented out debug logging
-rw-r--r--csi.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/csi.c b/csi.c
index b15b2893..f1d77469 100644
--- a/csi.c
+++ b/csi.c
@@ -152,28 +152,24 @@ csi_dispatch(struct terminal *term, uint8_t final)
case 'A': {
int count = term->vt.params.idx > 0 ? term->vt.params.v[0].value : 1;
grid_cursor_up(&term->grid, count);
- //LOG_DBG("CSI: A: row = %d, col = %d", term->grid.cursor.row, term->grid.cursor.col);
break;
}
case 'B': {
int count = term->vt.params.idx > 0 ? term->vt.params.v[0].value : 1;
grid_cursor_down(&term->grid, count);
- //LOG_DBG("CSI: B: row = %d, col = %d", term->grid.cursor.row, term->grid.cursor.col);
break;
}
case 'C': {
int count = term->vt.params.idx > 0 ? term->vt.params.v[0].value : 1;
grid_cursor_right(&term->grid, count);
- //LOG_DBG("CSI: C: row = %d, col = %d", term->grid.cursor.row, term->grid.cursor.col);
break;
}
case 'D': {
int count = term->vt.params.idx > 0 ? term->vt.params.v[0].value : 1;
grid_cursor_left(&term->grid, count);
- //LOG_DBG("CSI: D: row = %d, col = %d", term->grid.cursor.row, term->grid.cursor.col);
break;
}
@@ -217,10 +213,7 @@ csi_dispatch(struct terminal *term, uint8_t final)
case 'K': {
/* Erase line */
- int param = 0;
- if (term->vt.params.idx > 0)
- param = term->vt.params.v[0].value;
-
+ int param = term->vt.params.idx > 0 ? term->vt.params.v[0].value : 0;
int start = -1;
int end = -1;
switch (param) {
@@ -229,8 +222,6 @@ csi_dispatch(struct terminal *term, uint8_t final)
start = term->grid.linear_cursor;
end = grid_cursor_linear(
&term->grid, term->grid.cursor.row, term->grid.cols);
- //LOG_WARN("CSI: K: linear = %d, row = %d, col = %d, end = %d",
- // start, term->grid.cursor.row, term->grid.cursor.col, end);
break;
case 1:
@@ -259,9 +250,7 @@ csi_dispatch(struct terminal *term, uint8_t final)
case 'P': {
/* DCH: Delete character */
- int param = 1;
- if (term->vt.params.idx > 0)
- param = term->vt.params.v[0].value;
+ int param = term->vt.params.idx > 0 ? term->vt.params.v[0].value : 1;
/* Only delete up to the right margin */
const int max_end = grid_cursor_linear(