diff options
Diffstat (limited to 'vim-mode')
| -rw-r--r-- | vim-mode/vim_mode.pl | 11 | 
1 files changed, 10 insertions, 1 deletions
| diff --git a/vim-mode/vim_mode.pl b/vim-mode/vim_mode.pl index 906905f..b279790 100644 --- a/vim-mode/vim_mode.pl +++ b/vim-mode/vim_mode.pl @@ -2078,6 +2078,11 @@ sub _parse_mapping_bracket {  sub _parse_mapping_reverse {      my ($string) = @_; +    if (not defined $string) { +        _warn("Unable to reverse-map command: " . join('', @ex_buf)); +        return; +    } +      my $escaped_leader = quotemeta($settings->{map_leader}->{value});      $string =~ s/$escaped_leader/<Leader>/g; @@ -2808,7 +2813,11 @@ sub handle_command_ex {          print "Tab pressed" if DEBUG;          print "Ex buf contains: " . join('', @ex_buf) if DEBUG;          @tab_candidates = _tab_complete(join('', @ex_buf), [keys %$commands_ex]); - +        _debug("Candidates: " . join(", ", @tab_candidates)); +        if (@tab_candidates == 1) { +            @ex_buf = ( split('', $tab_candidates[0]), ' '); +            _set_prompt(':' . join '', @ex_buf); +        }      # Ignore control characters for now.      } elsif ($key > 0 && $key < 32) {          # TODO: use them later, e.g. completion | 
