termptyesc: use macro to restrict field value
This commit is contained in:
parent
490a065fb1
commit
7b5a9b74bc
|
@ -766,8 +766,7 @@ _handle_esc_csi(Termpty *ty, const Eina_Unicode *c, Eina_Unicode *ce)
|
|||
break;
|
||||
case '@': // insert N blank chars
|
||||
arg = _csi_arg_get(&b);
|
||||
if (arg < 1) arg = 1;
|
||||
if (arg > ty->w * ty->h) arg = ty->w * ty->h;
|
||||
TERMPTY_RESTRICT_FIELD(ty->cursor_state.cx, 1, ty->w * ty->h);
|
||||
DBG("insert %d blank chars", arg);
|
||||
{
|
||||
int pi = ty->termstate.insert;
|
||||
|
|
Loading…
Reference in New Issue