diff options
-rw-r--r-- | ranger/gui/ui.py | 4 |
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.""" |