From 1cd54faf68a8f07ac55bd8bc97940439169fbfae Mon Sep 17 00:00:00 2001 From: hut Date: Fri, 12 Jun 2009 06:43:35 +0200 Subject: F -> filter --- code/fm/keys.rb | 63 ++++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 44 insertions(+), 19 deletions(-) (limited to 'code') 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?(.*)(|)$/ if $2 == '' - 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?(.*)(|)$/ +# if $2 == '' +# 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 -- cgit 1.4.1-2-gfad0