forked from enlightenment/terminology
Give commit 5ab7a6f827
another go
"Do not let CUU and CUD scroll off screen." Previously I missed how the default values are implemented. Reviewers: billiob, cedric Differential Revision: https://phab.enlightenment.org/D417 Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
This commit is contained in:
parent
1cc793f564
commit
ae9226f823
|
@ -381,22 +381,14 @@ _handle_esc_csi(Termpty *ty, const Eina_Unicode *c, Eina_Unicode *ce)
|
||||||
if (arg < 1) arg = 1;
|
if (arg < 1) arg = 1;
|
||||||
DBG("cursor up %d", arg);
|
DBG("cursor up %d", arg);
|
||||||
ty->state.wrapnext = 0;
|
ty->state.wrapnext = 0;
|
||||||
for (i = 0; i < arg; i++)
|
ty->state.cy = MAX(0, ty->state.cy - arg);
|
||||||
{
|
|
||||||
ty->state.cy--;
|
|
||||||
_termpty_text_scroll_rev_test(ty, EINA_FALSE);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 'B': // cursor down N
|
case 'B': // cursor down N
|
||||||
arg = _csi_arg_get(&b);
|
arg = _csi_arg_get(&b);
|
||||||
if (arg < 1) arg = 1;
|
if (arg < 1) arg = 1;
|
||||||
DBG("cursor down %d", arg);
|
DBG("cursor down %d", arg);
|
||||||
ty->state.wrapnext = 0;
|
ty->state.wrapnext = 0;
|
||||||
for (i = 0; i < arg; i++)
|
ty->state.cy = MIN(ty->h - 1, ty->state.cy + arg);
|
||||||
{
|
|
||||||
ty->state.cy++;
|
|
||||||
_termpty_text_scroll_test(ty, EINA_FALSE);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 'D': // cursor left N
|
case 'D': // cursor left N
|
||||||
arg = _csi_arg_get(&b);
|
arg = _csi_arg_get(&b);
|
||||||
|
|
Loading…
Reference in New Issue