Hi Bram,

2017-2-6(Mon) 0:08:18 UTC+9 Bram Moolenaar:
> Hirohito Higashi wrote:
> 
> > How to reproduce:
> > - Symbolic link to ~/.vim
> >   $ mkdir -p ~/sample/.vim/pack/dist/opt/bar/plugin/
> >   $ ln -s ~/sample/.vim/ ~/
> > - Run vanilla Vim and set 'runtimepath'
> >   $ vim -Nu NONE +"set rtp=~/.vim,~/.vim/after"
> > 
> > - Adding package 'bar'
> >   :packadd bar
> > 
> > - Confirm 'rtp'
> >   :echo rtp
> > 
> > Expect value:
> >   runtimepath=~/.vim,~/sample/.vim/pack/dist/opt/bar,~/.vim/after
> > Actual value:
> >   runtimepath=~/.vim,~/.vim/after,~/sample/.vim/pack/dist/opt/bar
> > 
> > '~/sample/.vim/pack/dist/opt/bar' should be added immediately after 
> > '~/.vim'.
> > Because '~/sample/.vim/pack/dist/opt/bar' is included in '~/.vim'.
> > 
> > REMARKS:
> > This phenomenon does not occur if ~/.vim is not a symbolic link.
> > 
> > 
> > Investigation result:
> > in add_pack_plugin(),
> > 3510     char_u  *ffname = fix_fname(fname);
> > ...
> > 3535    insp = p_rtp;
> > 3536    for (;;)
> > 3537    {
> > 3538        if (vim_fnamencmp(insp, ffname, fname_len) == 0)
> > 3539        break;
> > 3540        insp = vim_strchr(insp, ',');
> > 3541        if (insp == NULL)
> > 3542        break;
> > 3543        ++insp;
> > 3544    }
> > 
> > Although fix_fname() returns the path that resolved the symbolic link, each 
> > 'rtp' directory does not do it.
> > 
> > 
> > I wrote a patch contains test.
> > Check it please.
> > 
> > NOTE:
> > This issue was reported by Norio Takagi.
> > https://github.com/vim-jp/issues/issues/1022 (in Japanese)
> 
> Thanks.  This was also near the top of the todo list.
> 
> I'll fix the memory leak.
> 
> I wonder if this could result in duplicate entries, since the check
> whether the directory already is in runtime path does not resolve
> symlinks.  I could not make this happen though.

Thank you for following my code👍
--
Best regards,
Hirohito Higashi (a.k.a. h_east)

-- 
-- 
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