correctly handle empty lines when doing selections

This commit is contained in:
Boris Faure 2015-04-18 22:44:42 +02:00
parent 688f417814
commit 0e18a185fe
1 changed files with 5 additions and 1 deletions

View File

@ -2055,7 +2055,11 @@ termio_selection_get(Evas_Object *obj, int c1x, int c1y, int c2x, int c2y,
w = 0;
last0 = -1;
cells = termpty_cellrow_get(sd->pty, y, &w);
if (!cells) continue;
if (!cells || !w)
{
if (_sb_add(&sb, "\n", 1) < 0) goto err;
continue;
}
if (w > sd->grid.w) w = sd->grid.w;
if (y == c1y && c1x >= w)
{