# NOTE: Derived from lib/Term/ReadLine/Zoid/ViCommand.pm. # Changes made here will be lost when autosplit is run again. # See AutoSplit.pm. package Term::ReadLine::Zoid::ViCommand; #line 528 "lib/Term/ReadLine/Zoid/ViCommand.pm (autosplit into blib/lib/auto/Term/ReadLine/Zoid/ViCommand/vi_F.al)" sub vi_F { my ($self, $key, $cnt, $chr) = @_; unless ($chr) { $chr = $self->_get_chr(); return $self->bell if length $chr > 1; $$self{vi_last_c_move} = [$key, $chr]; } my ($l, $x) = ( $$self{lines}[ $$self{pos}[1] ], $$self{pos}[0] ); if ($key eq 'T' or $key eq 'F') { $l = substr($l, 0, $x); return $self->bell unless $l =~ /.*((?:$chr.*){$cnt})$/; $$self{pos}[0] -= length($1) - (($key eq 'T') ? 1 : 0); return length($1); } else { # ($key eq 't' || $key eq 'f') return $self->bell unless $l =~ /^..{$x}((?:.*?$chr){$cnt})/; $$self{pos}[0] += length($1) - (($key eq 't') ? 1 : 0); return length($1); } } # end of Term::ReadLine::Zoid::ViCommand::vi_F 1;