about summary refs log tree commit diff stats
path: root/code/directory.rb
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-07-20 22:25:01 +0200
committerhut <hut@lavabit.com>2009-07-20 22:25:01 +0200
commit08a843ec650087653f70c6a33f1b963cad4ab967 (patch)
tree351bb9dff20a2f9108c96495d16fc485006e56bc /code/directory.rb
parent6172a793e21e4629cb1167a1b2e095bc9156c688 (diff)
downloadranger-08a843ec650087653f70c6a33f1b963cad4ab967.tar.gz
general cleanups and bugfixes
Diffstat (limited to 'code/directory.rb')
-rw-r--r--code/directory.rb36
1 files changed, 0 insertions, 36 deletions
diff --git a/code/directory.rb b/code/directory.rb
index ab636b0b..8e8f2269 100644
--- a/code/directory.rb
+++ b/code/directory.rb
@@ -62,30 +62,12 @@ class Directory
 	def read?() @read end
 
 	def pos=(x)
-#		if @files.size <= 1 or x < 0
-#			x = 0
-#		elsif x > @files.size
-#			x = @files.size - 1
-#		end
 		@pos = x
 		make_sure_cursor_is_in_range()
 		@pointed_file = @files_raw[x]
 		resize
 	end
 
-	def recheck_stuff()
-#		log "pointed file: #@pointed_file"
-#		log @files_raw
-#		log ""
-		if test = @files_raw.index(@pointed_file)
-#			log("if")
-			@pos = test
-		else
-#			log("else")
-			make_sure_cursor_is_in_range()
-		end
-	end
-
 	def make_sure_cursor_is_in_range()
 		if @files.size <= 1 or @pos < 0
 			@pos = 0
@@ -163,24 +145,6 @@ class Directory
 		schedule_resort
 	end
 
-#	def refresh()
-#		@files = Dir.new(@path).to_a
-#		if Option.hidden
-#			@files -= ['.', '..', 'lost+found']
-#		else
-#			@files.reject!{|x| x[0] == ?. or x == 'lost+found'}
-#		end
-#		if @files.empty?
-#			@files = ['.']
-#		end
-#		@files.map!{|basename| Entry.new(@path, basename)}
-#
-#		if @pos >= @files.size
-#			@pos = @files.size - 1
-#		elsif @files.include?(@pointed_file)
-#			@pos = @files.index(@pointed_file)
-#		end
-#	end
 	def refresh(info=false)
 		oldfile = @pointed_file