diff options
-rw-r--r-- | ranger/gui/widgets/console.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ranger/gui/widgets/console.py b/ranger/gui/widgets/console.py index f02a4b01..ff8d137a 100644 --- a/ranger/gui/widgets/console.py +++ b/ranger/gui/widgets/console.py @@ -498,7 +498,8 @@ class OpenConsole(ConsoleWithTab): tab_dir = self.fm.env.get_directory(tab_dir_path) i = str(i) macros[i + 'd'] = shell_quote(tab_dir_path) - macros[i + 'f'] = shell_quote(tab_dir.pointed_obj.path) + if tab_dir.pointed_obj: + macros[i + 'f'] = shell_quote(tab_dir.pointed_obj.path) macros[i + 's'] = ' '.join(shell_quote(fl.path) for fl in tab_dir.get_selection()) @@ -519,7 +520,8 @@ class OpenConsole(ConsoleWithTab): next_tab = self.fm.env.get_directory(next_tab_path) macros['D'] = shell_quote(next_tab) - macros['F'] = shell_quote(next_tab.pointed_obj.path) + if next_tab.pointed_obj: + macros['F'] = shell_quote(next_tab.pointed_obj.path) macros['S'] = ' '.join(shell_quote(fl.path) for fl in next_tab.get_selection()) |