termiointernals: no out-of-band read when selecting empty lines
This commit is contained in:
parent
dff54aeca2
commit
7f4d891610
|
@ -409,7 +409,7 @@ _sel_line(Termio *sd, int cy)
|
|||
for (;;)
|
||||
{
|
||||
cells = termpty_cellrow_get(sd->pty, y - 1, &w);
|
||||
if (!cells || !cells[w-1].att.autowrapped)
|
||||
if (!cells || w <= 0 || !cells[w-1].att.autowrapped)
|
||||
break;
|
||||
y--;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue