termptyesc: fix invalid clamping on CSI X

Fixes a regression introduced by commit bd6c81e, which broke the ncurses
rendering of the Kernel menuconfig, making it impossible to be used.
This commit is contained in:
Jean Guyomarc'h 2017-06-04 18:35:46 +02:00
parent 20cbab21fc
commit ede4196eae
1 changed files with 1 additions and 1 deletions

View File

@ -982,7 +982,7 @@ _handle_esc_csi(Termpty *ty, const Eina_Unicode *c, Eina_Unicode *ce)
break;
case 'X': // erase N chars
arg = _csi_arg_get(&b);
TERMPTY_RESTRICT_FIELD(arg, 1, ty->h);
TERMPTY_RESTRICT_FIELD(arg, 1, ty->w);
DBG("erase %d chars", arg);
termpty_clear_line(ty, TERMPTY_CLR_END, arg);
break;