acme: fix fd checks - initialize Window.rdselfd to -1 not 0

front
cinap_lenrek 2018-10-20 23:57:50 +02:00
parent 84e019aba3
commit b4eb667f02
2 changed files with 2 additions and 1 deletions

View File

@ -84,6 +84,7 @@ coladd(Column *c, Window *w, Window *clone, int y)
}
if(w == nil){
w = emalloc(sizeof(Window));
w->rdselfd = -1;
w->col = c;
draw(screen, r, textcols[BACK], nil, ZP);
wininit(w, clone, r);

View File

@ -236,7 +236,7 @@ xfidclose(Xfid *x)
break;
case QWrdsel:
close(w->rdselfd);
w->rdselfd = 0;
w->rdselfd = -1;
break;
case QWwrsel:
w->nomark = FALSE;