jeromejj / vim

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

Noticed 2 issues with netrw v151 #219

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Noticed 2 netrw issues in the new update of vim with netrw V151.

  1. Got an error E382 when trying to save a remote-editing file.  

     This is caused by 'buftype' being set to 'nofile'.  
     The culprit is in s:NetrwSafeOptions().  (Not sure if this is  
     intentional.)  

  2. Encountering bad hostname error while listing/editing remote  
     file.  

     Concretely, ':tabe scp://jdoe@foobar.com/boringpath/' would  
     get an error saying bad hostname 'jdoefoobar.com'.  

     This is due to netrw stripping the '@' between user and  
     machine.  
     The culprit is in s:RemotePathAnalysis().  

Hacked together a fix for these 2 issues.  
Not able to find bug tracking repo for netrw.  
So, I uploaded the patch to pastebin and leave the link here for those who are  
interested.  

   [netrw patch](http://pastebin.com/eBCcXgWv)

Original issue reported on code.google.com by henrycha...@gmail.com on 20 Apr 2014 at 8:19

Attachments:

GoogleCodeExporter commented 9 years ago
I just encountered this myself. s:NetrwSafeOptions() seems like it's for 
strictly internal use and the comment in front of it mentions functions for 
saving and restoring user settings (though it erroneously calls the saving 
function NetrwSaveOptions() while the right name seems to be 
NetrwOptionSave()). The line that sets bt=nofile inside it was added in 
657ade71d395, but that is also the changeset that commented out the line that 
saves bt inside s:NetrwOptionSave(). Also, line 87 (of 
runtime/autoload/netrw.vim) also sets bt=nofile, but this seems superfluous 
since s:NetrwSafeOptions() is called on the preceding line.

Can anyone comment on this?

Original comment by denis.ka...@gmail.com on 22 May 2014 at 3:59

GoogleCodeExporter commented 9 years ago
Confirming that uncommenting the saving line in NetrwOptionSave() seems to fix 
issue no. 1, as in the supplied patch. I'm not sure if it breaks anything, 
though.

Original comment by denis.ka...@gmail.com on 22 May 2014 at 7:25

Attachments:

GoogleCodeExporter commented 9 years ago
I was facing the same problem, and I also confirm that applying the last sent 
patch resolved my problem.

Original comment by wagnerluis1982@gmail.com on 16 Jun 2014 at 12:09

GoogleCodeExporter commented 9 years ago
I can confirm that the latest version of netrw, from Dr. Chip's site, also
solved these issues:

http://www.drchip.org/astronaut/vim/

Original comment by jax...@gmail.com on 16 Jun 2014 at 12:11

GoogleCodeExporter commented 9 years ago
fixed by the maintainer. netrw plugin will then later be included in Vim with 
an update.

Original comment by chrisbr...@googlemail.com on 2 Oct 2014 at 7:53