diff options
author | hut <hut@lavabit.com> | 2010-04-06 03:02:13 +0200 |
---|---|---|
committer | hut <hut@lavabit.com> | 2010-04-06 03:02:13 +0200 |
commit | f9211341cfef720cd7c615655d612b3f489e04f8 (patch) | |
tree | 93d00804aaa63576dc3e1621dc818ff6c16c4e85 | |
parent | 319c55cb0e336d83cbfea03fa94b61bfd91895a2 (diff) | |
download | ranger-f9211341cfef720cd7c615655d612b3f489e04f8.tar.gz |
core.actions: don't jump to first tab when closing the last
-rw-r--r-- | ranger/core/actions.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py index 877c300e..e2dfd837 100644 --- a/ranger/core/actions.py +++ b/ranger/core/actions.py @@ -439,8 +439,9 @@ class Actions(EnvironmentAware, SettingsAware): if name is None: name = self.current_tab if name == self.current_tab: + direction = -1 if name == self._get_tab_list()[-1] else 1 previous = self.current_tab - self.tab_move(1) + self.tab_move(direction) if previous == self.current_tab: return # can't close last tab if name in self.tabs: |