mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user