diff --git a/src/bin/termptyesc.c b/src/bin/termptyesc.c index 30c9df65..918e9afc 100644 --- a/src/bin/termptyesc.c +++ b/src/bin/termptyesc.c @@ -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;