From ab2265d35945afdee9d4c0d06bf7859157e7b8ce Mon Sep 17 00:00:00 2001 From: hut Date: Mon, 27 Sep 2010 14:38:34 +0200 Subject: 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. --- ranger/core/actions.py | 2 ++ 1 file changed, 2 insertions(+) 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: -- cgit 1.4.1-2-gfad0