Le mardi 10 octobre 2017 05:51:46 UTC-3, LCD 47 a écrit :
> Per title: if MANPAGER is set to "env MAN_PN=1 vim -M +MANPAGER -",
> running "man Xorg" results in a message "Cannot find a 'xorg'.".
> 
>     The culprit is a "tolower()" in plugin/manpager.vim.  Man page names
> are case-sensitive on most UNIX systems.  The patch below seems to fix
> the problem.
> 
>     /lcd
> 
> 
> diff --git a/runtime/plugin/manpager.vim b/runtime/plugin/manpager.vim
> index be6e30b70..9d30fab2f 100644
> --- a/runtime/plugin/manpager.vim
> +++ b/runtime/plugin/manpager.vim
> @@ -20,7 +20,7 @@ function! s:MANPAGER()
>      let manpage = expand('$MAN_PN')
>    endif
>  
> -  let page_sec = matchlist(tolower(manpage), '^' . pagesec_pattern  . '$')
> +  let page_sec = matchlist(manpage, '^' . pagesec_pattern  . '$')
>  
>    bwipe!


Dear LCD47 and Kazunobu Kuriyama,

the pull request that cherry-picks on your patches submitted here, 

  https://github.com/vim/vim/pull/2296

should resolve the problems about

- man pages not opening on Mac and 
- man pages containing a colon not being recognized.

It also documents that it is preferable NOT to set MAN_PN=1 when man-db 
is used, like on most Linux systems.

LCD47, you also had improvements on the manpage plugin. This is maintained by 
a different author, SungHyun Nam. The manpager.vim plugin only invokes his :Man 
command, where all the hard work is done.

If a shell script, for example in $VIMRUNTIME/macros, to work around the error 
appearing for manpages that contain capital letters on systems that do not set 
MAN_PN, can be made a stable replacement for the current Vim script, then this 
is the correct approach. The manpager.vim plugin is a mere makeshift solution 
to leverage the manpage.vim implementation. 

  Enno

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui