about summary refs log tree commit diff stats
path: root/code
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-06-29 01:47:58 +0200
committerhut <hut@lavabit.com>2009-06-29 01:47:58 +0200
commita93af1cd059935e2103c38b9a2440dcd5d318e6c (patch)
tree289033a8ecbfa9c89c4e3b0ff5834a0722219123 /code
parent75c3d3dc6fc97501a1c13643682fd732b316a559 (diff)
downloadranger-a93af1cd059935e2103c38b9a2440dcd5d318e6c.tar.gz
padding of main column by 3 characters
Diffstat (limited to 'code')
-rw-r--r--code/directory.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/code/directory.rb b/code/directory.rb
index fd5f0cae..a686e87e 100644
--- a/code/directory.rb
+++ b/code/directory.rb
@@ -18,6 +18,11 @@ class Directory
 		refresh
 	end
 
+	def inspect
+		"<Directory: #{path}>"
+	end
+	alias to_s inspect
+
 	def read_dir
 		@mtime = File.mtime(@path)
 		log @path
@@ -138,7 +143,7 @@ class Directory
 			@files[pos, lines-2].each_with_index do |fn, ix|
 				ix += pos
 				sz = fn.basename.size + fn.infostring.size + 2
-				@width = sz if @width < sz
+				@width = sz + 3 if @width < sz
 			end
 #			@width = @files[pos,lines-2].map{|x| File.basename(x).size}.max
 		end