From 61f3be581251267d6d10969e28771505889b20ba Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Fri, 8 Oct 2010 21:35:37 +0200 Subject: vim_mode: Fix :map with {rhs} with only one char. --- vim-mode/vim_mode.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vim-mode') diff --git a/vim-mode/vim_mode.pl b/vim-mode/vim_mode.pl index feea4c6..5d6dfe1 100644 --- a/vim-mode/vim_mode.pl +++ b/vim-mode/vim_mode.pl @@ -1574,7 +1574,7 @@ sub ex_map { my ($arg_str) = @_; # :map {lhs} {rhs} - if ($arg_str =~ /^map (\S+) (\S.+)$/) { + if ($arg_str =~ /^map (\S+) (\S.*)$/) { my $lhs = _parse_mapping($1); my $rhs = $2; @@ -1683,7 +1683,7 @@ sub ex_source { chomp $line; # :map {lhs} {rhs}, keep in sync with ex_map() - if ($line =~ /^\s*map (\S+) (\S.+)$/) { + if ($line =~ /^\s*map (\S+) (\S.*)$/) { ex_map($line); } else { _warn_ex('source', "command not supported: $line"); -- cgit v1.2.3