about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-12-17 19:55:46 +0100
committerhut <hut@lavabit.com>2009-12-17 19:55:46 +0100
commitd672cbcb3eaef39222fd3902b8ffcb80a21f48f1 (patch)
tree7f325fe01cb09971401acb8d70beef8aaf64359c
parent277a7026164384ec453bbb8c59c91996e8262d18 (diff)
downloadranger-d672cbcb3eaef39222fd3902b8ffcb80a21f48f1.tar.gz
fixed history (fast_forward worked reversed)
-rw-r--r--ranger/container/history.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/ranger/container/history.py b/ranger/container/history.py
index 355c7c72..80fe8b4a 100644
--- a/ranger/container/history.py
+++ b/ranger/container/history.py
@@ -29,7 +29,7 @@ class History(object):
 
 	def top(self):
 		try:
-			return self.history_forward[0]
+			return self.history_forward[-1]
 		except IndexError:
 			try:
 				return self.history[-1]
@@ -44,7 +44,7 @@ class History(object):
 
 	def back(self):
 		if len(self.history) > 1:
-			self.history_forward.append( self.history.pop() )
+			self.history_forward.appendleft( self.history.pop() )
 		return self.current()
 
 	def move(self, n):
@@ -61,7 +61,7 @@ class History(object):
 
 	def forward(self):
 		if len(self.history_forward) > 0:
-			self.history.append( self.history_forward.pop() )
+			self.history.append( self.history_forward.popleft() )
 		return self.current()
 
 	def fast_forward(self):