summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-06-20 17:12:32 +0200
committerhut <hut@lavabit.com>2010-06-20 17:12:32 +0200
commit1dbb5ce9e0dfe2b857020290b29e2e22321985ef (patch)
treefaa8f16d25ec05db51d9c782d4dab6ab0dfa5a17 /ranger
parentc928a9ebd2dc11142f5a7d5b1e6be5cff0183e96 (diff)
downloadranger-1dbb5ce9e0dfe2b857020290b29e2e22321985ef.tar.gz
core.actions: Fixed indexerror in move_parent()
Diffstat (limited to 'ranger')
-rw-r--r--ranger/core/actions.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py
index c85b7313..3c9f6135 100644
--- a/ranger/core/actions.py
+++ b/ranger/core/actions.py
@@ -140,7 +140,10 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware):
 
 	def move_parent(self, n):
 		parent = self.env.at_level(-1)
-		self.env.enter_dir(parent.files[parent.pointer+n])
+		try:
+			self.env.enter_dir(parent.files[parent.pointer+n])
+		except IndexError:
+			pass
 
 	def history_go(self, relative):
 		"""Move back and forth in the history"""