Open zzs213 opened 3 years ago
This patch works when selected text contains space in visual mode. like "git ls-files"
diff --git a/autoload/manpager.vim b/autoload/manpager.vim index 4490996..d09503a 100644 --- a/autoload/manpager.vim +++ b/autoload/manpager.vim @@ -74,8 +74,9 @@ function! manpager#load(section, page) abort endfunction function! manpager#open(section, page) abort - let name = empty(a:section) ? a:page : printf('%s(%s)', a:page, a:section) - let result = manpager#load(a:section, a:page) + let page = substitute(a:page, '\s\+', '-', 'g') + let name = empty(a:section) ? page : printf('%s(%s)', page, a:section) + let result = manpager#load(a:section, page) if result.status if g:manpager#debug echo join(result.args, ' ')
000.txt
Send me a PR 👍
This patch works when selected text contains space in visual mode. like "git ls-files"
000.txt