ref: 65d772993cf7b1aca3c0516420c2bf83af3ef3fa
parent: 366a42bfa11cc9b28520d4ae0315e6d6752b158b
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sat Oct 20 19:57:50 EDT 2018
acme: fix fd checks - initialize Window.rdselfd to -1 not 0
--- a/sys/src/cmd/acme/cols.c
+++ b/sys/src/cmd/acme/cols.c
@@ -84,6 +84,7 @@
}
if(w == nil){w = emalloc(sizeof(Window));
+ w->rdselfd = -1;
w->col = c;
draw(screen, r, textcols[BACK], nil, ZP);
wininit(w, clone, r);
--- a/sys/src/cmd/acme/xfid.c
+++ b/sys/src/cmd/acme/xfid.c
@@ -236,7 +236,7 @@
break;
case QWrdsel:
close(w->rdselfd);
- w->rdselfd = 0;
+ w->rdselfd = -1;
break;
case QWwrsel:
w->nomark = FALSE;
--
⑨