aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2019-01-20 18:34:41 +0100
committerBoris Faure <billiob@gmail.com>2019-01-20 18:35:03 +0100
commitbef8cb13733e4656297514c40ea8ceb14b60aa08 (patch)
treebb0b985e5b0d6002e5961dc1fedc07eaf65f45f3 /src
parenttermptyesc: support Unset Tab Stop (only VTE so far) + tests (diff)
downloadterminology-bef8cb13733e4656297514c40ea8ceb14b60aa08.tar.gz
termptyesc: add debug on CUD or VPR
Diffstat (limited to 'src')
-rw-r--r--src/bin/termptyesc.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/bin/termptyesc.c b/src/bin/termptyesc.c
index a311760..2e134d4 100644
--- a/src/bin/termptyesc.c
+++ b/src/bin/termptyesc.c
@@ -2402,7 +2402,8 @@ _handle_esc_csi_cuu(Termpty *ty, Eina_Unicode **ptr)
}
static void
-_handle_esc_csi_cud(Termpty *ty, Eina_Unicode **ptr)
+_handle_esc_csi_cud_or_vpr(Termpty *ty, Eina_Unicode **ptr,
+ const Eina_Unicode *cc)
{
Eina_Unicode *b = *ptr;
int arg = _csi_arg_get(ty, &b);
@@ -2413,7 +2414,15 @@ _handle_esc_csi_cud(Termpty *ty, Eina_Unicode **ptr)
if (arg < 1)
arg = 1;
- DBG("CUD - Cursor Down %d", arg);
+ if (*cc == 'e')
+ {
+ DBG("VPR - Vertical Position Relative: %d", arg);
+ }
+ else
+ {
+ DBG("CUD - Cursor Down: %d", arg);
+ }
+
ty->termstate.wrapnext = 0;
ty->cursor_state.cy = MIN(ty->h - 1, ty->cursor_state.cy + arg);
TERMPTY_RESTRICT_FIELD(ty->cursor_state.cy, 0, ty->h);
@@ -2992,7 +3001,7 @@ _handle_esc_csi(Termpty *ty, const Eina_Unicode *c, const Eina_Unicode *ce)
_handle_esc_csi_cuu(ty, &b);
break;
case 'B':
- _handle_esc_csi_cud(ty, &b);
+ _handle_esc_csi_cud_or_vpr(ty, &b, cc);
break;
case 'C':
_handle_esc_csi_cuf(ty, &b);
@@ -3089,7 +3098,7 @@ _handle_esc_csi(Termpty *ty, const Eina_Unicode *c, const Eina_Unicode *ce)
}
break;
case 'e':
- _handle_esc_csi_cud(ty, &b);
+ _handle_esc_csi_cud_or_vpr(ty, &b, cc);
break;
case 'f':
_handle_esc_csi_cursor_pos_set(ty, &b, cc);