diff options
author | hut <hut@lavabit.com> | 2010-09-27 14:38:34 +0200 |
---|---|---|
committer | hut <hut@lavabit.com> | 2010-09-27 14:38:59 +0200 |
commit | b4f09c1a287c23e9474747e5b46bc347b294026a (patch) | |
tree | 31890c194afcbc3a40f0901f761d88f32de62e17 /ranger | |
parent | 4d9266ac1fa9f163ce7a9738f07f380ba7e70e45 (diff) | |
download | ranger-b4f09c1a287c23e9474747e5b46bc347b294026a.tar.gz |
core.actions: Minor bug in move_parent()
Unwanted horizontal wrapping when all items in the parent directory are directories and you're moving below an index of 0.
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/core/actions.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py index b88849ef..a19927a4 100644 --- a/ranger/core/actions.py +++ b/ranger/core/actions.py @@ -216,6 +216,8 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware): def move_parent(self, n): parent = self.env.at_level(-1) + if parent.pointer + n < 0: + n = 0 - parent.pointer try: self.env.enter_dir(parent.files[parent.pointer+n]) except IndexError: |