jeromejj / vim

Automatically exported from code.google.com/p/vim
0 stars 0 forks source link

Patch to fix url construction for scp protocol #259

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
netrw breaks remote url by throwing away '@' symbol. Steps to reproduce:

1. Open some file on remote host

    vim scp://user@server//home/user/file.txt

2. Go to parent directory

    :edit %:h/<CR>

3. Open the same (or any other) file

    <CR>

Expected output: opening 'scp://user@server//home/user/file.txt' for the second 
time,
Actual output: netrw tries to open 'scp://userserver//home/user/file.txt' and 
cannot found it.

Version: VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Sep  1 2014 19:36:32) on 
Debian Jessie.

Patch attached.

Original issue reported on code.google.com by JIght...@gmail.com on 16 Sep 2014 at 6:49

Attachments:

GoogleCodeExporter commented 9 years ago
Have you tried netrw v153r?  I don't see the stated misbehavior given your 
instructions with it.
(http://www.drchip.org/astronaut/vim/index.html#NETRW)

Original comment by drc...@campbellfamily.biz on 16 Sep 2014 at 2:30

GoogleCodeExporter commented 9 years ago
Yep, v153r works for me. It is also more correct because it checks for s:user 
before adding '@' symbol.
Will it appear in mainline vim? Or how can I be keep up-to-date with netrw?

Original comment by JIght...@gmail.com on 19 Sep 2014 at 3:05

GoogleCodeExporter commented 9 years ago
v153 will eventually make it onto the main vim distribution.  Netrw is part of 
vim's runtime distribution; you need Mercurial to get vim's latest runtime and, 
in particular, to get the latest distributed netrw.  My development copies of 
netrw are at my website.

Original comment by drc...@campbellfamily.biz on 19 Sep 2014 at 4:26