Permalink
Browse files

Merge branch 'vim'

Conflicts:
	src/gui.c
  • Loading branch information...
b4winckler committed Jun 27, 2011
2 parents 30332fd + 961eab7 commit f6c00379450c8c31f43ab7ecea5e801dbd5882ad
Showing with 1,946 additions and 1,060 deletions.
  1. +18 −0 .hgtags
  2. +10 −4 runtime/autoload/getscript.vim
  3. +91 −55 runtime/autoload/netrw.vim
  4. +32 −32 runtime/autoload/tar.vim
  5. +63 −50 runtime/autoload/vimball.vim
  6. +16 −27 runtime/autoload/zip.vim
  7. +1 −1 runtime/doc/autocmd.txt
  8. +23 −11 runtime/doc/change.txt
  9. +41 −29 runtime/doc/eval.txt
  10. +4 −3 runtime/doc/filetype.txt
  11. +11 −10 runtime/doc/if_cscop.txt
  12. +24 −8 runtime/doc/indent.txt
  13. +13 −10 runtime/doc/map.txt
  14. +5 −3 runtime/doc/motion.txt
  15. +12 −16 runtime/doc/options.txt
  16. +8 −7 runtime/doc/os_win32.txt
  17. +3 −2 runtime/doc/pattern.txt
  18. +36 −10 runtime/doc/pi_getscript.txt
  19. +67 −13 runtime/doc/pi_netrw.txt
  20. +11 −7 runtime/doc/pi_tar.txt
  21. +20 −2 runtime/doc/pi_vimball.txt
  22. +10 −5 runtime/doc/pi_zip.txt
  23. +3 −2 runtime/doc/quickref.txt
  24. +3 −1 runtime/doc/spell.txt
  25. +47 −15 runtime/doc/tags
  26. +61 −74 runtime/doc/todo.txt
  27. +2 −2 runtime/doc/usr_41.txt
  28. +1 −3 runtime/doc/various.txt
  29. +4 −1 runtime/filetype.vim
  30. +53 −14 runtime/indent/fortran.vim
  31. +17 −22 runtime/optwin.vim
  32. +1 −1 runtime/plugin/getscriptPlugin.vim
  33. +1 −1 runtime/plugin/netrwPlugin.vim
  34. +1 −1 runtime/plugin/tarPlugin.vim
  35. +52 −47 runtime/plugin/tohtml.vim
  36. +11 −7 runtime/plugin/vimballPlugin.vim
  37. +2 −2 runtime/plugin/zipPlugin.vim
  38. +28 −2 runtime/syntax/2html.vim
  39. +24 −17 runtime/syntax/automake.vim
  40. +6 −4 runtime/syntax/bib.vim
  41. +3 −3 runtime/syntax/debchangelog.vim
  42. +8 −5 runtime/syntax/debcontrol.vim
  43. +3 −3 runtime/syntax/debsources.vim
  44. +3 −3 runtime/syntax/gdmo.vim
  45. +110 −0 runtime/syntax/jovial.vim
  46. +3 −1 runtime/syntax/matlab.vim
  47. +1 −1 runtime/syntax/netrw.vim
  48. +2 −2 runtime/syntax/xquery.vim
  49. +1 −1 src/GvimExt/gvimext.def
  50. +1 −1 src/GvimExt/gvimext_ming.def
  51. +1 −1 src/Make_ming.mak
  52. +17 −2 src/eval.c
  53. +2 −2 src/ex_cmds.h
  54. +8 −2 src/ex_cmds2.c
  55. +58 −35 src/ex_getln.c
  56. +6 −1 src/gui.c
  57. +2 −0 src/gui.h
  58. +1 −1 src/gui_gtk.c
  59. +6 −9 src/gui_gtk_x11.c
  60. +1 −1 src/gui_mac.c
  61. +240 −7 src/if_py_both.h
  62. +9 −228 src/if_python.c
  63. +94 −35 src/if_python3.c
  64. +1 −0 src/normal.c
  65. +12 −6 src/ops.c
  66. +4 −2 src/option.h
  67. +4 −12 src/os_macosx.m
  68. +1 −3 src/os_msdos.c
  69. +154 −154 src/os_mswin.c
  70. +1 −1 src/os_qnx.c
  71. +8 −3 src/regexp.c
  72. +12 −3 src/search.c
  73. +7 −1 src/syntax.c
  74. +5 −1 src/testdir/Make_amiga.mak
  75. +2 −1 src/testdir/Make_dos.mak
  76. +2 −1 src/testdir/Make_ming.mak
  77. +2 −1 src/testdir/Make_os2.mak
  78. +2 −2 src/testdir/Make_vms.mms
  79. +2 −1 src/testdir/Makefile
  80. BIN src/testdir/test79.in
  81. BIN src/testdir/test79.ok
  82. +150 −0 src/testdir/test80.in
  83. +101 −0 src/testdir/test80.ok
  84. +18 −0 src/testdir/test81.in
  85. +4 −0 src/testdir/test81.ok
  86. +2 −3 src/ui.c
  87. +36 −0 src/version.c
View
18 .hgtags
@@ -1554,3 +1554,21 @@ eb6c704607025d89a0a5d3fd2769a694ac47e0af v7-3-216
15705b520c298738588a9a3b8d724c6d86d4cb8c v7-3-217
cf89a1d3a0ddd21fe6b734fd72346468b808836f v7-3-218
acda456c788ae1b0b45b8c67a93edcccde594819 v7-3-219
+fe9c7da98b5e2f92e4212e948e98f2d44bf06320 v7-3-220
+fd4224d9ee09801ed1ad9341a72c4683e291bb76 v7-3-221
+c3b4b1c89d8ed62a2624bf9404fc79f60223bd81 v7-3-222
+4e21fd3cfc3084db66f65aef132cb6c5e076cb96 v7-3-223
+69e0783ed0ef40f72ebeba41f8c98c9992f368c7 v7-3-224
+c249d9aa60f759286f54781829c1e3da8680c4a7 v7-3-225
+8477b2cc2b81603408b3fb1a84cd65afb2aadc65 v7-3-226
+b65a26a2aa095c739e90edb7b980154476529d35 v7-3-227
+c6df8554b39d009ed146baa48c0cfb351aa8379a v7-3-228
+07647a0545c9f0fad4e1e84062e0572a07d94659 v7-3-229
+70c8f54e7efbd7b59bbe6764d0fbfa1f1602273f v7-3-230
+455a4c85d04d04c732367f915d82c5b3c9a65b50 v7-3-231
+b67d3a44262a97e7b3ae212fcffb36926b5f53f4 v7-3-232
+69b90e43b728ec28939b0a536de32f818b7ee756 v7-3-233
+7653420fdc454be197d59e420a1672909fac7b82 v7-3-234
+441d364773dc53264b5f26042f8fc6f8b77c8044 v7-3-235
+c1733ef5b6e87dde521d0d85a1e5e62259854ac1 v7-3-236
+e3bb93df6c34da672244bce5695c1426da139614 v7-3-237
@@ -1,8 +1,8 @@
" ---------------------------------------------------------------------
" getscript.vim
" Author: Charles E. Campbell, Jr.
-" Date: Dec 28, 2009
-" Version: 32
+" Date: May 31, 2011
+" Version: 33
" Installing: :help glvs-install
" Usage: :help glvs
"
@@ -15,7 +15,7 @@
if exists("g:loaded_getscript")
finish
endif
-let g:loaded_getscript= "v32"
+let g:loaded_getscript= "v33"
if &cp
echoerr "GetLatestVimScripts is not vi-compatible; not loaded (you need to set nocp)"
finish
@@ -519,14 +519,15 @@ fun! s:GetOneScript(...)
" --------------------------------------------------------------------------
" AutoInstall: only if doautoinstall has been requested by the plugin itself
" --------------------------------------------------------------------------
+" call Decho("checking if plugin requested autoinstall: doautoinstall=".doautoinstall)
if doautoinstall
" call Decho(" ")
" call Decho("Autoinstall: getcwd<".getcwd()."> filereadable(".sname.")=".filereadable(sname))
if filereadable(sname)
" call Decho("<".sname."> is readable")
" call Decho("exe silent !".g:GetLatestVimScripts_mv." ".shellescape(sname)." ".shellescape(s:autoinstall))
exe "silent !".g:GetLatestVimScripts_mv." ".shellescape(sname)." ".shellescape(s:autoinstall)
- let curdir = escape(substitute(getcwd(),'\','/','ge'),"|[]*'\" #")
+ let curdir = fnameescape(substitute(getcwd(),'\','/','ge'))
let installdir= curdir."/Installed"
if !isdirectory(installdir)
call mkdir(installdir)
@@ -557,6 +558,11 @@ fun! s:GetOneScript(...)
exe "silent !gunzip ".shellescape(sname)
let sname= substitute(sname,'\.gz$','','')
" call Decho("decompress: new sname<".sname."> after gunzip")
+ elseif sname =~ '\.xz$'
+" call Decho("decompress: attempt to unxz ".sname)
+ exe "silent !unxz ".shellescape(sname)
+ let sname= substitute(sname,'\.xz$','','')
+" call Decho("decompress: new sname<".sname."> after unxz")
else
" call Decho("no decompression needed")
endif
View
@@ -1,7 +1,7 @@
" netrw.vim: Handles file transfer and remote directory listing across
" AUTOLOAD SECTION
-" Date: Apr 01, 2011
-" Version: 141
+" Date: May 31, 2011
+" Version: 142
" Maintainer: Charles E Campbell, Jr <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
" Copyright: Copyright (C) 1999-2010 Charles E. Campbell, Jr. {{{1
@@ -22,7 +22,7 @@
if &cp || exists("g:loaded_netrw")
finish
endif
-let g:loaded_netrw = "v141"
+let g:loaded_netrw = "v142"
if v:version < 702
echohl WarningMsg
echo "***warning*** this version of netrw needs vim 7.2"
@@ -291,7 +291,7 @@ call s:NetrwInit("g:netrw_timefmt","%c")
call s:NetrwInit("g:netrw_xstrlen",0)
call s:NetrwInit("g:NetrwTopLvlMenu","Netrw.")
call s:NetrwInit("g:netrw_win95ftp",1)
-call s:NetrwInit("g:netrw_winsize",25)
+call s:NetrwInit("g:netrw_winsize",50)
" ---------------------------------------------------------------------
" Default values for netrw's script variables: {{{2
call s:NetrwInit("g:netrw_fname_escape",' ?&;%')
@@ -1518,6 +1518,14 @@ endfun
fun! s:NetrwMethod(choice)
" call Dfunc("NetrwMethod(a:choice<".a:choice.">)")
+ " sanity check: choice should have at least three slashes in it
+ if strlen(substitute(a:choice,'[^/]','','g')) < 3
+ call netrw#ErrorMsg(s:ERROR,"not a netrw-style url; netrw uses protocol://[user@]hostname[:port]/[path])",78)
+ let b:netrw_method = -1
+" call Dret("NetrwMethod : incorrect url format<".a:choice.">")
+ return
+ endif
+
" record current g:netrw_machine, if any
" curmachine used if protocol == ftp and no .netrc
if exists("g:netrw_machine")
@@ -1813,6 +1821,25 @@ endfun
" s:NetrwMaps: {{{2
fun! s:NetrwMaps(islocal)
" call Dfunc("s:NetrwMaps(islocal=".a:islocal.") b:netrw_curdir<".b:netrw_curdir.">")
+
+ " set up Rexplore and [ 2-leftmouse-click -or- c-leftmouse ]
+" call Decho("set up Rexplore command")
+ com! Rexplore call s:NetrwRexplore(w:netrw_rexlocal,exists("w:netrw_rexdir")? w:netrw_rexdir : ".")
+ if g:netrw_mousemaps && g:netrw_retmap
+" call Decho("set up Rexplore 2-leftmouse")
+ if !hasmapto("<Plug>NetrwReturn")
+ if maparg("<2-leftmouse>","n") == "" || maparg("<2-leftmouse>","n") =~ '^-$'
+" call Decho("making map for 2-leftmouse")
+ nmap <unique> <silent> <2-leftmouse> <Plug>NetrwReturn
+ elseif maparg("<c-leftmouse>","n") == ""
+" call Decho("making map for c-leftmouse")
+ nmap <unique> <silent> <c-leftmouse> <Plug>NetrwReturn
+ endif
+ endif
+ nno <silent> <Plug>NetrwReturn :Rexplore<cr>
+" call Decho("made <Plug>NetrwReturn map")
+ endif
+
if a:islocal
" call Decho("make local maps")
inoremap <buffer> <silent> a <c-o>:call <SID>NetrwHide(1)<cr>
@@ -1925,15 +1952,22 @@ fun! s:NetrwMaps(islocal)
endif
let mapsafecurdir = escape(b:netrw_curdir, s:netrw_map_escape)
if g:netrw_mousemaps == 1
- nnoremap <buffer> <silent> <leftmouse> <leftmouse>:call <SID>NetrwLeftmouse(1)<cr>
- nnoremap <buffer> <silent> <middlemouse> <leftmouse>:call <SID>NetrwPrevWinOpen(1)<cr>
- nnoremap <buffer> <silent> <s-leftmouse> <leftmouse>:call <SID>NetrwMarkFile(1,<SID>NetrwGetWord())<cr>
- nmap <buffer> <silent> <2-leftmouse> -
+ nmap <buffer> <leftmouse> <Plug>NetrwLeftmouse
+ nno <buffer> <silent> <Plug>NetrwLeftmouse <leftmouse>:call <SID>NetrwLeftmouse(1)<cr>
+ nmap <buffer> <middlemouse> <Plug>NetrwMiddlemouse
+ nno <buffer> <silent> <Plug>NetrwMiddlemouse <leftmouse>:call <SID>NetrwPrevWinOpen(1)<cr>
+ nmap <buffer> <s-leftmouse> <Plug>NetrwSLeftmouse
+ nno <buffer> <silent> <Plug>NetrwSLeftmouse <leftmouse>:call <SID>NetrwMarkFile(1,<SID>NetrwGetWord())<cr>
+ nmap <buffer> <2-leftmouse> <Plug>Netrw2Leftmouse
+ nmap <buffer> <silent> <Plug>Netrw2Leftmouse -
+ imap <buffer> <leftmouse> <Plug>ILeftmouse
+ ino <buffer> <silent> <Plug>ILeftmouse <c-o><leftmouse><c-o>:call <SID>NetrwLeftmouse(1)<cr>
+ imap <buffer> <middlemouse> <Plug>IMiddlemouse
+ ino <buffer> <silent> <Plug>IMiddlemouse <c-o><leftmouse><c-o>:call <SID>NetrwPrevWinOpen(1)<cr>
+ imap <buffer> <s-leftmouse> <Plug>ISLeftmouse
+ ino <buffer> <silent> <Plug>ISLeftmouse <c-o><leftmouse><c-o>:call <SID>NetrwMarkFile(1,<SID>NetrwGetWord())<cr>
exe 'nnoremap <buffer> <silent> <rightmouse> <leftmouse>:call <SID>NetrwLocalRm("'.mapsafecurdir.'")<cr>'
exe 'vnoremap <buffer> <silent> <rightmouse> <leftmouse>:call <SID>NetrwLocalRm("'.mapsafecurdir.'")<cr>'
- inoremap <buffer> <silent> <leftmouse> <c-o><leftmouse><c-o>:call <SID>NetrwLeftmouse(1)<cr>
- inoremap <buffer> <silent> <middlemouse> <c-o><leftmouse><c-o>:call <SID>NetrwPrevWinOpen(1)<cr>
- inoremap <buffer> <silent> <s-leftmouse> <c-o><leftmouse><c-o>:call <SID>NetrwMarkFile(1,<SID>NetrwGetWord())<cr>
exe 'inoremap <buffer> <silent> <rightmouse> <c-o><leftmouse><c-o>:call <SID>NetrwLocalRm("'.mapsafecurdir.'")<cr>'
endif
exe 'nnoremap <buffer> <silent> <del> :call <SID>NetrwLocalRm("'.mapsafecurdir.'")<cr>'
@@ -2053,17 +2087,24 @@ fun! s:NetrwMaps(islocal)
let mapsafepath = escape(s:path, s:netrw_map_escape)
let mapsafeusermach = escape(s:user.s:machine, s:netrw_map_escape)
- nnoremap <buffer> <silent> <Plug>NetrwRefresh :call <SID>NetrwRefresh(0,<SID>NetrwBrowseChgDir(0,'./'))<cr>
+ nnoremap <buffer> <silent> <Plug>NetrwRefresh :call <SID>NetrwRefresh(0,<SID>NetrwBrowseChgDir(0,'./'))<cr>
if g:netrw_mousemaps == 1
- nnoremap <buffer> <silent> <leftmouse> <leftmouse>:call <SID>NetrwLeftmouse(0)<cr>
- nnoremap <buffer> <silent> <middlemouse> <leftmouse>:call <SID>NetrwPrevWinOpen(0)<cr>
- nnoremap <buffer> <silent> <s-leftmouse> <leftmouse>:call <SID>NetrwMarkFile(0,<SID>NetrwGetWord())<cr>
- nmap <buffer> <silent> <2-leftmouse> -
+ nmap <leftmouse> <Plug>NetrwLeftmouse
+ nno <buffer> <silent> <Plug>NetrwLeftmouse <leftmouse>:call <SID>NetrwLeftmouse(0)<cr>
+ nmap <middlemouse> <Plug>NetrwMiddlemouse
+ nno <buffer> <silent> <middlemouse> <Plug>NetrwMiddlemouse <leftmouse>:call <SID>NetrwPrevWinOpen(0)<cr>
+ nmap <buffer> <s-leftmouse> <Plug>NetrwSLeftmouse
+ nno <buffer> <silent> <Plug>NetrwSLeftmouse <leftmouse>:call <SID>NetrwMarkFile(0,<SID>NetrwGetWord())<cr>
+ nmap <buffer> <2-leftmouse> <Plug>Netrw2Leftmouse
+ nmap <buffer> <silent> <Plug>Netrw2Leftmouse -
+ imap <buffer> <leftmouse> <Plug>ILeftmouse
+ ino <buffer> <silent> <Plug>ILeftmouse <c-o><leftmouse><c-o>:call <SID>NetrwLeftmouse(0)<cr>
+ imap <buffer> <middlemouse> <Plug>IMiddlemouse
+ ino <buffer> <silent> <Plug>IMiddlemouse <c-o><leftmouse><c-o>:call <SID>NetrwPrevWinOpen(0)<cr>
+ imap <buffer> <s-leftmouse> <Plug>ISLeftmouse
+ ino <buffer> <silent> <Plug>ISLeftmouse <c-o><leftmouse><c-o>:call <SID>NetrwMarkFile(0,<SID>NetrwGetWord())<cr>
exe 'nnoremap <buffer> <silent> <rightmouse> <leftmouse>:call <SID>NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")<cr>'
exe 'vnoremap <buffer> <silent> <rightmouse> <leftmouse>:call <SID>NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")<cr>'
- inoremap <buffer> <silent> <leftmouse> <c-o><leftmouse><c-o>:call <SID>NetrwLeftmouse(0)<cr>
- inoremap <buffer> <silent> <middlemouse> <c-o><leftmouse><c-o>:call <SID>NetrwPrevWinOpen(0)<cr>
- inoremap <buffer> <silent> <s-leftmouse> <c-o><leftmouse><c-o>:call <SID>NetrwMarkFile(0,<SID>NetrwGetWord())<cr>
exe 'inoremap <buffer> <silent> <rightmouse> <c-o><leftmouse><c-o>:call <SID>NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")<cr>'
endif
exe 'nnoremap <buffer> <silent> <del> :call <SID>NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")<cr>'
@@ -2081,23 +2122,8 @@ fun! s:NetrwMaps(islocal)
inoremap <buffer> <F1> <c-o>:he netrw-quickhelp<cr>
endif
- " set up Rexplore and leftmouse-double-click
- com! Rexplore call s:NetrwRexplore(w:netrw_rexlocal,exists("w:netrw_rexdir")? w:netrw_rexdir : ".")
- if g:netrw_mousemaps && g:netrw_retmap
- if !hasmapto("<Plug>NetrwReturn")
- if maparg("<2-leftmouse>","n") == "" || maparg("<2-leftmouse>","n") =~ '^-$'
-" call Decho("making map for 2-leftmouse")
- nmap <unique> <silent> <2-leftmouse> <Plug>NetrwReturn
- elseif maparg("<c-leftmouse>","n") == ""
-" call Decho("making map for c-leftmouse")
- nmap <unique> <silent> <c-leftmouse> <Plug>NetrwReturn
- endif
- endif
- exe 'nnoremap <silent> <Plug>NetrwReturn :Rexplore<cr>'
-" call Decho("made <Plug>NetrwReturn map")
- endif
-
keepj call s:SetRexDir(a:islocal,b:netrw_curdir)
+
" call Dret("s:NetrwMaps")
endfun
@@ -3647,34 +3673,40 @@ fun! netrw#Explore(indx,dosplit,style,...)
if a:dosplit || &modified || a:style == 6
" call Decho("case dosplit=".a:dosplit." modified=".&modified." a:style=".a:style.": dosplit or file has been modified")
call s:SaveWinVars()
- let winsize= g:netrw_winsize
+ let winsz= g:netrw_winsize
if a:indx > 0
- let winsize= a:indx
+ let winsz= a:indx
endif
if a:style == 0 " Explore, Sexplore
" call Decho("style=0: Explore or Sexplore")
- exe winsize."wincmd s"
+ let winsz= (winsz*winheight(0))/100
+ exe winsz."wincmd s"
elseif a:style == 1 "Explore!, Sexplore!
" call Decho("style=1: Explore! or Sexplore!")
- exe winsize."wincmd v"
+ let winsz= (winsz*winheight(0))/100
+ exe winsz."wincmd v"
elseif a:style == 2 " Hexplore
" call Decho("style=2: Hexplore")
- exe "bel ".winsize."wincmd s"
+ let winsz= (winsz*winheight(0))/100
+ exe "bel ".winsz."wincmd s"
elseif a:style == 3 " Hexplore!
" call Decho("style=3: Hexplore!")
- exe "abo ".winsize."wincmd s"
+ let winsz= (winsz*winheight(0))/100
+ exe "abo ".winsz."wincmd s"
elseif a:style == 4 " Vexplore
" call Decho("style=4: Vexplore")
- exe "lefta ".winsize."wincmd v"
+ let winsz= (winsz*winheight(0))/100
+ exe "lefta ".winsz."wincmd v"
elseif a:style == 5 " Vexplore!
" call Decho("style=5: Vexplore!")
- exe "rightb ".winsize."wincmd v"
+ let winsz= (winsz*winheight(0))/100
+ exe "rightb ".winsz."wincmd v"
elseif a:style == 6 " Texplore
call s:SaveBufVars()
@@ -4618,13 +4650,13 @@ fun! s:NetrwMarkFileCopy(islocal)
" sanity checks
if !exists("s:netrwmarkfilelist_{bufnr('%')}") || empty(s:netrwmarkfilelist_{bufnr('%')})
- keepj call netrw#ErrorMsg(2,"there are no marked files in this window (:help netrw-mf)",66)
+ keepj call netrw#ErrorMsg(s:ERROR,"there are no marked files in this window (:help netrw-mf)",66)
" call Dret("s:NetrwMarkFileCopy 0")
return 0
endif
" call Decho("sanity chk passed: s:netrwmarkfilelist_".bufnr('%')."<".string(s:netrwmarkfilelist_{bufnr('%')}))
if !exists("s:netrwmftgt")
- keepj call netrw#ErrorMsg(2,"your marked file target is empty! (:help netrw-mt)",67)
+ keepj call netrw#ErrorMsg(s:ERROR,"your marked file target is empty! (:help netrw-mt)",67)
" call Dret("s:NetrwMarkFileCopy 0")
return 0
endif
@@ -6143,7 +6175,8 @@ fun! s:NetrwSplit(mode)
if a:mode == 0
" remote and o
" call Decho("exe ".(g:netrw_alto? "bel " : "abo ").g:netrw_winsize."wincmd s")
- exe (g:netrw_alto? "bel " : "abo ").g:netrw_winsize."wincmd s"
+ let winsz= (g:netrw_winsize*winheight(0))/100
+ exe (g:netrw_alto? "bel " : "abo ").winsz."wincmd s"
let s:didsplit= 1
keepj call s:RestoreWinVars()
keepj call s:NetrwBrowse(0,s:NetrwBrowseChgDir(0,s:NetrwGetWord()))
@@ -6162,7 +6195,8 @@ fun! s:NetrwSplit(mode)
elseif a:mode == 2
" remote and v
" call Decho("exe ".(g:netrw_altv? "rightb " : "lefta ").g:netrw_winsize."wincmd v")
- exe (g:netrw_altv? "rightb " : "lefta ").g:netrw_winsize."wincmd v"
+ let winsz= (g:netrw_winsize*winwidth(0))/100
+ exe (g:netrw_altv? "rightb " : "lefta ").winsz."wincmd v"
let s:didsplit= 1
keepj call s:RestoreWinVars()
keepj call s:NetrwBrowse(0,s:NetrwBrowseChgDir(0,s:NetrwGetWord()))
@@ -6171,7 +6205,8 @@ fun! s:NetrwSplit(mode)
elseif a:mode == 3
" local and o
" call Decho("exe ".(g:netrw_alto? "bel " : "abo ").g:netrw_winsize."wincmd s")
- exe (g:netrw_alto? "bel " : "abo ").g:netrw_winsize."wincmd s"
+ let winsz= (g:netrw_winsize*winheight(0))/100
+ exe (g:netrw_alto? "bel " : "abo ").winsz."wincmd s"
let s:didsplit= 1
keepj call s:RestoreWinVars()
keepj call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(1,s:NetrwGetWord()))
@@ -6192,7 +6227,8 @@ fun! s:NetrwSplit(mode)
elseif a:mode == 5
" local and v
" call Decho("exe ".(g:netrw_altv? "rightb " : "lefta ").g:netrw_winsize."wincmd v")
- exe (g:netrw_altv? "rightb " : "lefta ").g:netrw_winsize."wincmd v"
+ let winsz= (g:netrw_winsize*winwidth(0))/100
+ exe (g:netrw_altv? "rightb " : "lefta ").winsz."wincmd v"
let s:didsplit= 1
keepj call s:RestoreWinVars()
keepj call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(1,s:NetrwGetWord()))
@@ -6826,8 +6862,8 @@ fun! s:NetrwRemoteListing()
" call Decho("2: exe sil r! ".listcmd)
exe "sil! keepalt r! ".listcmd
else
-" call Decho("3: exe sil r! ".listcmd.' '.shellescape(s:path,1))
- exe "sil! keepalt r! ".listcmd.' '.shellescape(s:path,1)
+" call Decho("3: exe sil r! ".listcmd.' '.shellescape(fnameescape(s:path),1))
+ exe "sil! keepalt r! ".listcmd.' '.shellescape(fnameescape(s:path),1)
" call Decho("listcmd<".listcmd."> path<".s:path.">")
endif
endif
@@ -7278,12 +7314,12 @@ fun! s:LocalListing()
" get the list of files contained in the current directory
let dirname = b:netrw_curdir
let dirnamelen = s:Strlen(b:netrw_curdir)
- let filelist = glob(s:ComposePath(dirname,"*"))
+ let filelist = glob(s:ComposePath(fnameescape(dirname),"*"))
" call Decho("glob(dirname<".dirname."/*>)=".filelist)
if filelist != ""
let filelist= filelist."\n"
endif
- let filelist= filelist.glob(s:ComposePath(dirname,".*"))
+ let filelist= filelist.glob(s:ComposePath(fnameescape(dirname),".*"))
" call Decho("glob(dirname<".dirname."/.*>)=".filelist)
" Coding choice: either elide ./ if present
@@ -7797,7 +7833,7 @@ endfun
" 0=note = s:NOTE
" 1=warning = s:WARNING
" 2=error = s:ERROR
-" Dec 03, 2009 : max errnum currently is 77
+" Apr 18, 2011 : max errnum currently is 78
fun! netrw#ErrorMsg(level,msg,errnum)
" call Dfunc("netrw#ErrorMsg(level=".a:level." msg<".a:msg."> errnum=".a:errnum.") g:netrw_use_errorwindow=".g:netrw_use_errorwindow)
@@ -8326,7 +8362,7 @@ endfun
" ---------------------------------------------------------------------
" s:RemotePathAnalysis: {{{2
fun! s:RemotePathAnalysis(dirname)
-" call Dfunc("s:RemotePathAnalysis()")
+" call Dfunc("s:RemotePathAnalysis(a:dirname<".a:dirname.">)")
let dirpat = '^\(\w\{-}\)://\(\w\+@\)\=\([^/:#]\+\)\%([:#]\(\d\+\)\)\=/\(.*\)$'
let s:method = substitute(a:dirname,dirpat,'\1','')
Oops, something went wrong.

0 comments on commit f6c0037

Please sign in to comment.