diff options
author | Bram Moolenaar <Bram@vim.org> | 2008-08-09 17:55:22 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2008-08-09 17:55:22 +0000 |
commit | ed39e1d53cc4916c2390aea635cd8419497c1460 (patch) | |
tree | 55d468c93579ad2607d56eade9fd6b685cd00c44 /runtime | |
parent | a6404a4e100ebe2081bd2678166604f402330143 (diff) |
Diffstat (limited to 'runtime')
137 files changed, 336 insertions, 224 deletions
diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim index 8bd597aaf9..1e181d05d1 100644 --- a/runtime/autoload/netrw.vim +++ b/runtime/autoload/netrw.vim @@ -1,7 +1,7 @@ " netrw.vim: Handles file transfer and remote directory listing across " AUTOLOAD SECTION -" Date: Aug 01, 2008 -" Version: 131 +" Date: Aug 08, 2008 +" Version: 132 " Maintainer: Charles E Campbell, Jr <NdrOchip@ScampbellPfamily.AbizM-NOSPAM> " GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim " Copyright: Copyright (C) 1999-2008 Charles E. Campbell, Jr. {{{1 @@ -27,7 +27,7 @@ if !exists("s:NOTE") let s:WARNING = 1 let s:ERROR = 2 endif -let g:loaded_netrw = "v131" +let g:loaded_netrw = "v132" " sanity checks if v:version < 700 @@ -743,7 +743,12 @@ fun! netrw#NetRead(mode,...) call netrw#ErrorMsg(s:ERROR,getline(1),4) let &debug = debugkeep endif - call s:SaveBufVars()|bd!|call s:RestoreBufVars() + call s:SaveBufVars() + bd! + if bufname("%") == "" && line("$") == 1 && getline("$") == "" + q! + endif + call s:RestoreBufVars() let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) let b:netrw_lastfile = choice @@ -3737,6 +3742,9 @@ endfun " Creates a marked file match string " s:netrwmarfilemtch_# -- used with 2match to display marked files " +" Creates a buffer version of islocal +" b:netrw_islocal +" fun! s:NetrwMarkFile(islocal,fname) " call Dfunc("s:NetrwMarkFile(islocal=".a:islocal." fname<".a:fname.">)") let curbufnr= bufnr("%") @@ -3745,15 +3753,16 @@ fun! s:NetrwMarkFile(islocal,fname) " markfile list exists " call Decho("starting s:netrwmarkfilelist_{curbufnr}<".string(s:netrwmarkfilelist_{curbufnr}).">") " call Decho("starting s:netrwmarkfilemtch_{curbufnr}<".s:netrwmarkfilemtch_{curbufnr}.">") + let b:netrw_islocal= a:islocal if index(s:netrwmarkfilelist_{curbufnr},a:fname) == -1 - " append filename to local-directory markfilelist + " append filename to buffer's markfilelist " call Decho("append filename<".a:fname."> to local markfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr}).">") call add(s:netrwmarkfilelist_{curbufnr},a:fname) let s:netrwmarkfilemtch_{curbufnr}= s:netrwmarkfilemtch_{curbufnr}.'\|\<'.escape(a:fname,g:netrw_markfileesc."'".g:netrw_markfileesc."'").'\>' else - " remove filename from local markfilelist + " remove filename from buffer's markfilelist " call Decho("remove filename<".a:fname."> from local markfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr}).">") call filter(s:netrwmarkfilelist_{curbufnr},'v:val != a:fname') if s:netrwmarkfilelist_{curbufnr} == [] @@ -4760,20 +4769,22 @@ fun! netrw#NetrwObtain(islocal,fname,...) endif " call Decho("tgtdir<".tgtdir.">") - if a:islocal - " obtain a file from b:netrw_curdir to getcwd() -" call Decho("obtain a local file from ".b:netrw_curdir." to ".tgtdir + if b:netrw_islocal + " obtain a file from local b:netrw_curdir to (local) tgtdir +" ca |