termpty: compute exact line length in termpty_cellrow_get()

This commit is contained in:
Boris Faure 2019-02-21 18:42:28 +01:00
parent 6c29e8f208
commit e024618dba
1 changed files with 4 additions and 2 deletions

View File

@ -1203,10 +1203,12 @@ termpty_cellrow_get(Termpty *ty, int y_requested, ssize_t *wret)
{
if (y_requested >= 0)
{
Termcell *cells = &(TERMPTY_SCREEN(ty, 0, y_requested));
if (y_requested >= ty->h)
return NULL;
*wret = ty->w;
return &(TERMPTY_SCREEN(ty, 0, y_requested));
*wret = termpty_line_length(cells, ty->w);
return cells;
}
if (!ty->back)
return NULL;