From a1e94e9867c6ddb3f8c9c8900007c91c35ef8030 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Fri, 8 Oct 2010 20:12:59 +0200 Subject: vim_mode: :map supports {rhs} with spaces. --- vim-mode/vim_mode.pl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/vim-mode/vim_mode.pl b/vim-mode/vim_mode.pl index fe54173..9ac7e1a 100644 --- a/vim-mode/vim_mode.pl +++ b/vim-mode/vim_mode.pl @@ -85,6 +85,7 @@ # :map gb :bnext # to map gb to call :bnext # :map gB :bprev # :map /clear # map Ctrl-L to irssi command /clear +# :map /window goto 1 # # # The following irssi settings are available: @@ -1559,7 +1560,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; @@ -1671,8 +1672,8 @@ sub ex_source { next if $line =~ /^\s*$/ or $line =~ /^\s*"/; chomp $line; - # :map {lhs} {rhs} - if ($line =~ /^\s*map (\S+) (\S+)$/) { + # :map {lhs} {rhs}, keep in sync with ex_map() + if ($line =~ /^\s*map (\S+) (\S.+)$/) { ex_map($line); } else { _warn_ex('source', "command not supported: $line"); -- cgit v1.2.3