termptyesc: CUP/HVP are impacted by DECOM

This commit is contained in:
Boris Faure 2017-06-01 22:51:34 +02:00
parent 6c750c660c
commit 339b72174c
1 changed files with 5 additions and 4 deletions

View File

@ -830,9 +830,9 @@ _handle_esc_csi(Termpty *ty, const Eina_Unicode *c, Eina_Unicode *ce)
ty->cursor_state.cx += arg;
TERMPTY_RESTRICT_FIELD(ty->cursor_state.cx, 0, ty->w);
break;
case 'H': // cursor pos set
case 'f': // cursor pos set
DBG("cursor pos set");
case 'H': // cursor pos set (CUP)
case 'f': // cursor pos set (HVP)
DBG("cursor pos set (%s)", (*cc == 'H') ? "CUP" : "HVP");
ty->termstate.wrapnext = 0;
if (!*b)
{
@ -861,6 +861,7 @@ _handle_esc_csi(Termpty *ty, const Eina_Unicode *c, Eina_Unicode *ce)
}
}
TERMPTY_RESTRICT_FIELD(ty->cursor_state.cx, 0, ty->w);
if (ty->termstate.restrict_cursor)
ty->cursor_state.cy += ty->termstate.top_margin;
TERMPTY_RESTRICT_FIELD(ty->cursor_state.cy, 0, ty->h);
break;