diff options
-rw-r--r-- | ranger/gui/widgets/titlebar.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ranger/gui/widgets/titlebar.py b/ranger/gui/widgets/titlebar.py index ec2b4ab7..042b4b04 100644 --- a/ranger/gui/widgets/titlebar.py +++ b/ranger/gui/widgets/titlebar.py @@ -69,12 +69,11 @@ class TitleBar(Widget): for i, part in enumerate(self.result): pos += len(part) if event.x < pos: - if i < 2: + if self.settings.hostname_in_titlebar and i <= 2: self.fm.enter_dir("~") - elif i == 2: - self.fm.enter_dir("/") else: - self.fm.enter_dir(part.directory) + if 'directory' in part.__dict__: + self.fm.enter_dir(part.directory) return True return False |