termptyesc: only do IL/DL when inside margins

This commit is contained in:
Boris Faure 2017-06-01 22:52:16 +02:00
parent 339b72174c
commit dbc75a0cc0
1 changed files with 3 additions and 0 deletions

View File

@ -924,6 +924,9 @@ _handle_esc_csi(Termpty *ty, const Eina_Unicode *c, Eina_Unicode *ce)
arg = _csi_arg_get(&b); arg = _csi_arg_get(&b);
TERMPTY_RESTRICT_FIELD(arg, 1, ty->h); TERMPTY_RESTRICT_FIELD(arg, 1, ty->h);
DBG("%s %d lines", (*cc == 'M') ? "delete" : "insert", arg); DBG("%s %d lines", (*cc == 'M') ? "delete" : "insert", arg);
if ((ty->cursor_state.cy >= ty->termstate.top_margin) &&
((ty->termstate.bottom_margin == 0) ||
(ty->cursor_state.cy < ty->termstate.bottom_margin)))
{ {
int sy1, sy2; int sy1, sy2;