#38 oops
[fanfix.git] / src / jexer / backend / ECMA48Terminal.java
index f0b3e3cc20d7d936368a528b75062a77db087114..afd153579e961c9637412a32faf73792394ac85f 100644 (file)
@@ -1455,6 +1455,11 @@ public class ECMA48Terminal extends LogicalScreen
                         events.clear();
                     }
 
+                    if (output.checkError()) {
+                        // This is EOF.
+                        done = true;
+                    }
+
                     // Wait 20 millis for more data
                     Thread.sleep(20);
                 }
@@ -1466,6 +1471,10 @@ public class ECMA48Terminal extends LogicalScreen
                 done = true;
             }
         } // while ((done == false) && (stopReaderThread == false))
+
+        // TODO: pass an event up to TApplication to tell it this Backend is
+        // done.
+
         // System.err.println("*** run() exiting..."); System.err.flush();
     }