Browse code

Fix output when ttyout == stdout

John Hawthorn authored on 12/07/2014 04:42:16
Showing 1 changed files

  • fzy.c index 09d9809..0217db5 100644
... ...
@@ -132,6 +132,9 @@ void draw(){
132 132
 }
133 133
 
134 134
 void emit(){
135
+	/* ttyout should be flushed in the case that it is == stdout */
136
+	fclose(ttyout);
137
+
135 138
 	int i;
136 139
 	for(i = 0; i < choices_n; i++){
137 140
 		double rank = match(search, choices[i]);