diff options
-rw-r--r-- | code/directory.rb | 7 |
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 |