diff options
author | hut <hut@lavabit.com> | 2009-06-12 06:43:35 +0200 |
---|---|---|
committer | hut <hut@lavabit.com> | 2009-06-12 06:43:35 +0200 |
commit | 1cd54faf68a8f07ac55bd8bc97940439169fbfae (patch) | |
tree | c3e01bd7f6dcdd6d639d9b57347d31fa2f33c2e0 | |
parent | 117c646d73397630ca078b04b73c64e999d51dda (diff) | |
download | ranger-1cd54faf68a8f07ac55bd8bc97940439169fbfae.tar.gz |
F -> filter
-rw-r--r-- | code/fm/keys.rb | 63 |
1 files changed, 44 insertions, 19 deletions
diff --git a/code/fm/keys.rb b/code/fm/keys.rb index bca4f4cd..c7abea17 100644 --- a/code/fm/keys.rb +++ b/code/fm/keys.rb @@ -208,26 +208,49 @@ module Fm str = $1 if str =~ /^\s?(.*)(<cr>|<esc>)$/ if $2 == '<cr>' - ascend - @buffer = 'F' - else - @buffer.clear - @search_string = $1 + Directory.filter = $1 + @pwd.refresh! end - else - test = hints(str) - if test == 1 - if ascend - @buffer.clear - else - @buffer = 'F' - end - ignore_keys_for 0.5 - elsif test == 0 - @buffer = 'F' - ignore_keys_for 1 - end - end + @buffer.clear +# else +# test = hints(str) +# if test == 1 +# if ascend +# @buffer.clear +# else +# @buffer = 'F' +# end +# ignore_keys_for 0.5 +# elsif test == 0 +# @buffer = 'F' +# ignore_keys_for 1 +# end + end + +# when /^F(.+)$/ +# str = $1 +# if str =~ /^\s?(.*)(<cr>|<esc>)$/ +# if $2 == '<cr>' +# ascend +# @buffer = 'F' +# else +# @buffer.clear +# @search_string = $1 +# end +# else +# test = hints(str) +# if test == 1 +# if ascend +# @buffer.clear +# else +# @buffer = 'F' +# end +# ignore_keys_for 0.5 +# elsif test == 0 +# @buffer = 'F' +# ignore_keys_for 1 +# end +# end when 'A' @buffer = "cw #{currentfile.name}" @@ -565,6 +588,7 @@ module Fm end def self.ascend(wait = false, all=false) + Directory.filter = nil if all and !@marked.empty? closei system(*['mplayer', '-fs', *@marked.map{|x| x.path}]) @@ -581,6 +605,7 @@ module Fm end def self.descend + Directory.filter = nil unless @path.size == 1 enter_dir(@buffer=='H' ? '..' : @path[-2].path) end |