# 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 850 "lib/Term/ReadLine/Zoid/ViCommand.pm (autosplit into blib/lib/auto/Term/ReadLine/Zoid/ViCommand/vi_mini_buffer.al)"
sub vi_mini_buffer { 
	my ($self, $key) = @_;

	$self->switch_mode('insert');
	my $save = $self->save();
	@$self{qw/_vi_mini_b prompt lines pos/} = (1, $key, [''], [0,0]);
	$self->loop();
	my $str = join "\n", @{$$self{lines}};
	@$self{qw/_vi_mini_b _loop/} = (undef, 1);
	$self->restore($save);
	$self->switch_mode('command', 'no_left');

	my $cmd = $key;
	if ($key eq ':') {
		$str =~ s/^([!\/?])|^\s*(\S+)(\s+|$)// or return $self->bell;
		$cmd = $1 || $2;
	}
	$cmd = exists($vi_commands{$cmd}) ? $vi_commands{$cmd} : $cmd;
	#print STDERR "mini buffer got cmd, string: $cmd, $str\n";
	return $self->bell unless $self->can($cmd);
	return $self->$cmd($str);
}

# end of Term::ReadLine::Zoid::ViCommand::vi_mini_buffer
1;
