about summary refs log tree commit diff stats
path: root/code
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-07-20 22:20:16 +0200
committerhut <hut@lavabit.com>2009-07-20 22:20:16 +0200
commit94ef2518cebe71fd549f32f3c0caa5daab747537 (patch)
tree72193b14cdbf475d2f2223d758a9668069ca206c /code
parentc070e54d6275728427a9e52d6aa8b7a2ec3391a8 (diff)
downloadranger-94ef2518cebe71fd549f32f3c0caa5daab747537.tar.gz
corrected some stupid, wrong code
Diffstat (limited to 'code')
-rw-r--r--code/directory.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/code/directory.rb b/code/directory.rb
index 870ecbb1..ef4f1ba6 100644
--- a/code/directory.rb
+++ b/code/directory.rb
@@ -69,7 +69,7 @@ class Directory
 #		end
 		@pos = x
 		make_sure_cursor_is_in_range()
-		@pointed_file = @files[x]
+		@pointed_file = @files_raw[x]
 		resize
 	end
 
@@ -89,7 +89,7 @@ class Directory
 	def make_sure_cursor_is_in_range()
 		if @files.size <= 1 or @pos < 0
 			@pos = 0
-		elsif @pos > @files.size
+		elsif @pos > @files.size - 1
 			@pos = @files.size - 1
 		end
 	end