diff options
author | hut <hut@lavabit.com> | 2009-07-03 17:19:52 +0200 |
---|---|---|
committer | hut <hut@lavabit.com> | 2009-07-03 17:19:52 +0200 |
commit | f8634dd6d2477d1871764982fe8d55f2003ab938 (patch) | |
tree | 5d278f4fd3538a2d990cd78450d0e883d0fbce1d /code/draw.rb | |
parent | 27ebfe639466906a9bdaeb3a8ade280e07921122 (diff) | |
download | ranger-f8634dd6d2477d1871764982fe8d55f2003ab938.tar.gz |
option to show ascii only and replace non-ascii with *
Diffstat (limited to 'code/draw.rb')
-rw-r--r-- | code/draw.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/code/draw.rb b/code/draw.rb index aaca6253..84e0e9b4 100644 --- a/code/draw.rb +++ b/code/draw.rb @@ -102,7 +102,7 @@ module Fm :file end - fn = f.basename + fn = f.displayname fn = "* #{fn}" if f.marked? @@ -229,8 +229,8 @@ module Fm end s1 = "#{Socket.gethostname}:" - s2 = "#{@path.last.path}#{"/" unless @path.size == 1}" - s3 = "#{cf ? cf.basename : ''}" + s2 = "#{@path.last.path.ascii_only_if(Option.ascii_only)}#{"/" unless @path.size == 1}" + s3 = "#{cf ? cf.displayname : ''}" if s0 puti 0, (s1 + s2 + s3).ljust(cols-s0.size) @@ -291,7 +291,7 @@ module Fm puti btm, "#@buffer #{@pwd.file_size.bytes(false)}, #{@pwd.free_space.bytes(false)} free, #{@pwd.size}, #{@pwd.pos+1} ".rjust(cols) more = '' if cf.symlink? - more = "#{cf.readlink}" + more = "#{cf.readlink.ascii_only_if(Option.ascii_only)}" end attr_set(Color.date) |