aboutsummaryrefslogtreecommitdiff
path: root/runtime/ftplugin
diff options
context:
space:
mode:
authorNoah Frederick <noah@noahfrederick.com>2016-02-16 17:54:53 -0500
committerNoah Frederick <noah@noahfrederick.com>2016-03-05 09:12:54 -0500
commit9fb9d2929fb9913105efaad8af6b3ecfbeaf52dc (patch)
tree562a07b6f74ec41941f8cc8a64d97d86d486c07e /runtime/ftplugin
parent0e9f7a7b36901842d9cdbe8cd00db47b74ab799b (diff)
downloadrneovim-9fb9d2929fb9913105efaad8af6b3ecfbeaf52dc.tar.gz
rneovim-9fb9d2929fb9913105efaad8af6b3ecfbeaf52dc.tar.bz2
rneovim-9fb9d2929fb9913105efaad8af6b3ecfbeaf52dc.zip
man.vim: fixes to argument handling and parsing
- Define a collection of legal characters when parsing page and section in `s:parse_page_and_section()` instead of relying on 'iskeyword', which is unreliable. - Allow non-numeric section names (e.g., `3c`). - Simplify argument handling in `man#get_page()` to accommodate non-numeric section names. Fixes #4165.
Diffstat (limited to 'runtime/ftplugin')
-rw-r--r--runtime/ftplugin/man.vim4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/ftplugin/man.vim b/runtime/ftplugin/man.vim
index 133a28e626..36cd70f203 100644
--- a/runtime/ftplugin/man.vim
+++ b/runtime/ftplugin/man.vim
@@ -24,11 +24,11 @@ setlocal buftype=nofile noswapfile
setlocal nomodifiable readonly bufhidden=hide nobuflisted tabstop=8
if !exists("g:no_plugin_maps") && !exists("g:no_man_maps")
- nnoremap <silent> <buffer> <C-]> :call man#get_page(v:count)<CR>
+ nnoremap <silent> <buffer> <C-]> :call man#get_page(v:count, expand('<cword>'))<CR>
nnoremap <silent> <buffer> <C-T> :call man#pop_page()<CR>
nnoremap <silent> <nowait><buffer> q <C-W>c
if &keywordprg !=# ':Man'
- nnoremap <silent> <buffer> K :call man#get_page(v:count)<CR>
+ nnoremap <silent> <buffer> K :call man#get_page(v:count, expand('<cword>'))<CR>
endif
endif