diff options
| author | Simon Ruderich <simon@ruderich.org> | 2010-10-08 18:12:59 +0000 | 
|---|---|---|
| committer | Simon Ruderich <simon@ruderich.org> | 2010-10-08 18:14:13 +0000 | 
| commit | a1e94e9867c6ddb3f8c9c8900007c91c35ef8030 (patch) | |
| tree | ed8bc0239747f3f4563d3d119dc895fdfb76b498 | |
| parent | vim_mode: :map can map irssi commands. (diff) | |
| download | irssi-scripts-a1e94e9867c6ddb3f8c9c8900007c91c35ef8030.tar.gz irssi-scripts-a1e94e9867c6ddb3f8c9c8900007c91c35ef8030.zip | |
vim_mode: :map supports {rhs} with spaces.
| -rw-r--r-- | vim-mode/vim_mode.pl | 7 | 
1 files 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 <C-L> /clear # map Ctrl-L to irssi command /clear +#     :map <C-G> /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"); | 
