summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/gui/ui.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/ranger/gui/ui.py b/ranger/gui/ui.py
index 2874ee97..9900ce52 100644
--- a/ranger/gui/ui.py
+++ b/ranger/gui/ui.py
@@ -277,6 +277,10 @@ class UI(  # pylint: disable=too-many-instance-attributes,too-many-public-method
                 else:
                     if not self.fm.input_is_blocked():
                         self.handle_key(key)
+            elif key == -1 and not os.isatty(sys.stdin.fileno()):
+                # STDIN has been closed
+                self.fm.exit()
+
 
     def setup(self):
         """Build up the UI by initializing widgets."""
8bbafb13 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15