summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-09-27 14:38:34 +0200
committerhut <hut@lavabit.com>2010-10-10 02:48:22 +0200
commitab2265d35945afdee9d4c0d06bf7859157e7b8ce (patch)
treeff093c8d52617aae55eb320476259099cbfdfd63
parent36814777ba720dc4c092becfad7ede98e4e89331 (diff)
downloadranger-ab2265d35945afdee9d4c0d06bf7859157e7b8ce.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.
-rw-r--r--ranger/core/actions.py2
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: