aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/termptyesc.c
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2017-06-01 22:51:34 +0200
committerBoris Faure <billiob@gmail.com>2017-06-01 22:51:34 +0200
commit339b72174cf5d8682c44f4ec989de5608875d56e (patch)
tree1dc719fb05dfcae084d2683c3215cf5324aed664 /src/bin/termptyesc.c
parenttermpty: on reset, no longer restrict cursor (diff)
downloadterminology-339b72174cf5d8682c44f4ec989de5608875d56e.tar.gz
termptyesc: CUP/HVP are impacted by DECOM
Diffstat (limited to 'src/bin/termptyesc.c')
-rw-r--r--src/bin/termptyesc.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/bin/termptyesc.c b/src/bin/termptyesc.c
index f0376a4..c9cd074 100644
--- a/src/bin/termptyesc.c
+++ b/src/bin/termptyesc.c
@@ -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,7 +861,8 @@ _handle_esc_csi(Termpty *ty, const Eina_Unicode *c, Eina_Unicode *ce)
}
}
TERMPTY_RESTRICT_FIELD(ty->cursor_state.cx, 0, ty->w);
- ty->cursor_state.cy += ty->termstate.top_margin;
+ if (ty->termstate.restrict_cursor)
+ ty->cursor_state.cy += ty->termstate.top_margin;
TERMPTY_RESTRICT_FIELD(ty->cursor_state.cy, 0, ty->h);
break;
case 'G': // to column N