diff options
author | Marco Hinz <mh.codebro+github@gmail.com> | 2018-01-22 17:31:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-22 17:31:36 +0100 |
commit | 59ac1703407ef88ed2a1e5ed7032dfb115f5d2ba (patch) | |
tree | e8e0153f31868697ffe35a4a260e8db93b4487e4 | |
parent | b69fa866db5bf97dadcd7132c350056ca0e046e8 (diff) | |
parent | dbcdd29139a88d038834f85d74027dcf01fa1afb (diff) | |
download | rneovim-59ac1703407ef88ed2a1e5ed7032dfb115f5d2ba.tar.gz rneovim-59ac1703407ef88ed2a1e5ed7032dfb115f5d2ba.tar.bz2 rneovim-59ac1703407ef88ed2a1e5ed7032dfb115f5d2ba.zip |
Merge #7893 'man.vim: use correct offset in presence of modifier commands'
-rw-r--r-- | runtime/autoload/man.vim | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/runtime/autoload/man.vim b/runtime/autoload/man.vim index 00ce1c77d7..4d43a4582b 100644 --- a/runtime/autoload/man.vim +++ b/runtime/autoload/man.vim @@ -299,6 +299,12 @@ endfunction " see man#extract_sect_and_name_ref on why tolower(sect) function! man#complete(arg_lead, cmd_line, cursor_pos) abort let args = split(a:cmd_line) + let cmd_offset = index(args, 'Man') + if cmd_offset > 0 + " Prune all arguments up to :Man itself. Otherwise modifier commands like + " :tab, :vertical, etc. would lead to a wrong length. + let args = args[cmd_offset:] + endif let l = len(args) if l > 3 return |