Changeset f3587132


Ignore:
Timestamp:
May 31, 2014, 5:49:45 PM (10 years ago)
Author:
William Harrington <kb0iic@…>
Branches:
clfs-3.0.0-sysvinit, sysvinit
Children:
47ce4dc
Parents:
e00ab8d
git-author:
William Harrington <kb0iic@…> (05/31/14 17:49:35)
git-committer:
William Harrington <kb0iic@…> (05/31/14 17:49:45)
Message:

Update vim branch update patch to patch level 316.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • patches/vim-7.4-branch_update-4.patch

    re00ab8d rf3587132  
    11Submitted By: William Harrington (kb0iic at cross-lfs dot org)
    2 Date: 2014-04-26
     2Date: 2014-05-31
    33Initial Package Version: 7.4
    44Origin: Upstream
    55Upstream Status: Applied
    6 Description: Contains all upstream patches up to 7.4.265.
     6Description: Contains all upstream patches up to 7.4.316.
    77
    88diff -Naur vim74.orig/.hg_archival.txt vim74/.hg_archival.txt
    99--- vim74.orig/.hg_archival.txt 1970-01-01 00:00:00.000000000 +0000
    10 +++ vim74/.hg_archival.txt      2014-04-27 05:20:57.181745403 +0000
     10+++ vim74/.hg_archival.txt      2014-06-01 00:42:48.067546692 +0000
    1111@@ -0,0 +1,5 @@
    1212+repo: 770908d1cb47c04be0aef5c173b17ab8be6b6476
    13 +node: 01f2b7e6b33ca4da4fbe2a5b8e9184ea2749d64e
     13+node: bed71c37618c11240596390f277d4f5e60d35ebc
    1414+branch: default
    15 +latesttag: v7-4-265
     15+latesttag: v7-4-316
    1616+latesttagdistance: 1
    1717diff -Naur vim74.orig/.hgignore vim74/.hgignore
    1818--- vim74.orig/.hgignore        1970-01-01 00:00:00.000000000 +0000
    19 +++ vim74/.hgignore     2014-04-27 05:20:57.188412237 +0000
     19+++ vim74/.hgignore     2014-06-01 00:42:48.107546590 +0000
    2020@@ -0,0 +1,74 @@
    2121+syntax: glob
     
    9595diff -Naur vim74.orig/.hgtags vim74/.hgtags
    9696--- vim74.orig/.hgtags  1970-01-01 00:00:00.000000000 +0000
    97 +++ vim74/.hgtags       2014-04-27 05:20:57.195079070 +0000
    98 @@ -0,0 +1,2990 @@
     97+++ vim74/.hgtags       2014-06-01 00:42:48.127546539 +0000
     98@@ -0,0 +1,3041 @@
    9999+004eb98eb3c30714cb6a24ec3e810275080a8413 v7-1-117
    100100+006e9c8a6a8ad354a5cb6adcce6ebfceddeb20ee v7-0079
     
    30873087+00acac0af680c2d8c82db5258474b121a5908926 v7-4-264
    30883088+8ec9d2196bee0c5108f2d2c196a660a7f4e5f29f v7-4-265
     3089+8f84e906d454a95d3167678a745dde9de442b604 v7-4-266
     3090+75f222d67cea335efbe0274de6340dba174c1e7e v7-4-267
     3091+1a5ed2626b26a982e307a206572121a557adf709 v7-4-268
     3092+81c26975e8f9dc7435353581346542409403f296 v7-4-269
     3093+c519c446c5488bfd48c93a03efae4ae3e0c1f162 v7-4-270
     3094+88b0571de4327ba5127a483493bd7d46e6a9850e v7-4-271
     3095+00228400629e28384f7f52556c3c119ba0d0a44d v7-4-272
     3096+747afb6a6de437131d9674e6b2bcc73d74863a89 v7-4-273
     3097+1ee3fc5b40ae94c2a7fc5a62bca38d4f730f9bb2 v7-4-274
     3098+8a3117a4887c1e12a1165c9719491f96753787d6 v7-4-275
     3099+a6b59ee633a355095e6473ec5e2a7d9088bfb853 v7-4-276
     3100+373204662d82e894b27ee76bc3319bc62c91f6ae v7-4-277
     3101+b4ce0e1fb5a67d7d6b0bca8eaa3edc2e94a085d8 v7-4-278
     3102+8e9db1f27a0063df023cc05a760fce73255dad24 v7-4-279
     3103+daf7e98675cf395e1ef96f8040567affb2782a11 v7-4-280
     3104+24c90f1fec859b54cf2b854b98c4c9e614c46061 v7-4-281
     3105+6d0a1132dd71c7f55f7ed53fe99e97c79bfd05a4 v7-4-282
     3106+aa99d04fa7e288a8580e3a5d4a9d6433a1572b48 v7-4-283
     3107+3c35ca9666e88a8024af6dab585b8e79ab295f83 v7-4-284
     3108+5cb1828fd0056de3c166e71fbafc67a74c57d7b1 v7-4-285
     3109+be19015ef43cc17825929206790696c2e716035d v7-4-286
     3110+66fe4908b649ba18426af6f69e8ccb01b487dcbd v7-4-287
     3111+7965cb6a435ae1ea331c7c2f8740d3d4c3625f3b v7-4-288
     3112+99374096a76b96d1128f5e6aa1fa92b4ba70fee9 v7-4-289
     3113+b871734bf54ea185dbd2cc759d86dbfbe21cde26 v7-4-290
     3114+b5972833add9de714f4651e26fd9ea63ec4a880c v7-4-291
     3115+60cdaa05a6ad31cef55eb6b3dc1f57ecac6fcf79 v7-4-292
     3116+10fc95f48546f438648b8357062e93c9c2c0a377 v7-4-293
     3117+fdea5ea9afd139ea59dee6bdb3f1675b8b882bdf v7-4-294
     3118+662ae48e7e246a63d38c9f3165b15b62252edaee v7-4-295
     3119+53b87d790574b6d19034fb3390987c22fb928c58 v7-4-296
     3120+81f5a056b2a582c8109da10cc538dc16a326a34d v7-4-297
     3121+156f891d520e93eab5d3ce02784660fb13a3b0d3 v7-4-298
     3122+daebf8ce66089c0c179fb436ceba359ef8d593d5 v7-4-299
     3123+1157079ca5f167bcf8746dfc52ea5a85e6c87a30 v7-4-300
     3124+8cb42aa3c4957a543e5dffe307475dbab969612f v7-4-301
     3125+df141c80ea3a1ffcbf82d05c1314675231fcfa75 v7-4-302
     3126+463ef551e9f62b63ac3f85f1f297b668b14bcd09 v7-4-303
     3127+fed2e0967f8133ba9a44b0701f151c8d88c4896a v7-4-304
     3128+63e7cc62402dffb180b40c04c63ceeb5f53957d7 v7-4-305
     3129+05e1d8afcc5e375bf708ccc9810e2fd1a5a8a3cf v7-4-306
     3130+06c10522d321d98874546b2a4d3b0ae145386f2e v7-4-307
     3131+e3d2b8d83bb30c428a051f50791e454fcbc080af v7-4-308
     3132+88a6e9f33822d33b6c32db578750c6c178c63f50 v7-4-309
     3133+ccac0aa34eeaf46dad4b831461a532fc3fe71096 v7-4-310
     3134+f6f7543043246107075f0d3739c471d51b7226da v7-4-311
     3135+66eead134d6800fd4cf2d5d4b135d300c933f09a v7-4-312
     3136+332a5c2b2956d9b18d85268a724d01deea27ec83 v7-4-313
     3137+4d7af1962d6ce61df65fdc5c86544a61951f9517 v7-4-314
     3138+646616b6ff4defcc7bef0b198b540f6d965a8126 v7-4-315
     3139+0fc665889e8f0af532cb4e3be2f0ff0421bf2fbc v7-4-316
    30893140diff -Naur vim74.orig/Filelist vim74/Filelist
    30903141--- vim74.orig/Filelist 2013-07-13 13:23:38.000000000 +0000
    3091 +++ vim74/Filelist      2014-04-27 05:20:57.198412485 +0000
    3092 @@ -80,10 +80,14 @@
     3142+++ vim74/Filelist      2014-06-01 00:42:48.197546361 +0000
     3143@@ -3,6 +3,7 @@
     3144 
     3145 # source files for all source archives
     3146 SRC_ALL =      \
     3147+               .hgignore \
     3148                src/README.txt \
     3149                src/arabic.c \
     3150                src/arabic.h \
     3151@@ -80,10 +81,15 @@
    30933152                src/main.aap \
    30943153                src/testdir/main.aap \
     
    31023161                src/testdir/test83-tags? \
    31033162+               src/testdir/test77a.com \
     3163+               src/testdir/test_*.vim \
    31043164                src/testdir/python2/*.py \
    31053165                src/testdir/python3/*.py \
     
    31073167diff -Naur vim74.orig/runtime/autoload/clojurecomplete.vim vim74/runtime/autoload/clojurecomplete.vim
    31083168--- vim74.orig/runtime/autoload/clojurecomplete.vim     2013-02-06 14:35:23.000000000 +0000
    3109 +++ vim74/runtime/autoload/clojurecomplete.vim  2014-04-27 05:20:57.231746647 +0000
     3169+++ vim74/runtime/autoload/clojurecomplete.vim  2014-06-01 00:42:49.274210286 +0000
    31103170@@ -1,20 +1,22 @@
    31113171 " Vim completion script
     
    31483208diff -Naur vim74.orig/runtime/autoload/getscript.vim vim74/runtime/autoload/getscript.vim
    31493209--- vim74.orig/runtime/autoload/getscript.vim   2013-04-17 13:40:44.000000000 +0000
    3150 +++ vim74/runtime/autoload/getscript.vim        2014-04-27 05:20:57.235080063 +0000
     3210+++ vim74/runtime/autoload/getscript.vim        2014-06-01 00:42:49.320876834 +0000
    31513211@@ -1,8 +1,8 @@
    31523212 " ---------------------------------------------------------------------
     
    31823242diff -Naur vim74.orig/runtime/autoload/netrw.vim vim74/runtime/autoload/netrw.vim
    31833243--- vim74.orig/runtime/autoload/netrw.vim       2013-05-19 03:28:33.000000000 +0000
    3184 +++ vim74/runtime/autoload/netrw.vim    2014-04-27 05:20:57.241746894 +0000
     3244+++ vim74/runtime/autoload/netrw.vim    2014-06-01 00:42:49.417543255 +0000
    31853245@@ -1,10 +1,10 @@
    31863246 " netrw.vim: Handles file transfer and remote directory listing across
     
    31883248-" Date:                May 18, 2013
    31893249-" Version:     149
    3190 +" Date:                Mar 20, 2014
    3191 +" Version:     151
     3250+" Date:                May 13, 2014
     3251+" Version:     152
    31923252 " Maintainer:  Charles E Campbell <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
    31933253 " GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
     
    31973257 "               with or without modifications, provided that this copyright
    31983258 "               notice is copied with it. Like anything else that's free,
    3199 @@ -22,13 +22,7 @@
     3259@@ -22,13 +22,14 @@
    32003260 if &cp || exists("g:loaded_netrw")
    32013261   finish
     
    32063266- echo "***warning*** this version of netrw needs vim 7.3.465 or later"
    32073267- echohl Normal
    3208 - finish
    3209 -endif
    3210 +let g:loaded_netrw = "v151"
     3268+if v:version < 704 || !has("patch213")
     3269+ if !exists("s:needpatch213")
     3270+  echo "***sorry*** this version of netrw requires vim v7.4 with patch 213"
     3271+ endif
     3272+ let s:needpatch213= 1
     3273  finish
     3274 endif
     3275+let g:loaded_netrw = "v152"
    32113276 if !exists("s:NOTE")
    32123277  let s:NOTE    = 0
    32133278  let s:WARNING = 1
    3214 @@ -36,8 +30,9 @@
     3279@@ -36,8 +37,9 @@
    32153280 endif
    32163281 
     
    32243289 
    32253290 " ======================
    3226 @@ -49,7 +44,7 @@
     3291@@ -49,7 +51,7 @@
    32273292 "   0=note     = s:NOTE
    32283293 "   1=warning  = s:WARNING
    32293294 "   2=error    = s:ERROR
    32303295-"  May 01, 2013 : max errnum currently is 93
    3231 +"  Mar 04, 2014 : max errnum currently is 96
     3296+"  Apr 16, 2014 : max errnum currently is 97
    32323297 fun! netrw#ErrorMsg(level,msg,errnum)
    32333298 "  call Dfunc("netrw#ErrorMsg(level=".a:level." msg<".a:msg."> errnum=".a:errnum.") g:netrw_use_errorwindow=".g:netrw_use_errorwindow)
    32343299 
    3235 @@ -104,7 +99,7 @@
     3300@@ -104,8 +106,8 @@
    32363301     hi link netrwMesgWarning WarningMsg
    32373302     hi link netrwMesgError   Error
    32383303    endif
    32393304-"   call Decho("(ErrorMsg) setl noma ro bh=wipe")
     3305-   setl noma ro bh=wipe
    32403306+"   call Decho("setl noma ro bh=wipe")
    3241     setl noma ro bh=wipe
     3307+   setl ro nomod noma bh=wipe
    32423308 
    32433309   else
    3244 @@ -200,6 +195,7 @@
     3310    " (optional) netrw will show messages using echomsg.  Even if the
     3311@@ -200,6 +202,7 @@
    32453312   let g:netrw_http_cmd = ""
    32463313  endif
     
    32503317 call s:NetrwInit("g:netrw_rsync_cmd", "rsync")
    32513318 if !exists("g:netrw_scp_cmd")
    3252 @@ -260,6 +256,7 @@
     3319@@ -249,7 +252,7 @@
     3320 call s:NetrwInit("g:netrw_altv"        , &spr)
     3321 call s:NetrwInit("g:netrw_banner"      , 1)
     3322 call s:NetrwInit("g:netrw_browse_split", 0)
     3323-call s:NetrwInit("g:netrw_bufsettings" , "noma nomod nonu nobl nowrap ro")
     3324+call s:NetrwInit("g:netrw_bufsettings" , "noma nomod nonu nobl nowrap ro nornu")
     3325 call s:NetrwInit("g:netrw_chgwin"      , -1)
     3326 call s:NetrwInit("g:netrw_compress"    , "gzip")
     3327 call s:NetrwInit("g:netrw_ctags"       , "ctags")
     3328@@ -260,6 +263,7 @@
    32533329 call s:NetrwInit("g:netrw_cursor"      , 2)
    32543330 let s:netrw_usercul = &cursorline
     
    32583334 call s:NetrwInit("s:didstarstar",0)
    32593335 call s:NetrwInit("g:netrw_dirhist_cnt"      , 0)
    3260 @@ -291,23 +288,19 @@
     3336@@ -291,23 +295,19 @@
    32613337 endif
    32623338 call s:NetrwInit("g:netrw_keepdir",1)
     
    32833359 call s:NetrwInit("g:netrw_list_hide","")
    32843360 " Default values - lh-lz ---------- {{{3
    3285 @@ -387,8 +380,17 @@
     3361@@ -323,7 +323,7 @@
     3362   if g:netrw_cygwin
     3363    let g:netrw_localcopycmd= "cp"
     3364   else
     3365-   let g:netrw_localcopycmd= "cmd /c copy"
     3366+   let g:netrw_localcopycmd= expand("$COMSPEC")." /c copy"
     3367   endif
     3368  elseif has("unix") || has("macunix")
     3369   let g:netrw_localcopycmd= "cp"
     3370@@ -335,7 +335,15 @@
     3371  let g:netrw_localmkdir= g:netrw_local_mkdir
     3372  call netrw#ErrorMsg(s:NOTE,"g:netrw_local_mkdir is deprecated in favor of g:netrw_localmkdir",87)
     3373 endif
     3374-call s:NetrwInit("g:netrw_localmkdir","mkdir")
     3375+if has("win32") || has("win95") || has("win64") || has("win16")
     3376+  if g:netrw_cygwin
     3377+   call s:NetrwInit("g:netrw_localmkdir","mkdir")
     3378+  else
     3379+   let g:netrw_localmkdir= expand("$COMSPEC")." /c mkdir"
     3380+  endif
     3381+else
     3382+ call s:NetrwInit("g:netrw_localmkdir","mkdir")
     3383+endif
     3384 call s:NetrwInit("g:netrw_remote_mkdir","mkdir")
     3385 if exists("g:netrw_local_movecmd")
     3386  let g:netrw_localmovecmd= g:netrw_local_movecmd
     3387@@ -346,7 +354,7 @@
     3388   if g:netrw_cygwin
     3389    let g:netrw_localmovecmd= "mv"
     3390   else
     3391-   let g:netrw_localmovecmd= "cmd /c move"
     3392+   let g:netrw_localmovecmd= expand("$COMSPEC")." /c move"
     3393   endif
     3394  elseif has("unix") || has("macunix")
     3395   let g:netrw_localmovecmd= "mv"
     3396@@ -354,11 +362,19 @@
     3397   let g:netrw_localmovecmd= ""
     3398  endif
     3399 endif
     3400-call s:NetrwInit("g:netrw_localrmdir", "rmdir")
     3401 if exists("g:netrw_local_rmdir")
     3402  let g:netrw_localrmdir= g:netrw_local_rmdir
     3403  call netrw#ErrorMsg(s:NOTE,"g:netrw_local_rmdir is deprecated in favor of g:netrw_localrmdir",86)
     3404 endif
     3405+if has("win32") || has("win95") || has("win64") || has("win16")
     3406+  if g:netrw_cygwin
     3407+   call s:NetrwInit("g:netrw_localrmdir","rmdir")
     3408+  else
     3409+   let g:netrw_localrmdir= expand("$COMSPEC")." /c rmdir"
     3410+  endif
     3411+else
     3412+ call s:NetrwInit("g:netrw_localrmdir","rmdir")
     3413+endif
     3414 call s:NetrwInit("g:netrw_liststyle"  , s:THINLIST)
     3415 " sanity checks
     3416 if g:netrw_liststyle < 0 || g:netrw_liststyle >= s:MAXLIST
     3417@@ -387,8 +403,17 @@
    32863418 call s:NetrwInit("g:netrw_rename_cmd"    , g:netrw_ssh_cmd." USEPORT HOSTNAME mv")
    32873419 call s:NetrwInit("g:netrw_rm_cmd"        , g:netrw_ssh_cmd." USEPORT HOSTNAME rm")
     
    33033435 call s:NetrwInit("g:netrw_sepchr"        , (&enc == "euc-jp")? "\<Char-0x01>" : "\<Char-0xff>")
    33043436 call s:NetrwInit("s:netrw_silentxfer"    , (exists("g:netrw_silent") && g:netrw_silent != 0)? "sil keepj " : "keepj ")
    3305 @@ -404,7 +406,7 @@
     3437@@ -404,7 +429,7 @@
    33063438 endif
    33073439 call s:NetrwInit("g:netrw_special_syntax"   , 0)
     
    33123444 call s:NetrwInit("g:netrw_timefmt","%c")
    33133445 if !exists("g:netrw_xstrlen")
    3314 @@ -434,6 +436,11 @@
     3446@@ -421,7 +446,6 @@
     3447 call s:NetrwInit("g:NetrwTopLvlMenu","Netrw.")
     3448 call s:NetrwInit("g:netrw_win95ftp",1)
     3449 call s:NetrwInit("g:netrw_winsize",50)
     3450-if g:netrw_winsize ==  0|let g:netrw_winsize=  -1|endif
     3451 if g:netrw_winsize > 100|let g:netrw_winsize= 100|endif
     3452 " ---------------------------------------------------------------------
     3453 " Default values for netrw's script variables: {{{2
     3454@@ -434,6 +458,11 @@
    33153455 call s:NetrwInit("g:netrw_menu_escape",'.&? \')
    33163456 call s:NetrwInit("g:netrw_tmpfile_escape",' &;')
     
    33243464 " BufEnter event ignored by decho when following variable is true
    33253465 "  Has a side effect that doau BufReadPost doesn't work, so
    3326 @@ -444,11 +451,18 @@
     3466@@ -444,11 +473,18 @@
    33273467 "  Netrw Initialization: {{{1
    33283468 " ======================
     
    33483488 au WinEnter *  if &ft == "netrw"|call s:NetrwInsureWinVars()|endif
    33493489 
    3350 @@ -457,276 +471,43 @@
     3490@@ -457,276 +493,43 @@
    33513491 " ==============================
    33523492 
     
    36593799 "          indx:  == -1: Nexplore
    36603800 "                 == -2: Pexplore
    3661 @@ -737,7 +518,7 @@
     3801@@ -737,7 +540,7 @@
    36623802 "                      * If Hexplore or Vexplore, then this will override
    36633803 "                        g:netrw_winsize to specify the qty of rows or columns the
     
    36683808 "          style == 0: Explore     style == 1: Explore!
    36693809 "                == 2: Hexplore    style == 3: Hexplore!
    3670 @@ -747,26 +528,52 @@
     3810@@ -747,26 +550,52 @@
    36713811 "  call Dfunc("netrw#Explore(indx=".a:indx." dosplit=".a:dosplit." style=".a:style.",a:1<".a:1.">) &modified=".&modified." modifiable=".&modifiable." a:0=".a:0." win#".winnr()." buf#".bufnr("%"))
    36723812   if !exists("b:netrw_curdir")
     
    37313871    let winsz= g:netrw_winsize
    37323872    if a:indx > 0
    3733 @@ -774,106 +581,106 @@
     3873@@ -774,106 +603,119 @@
    37343874    endif
    37353875 
     
    37383878+"    call Decho("style=0: Explore or Sexplore")
    37393879     let winsz= (winsz > 0)? (winsz*winheight(0))/100 : -winsz
    3740      exe winsz."wincmd s"
     3880-    exe winsz."wincmd s"
     3881+    if winsz == 0|let winsz= ""|endif
     3882+    exe "noswapfile ".winsz."wincmd s"
     3883+"    call Decho("exe noswapfile ".winsz."wincmd s")
    37413884 
    37423885    elseif a:style == 1  "Explore!, Sexplore!
     
    37443887+"    call Decho("style=1: Explore! or Sexplore!")
    37453888     let winsz= (winsz > 0)? (winsz*winwidth(0))/100 : -winsz
    3746      exe "keepalt ".winsz."wincmd v"
     3889-    exe "keepalt ".winsz."wincmd v"
     3890+    if winsz == 0|let winsz= ""|endif
     3891+    exe "keepalt noswapfile ".winsz."wincmd v"
     3892+"    call Decho("exe keepalt noswapfile ".winsz."wincmd v")
    37473893 
    37483894    elseif a:style == 2  " Hexplore
     
    37503896+"    call Decho("style=2: Hexplore")
    37513897     let winsz= (winsz > 0)? (winsz*winheight(0))/100 : -winsz
    3752      exe "keepalt bel ".winsz."wincmd s"
     3898-    exe "keepalt bel ".winsz."wincmd s"
     3899+    if winsz == 0|let winsz= ""|endif
     3900+    exe "keepalt noswapfile bel ".winsz."wincmd s"
     3901+"    call Decho("exe keepalt noswapfile bel ".winsz."wincmd s")
    37533902 
    37543903    elseif a:style == 3  " Hexplore!
     
    37563905+"    call Decho("style=3: Hexplore!")
    37573906     let winsz= (winsz > 0)? (winsz*winheight(0))/100 : -winsz
    3758      exe "keepalt abo ".winsz."wincmd s"
     3907-    exe "keepalt abo ".winsz."wincmd s"
     3908+    if winsz == 0|let winsz= ""|endif
     3909+    exe "keepalt noswapfile abo ".winsz."wincmd s"
     3910+"    call Decho("exe keepalt noswapfile abo ".winsz."wincmd s")
    37593911 
    37603912    elseif a:style == 4  " Vexplore
     
    37623914+"    call Decho("style=4: Vexplore")
    37633915     let winsz= (winsz > 0)? (winsz*winwidth(0))/100 : -winsz
    3764      exe "keepalt lefta ".winsz."wincmd v"
     3916-    exe "keepalt lefta ".winsz."wincmd v"
     3917+    if winsz == 0|let winsz= ""|endif
     3918+    exe "keepalt noswapfile lefta ".winsz."wincmd v"
     3919+"    call Decho("exe keepalt noswapfile lefta ".winsz."wincmd v")
    37653920 
    37663921    elseif a:style == 5  " Vexplore!
     
    37683923+"    call Decho("style=5: Vexplore!")
    37693924     let winsz= (winsz > 0)? (winsz*winwidth(0))/100 : -winsz
    3770      exe "keepalt rightb ".winsz."wincmd v"
     3925-    exe "keepalt rightb ".winsz."wincmd v"
     3926+    if winsz == 0|let winsz= ""|endif
     3927+    exe "keepalt noswapfile rightb ".winsz."wincmd v"
     3928+"    call Decho("exe keepalt noswapfile rightb ".winsz."wincmd v")
    37713929 
    37723930    elseif a:style == 6  " Texplore
     
    37753933+"    call Decho("style  = 6: Texplore")
    37763934     exe "keepalt tabnew ".fnameescape(curdir)
     3935+"    call Decho("exe keepalt tabnew ".fnameescape(curdir))
    37773936     call s:RestoreBufVars()
    37783937    endif
     
    38644023    if prefixdir =~ '^/' || (prefixdir =~ '^\a:/' && (has("win32") || has("win95") || has("win64") || has("win16")))
    38654024     let b:netrw_curdir = prefixdir
    3866 @@ -882,30 +689,30 @@
     4025@@ -882,30 +724,30 @@
    38674026    endif
    38684027    let dirname= substitute(dirname,'^.\{-}\(\*\*/.*\)$','\1','')
     
    39024061    if dirname =~ '^scp://' || dirname =~ '^ftp://'
    39034062     call netrw#Nread(2,dirname)
    3904 @@ -914,15 +721,17 @@
     4063@@ -914,15 +756,17 @@
    39054064     if dirname == ""
    39064065      let dirname= getcwd()
     
    39234082    if exists("w:netrw_bannercnt")
    39244083     " done to handle P08-Ingelrest. :Explore will _Always_ go to the line just after the banner.
    3925 @@ -930,7 +739,7 @@
     4084@@ -930,7 +774,7 @@
    39264085     exe w:netrw_bannercnt
    39274086    endif
     
    39324091    " Jan 24, 2013: not sure why the following was present.  See P08-Ingelrest
    39334092 "   if has("win32") || has("win95") || has("win64") || has("win16")
    3934 @@ -946,30 +755,32 @@
     4093@@ -946,30 +790,32 @@
    39354094   " starpat=4: Explore **/filepat  (recursive descent search for filenames matching filepat)
    39364095   elseif a:indx <= 0
     
    39724131 "      call Dret("netrw#Explore")
    39734132       return
    3974 @@ -978,21 +789,23 @@
     4133@@ -978,21 +824,23 @@
    39754134      if indx < 0                        | let indx= 0                           | endif
    39764135      if indx >= w:netrw_explore_listlen | let indx= w:netrw_explore_listlen - 1 | endif
     
    40024161 "      call Dret("netrw#Explore")
    40034162       return
    4004 @@ -1001,30 +814,30 @@
     4163@@ -1001,30 +849,30 @@
    40054164      if indx < 0                        | let indx= 0                           | endif
    40064165      if indx >= w:netrw_explore_listlen | let indx= w:netrw_explore_listlen - 1 | endif
     
    40404199        exe "keepj noautocmd vimgrep /".pattern."/gj ".fnameescape(b:netrw_curdir)."/*"
    40414200       catch /^Vim\%((\a\+)\)\=:E480/
    4042 @@ -1037,15 +850,17 @@
     4201@@ -1037,15 +885,17 @@
    40434202 
    40444203      elseif starpat == 2
     
    40624221 "       call Dret("netrw#Explore : no files matched pattern")
    40634222        return
    4064 @@ -1057,29 +872,31 @@
     4223@@ -1057,53 +907,55 @@
    40654224 
    40664225      elseif starpat == 3
     
    40954254-      sil! let @* = keepregstar
    40964255-      sil! let @+ = keepregstar
     4256-      sil! let @/ = keepregslash
     4257-"      call Dret("netrw#Explore : no files matched")
    40974258+      if has("clipboard")
    40984259+       sil! let @* = keepregstar
    40994260+       sil! let @+ = keepregstar
    41004261+      endif
    4101        sil! let @/ = keepregslash
    4102  "      call Dret("netrw#Explore : no files matched")
     4262+      sil! let @/ = keepregslash
     4263+"      call Dret("netrw#Explore : no files matched")
    41034264       return
    4104 @@ -1088,22 +905,22 @@
     4265      endif
     4266     endif  " if indx ... endif
    41054267 
    41064268     " NetrwStatusLine support - for exploring support
     
    41304292     if !exists("w:netrw_liststyle")
    41314293      let w:netrw_liststyle= g:netrw_liststyle
    4132 @@ -1117,22 +934,24 @@
     4294@@ -1117,22 +969,24 @@
    41334295     let w:netrw_explore_bufnr   = bufnr("%")
    41344296     let w:netrw_explore_line    = line(".")
     
    41604322     sil! unlet w:netrw_treedict
    41614323     sil! unlet w:netrw_treetop
    4162 @@ -1146,22 +965,22 @@
     4324@@ -1146,22 +1000,22 @@
    41634325   endif
    41644326 
     
    41904352       if s:explore_match == ""
    41914353        let s:explore_match= '\<'.escape(strpart(fname,dirlen),g:netrw_markfileesc).'\>'
    4192 @@ -1177,7 +996,7 @@
     4354@@ -1177,7 +1031,7 @@
    41934355      endif
    41944356      let prvfname= fname
     
    41994361    endif
    42004362    echo "<s-up>==Pexplore  <s-down>==Nexplore"
    4201 @@ -1186,47 +1005,76 @@
     4363@@ -1186,47 +1040,76 @@
    42024364    if exists("s:explore_match")  | unlet s:explore_match  | endif
    42034365    if exists("s:explore_prvdir") | unlet s:explore_prvdir | endif
     
    43014463   if a:sys
    43024464    let choice= confirm("Remove personal and system copies of netrw?","&Yes\n&No")
    4303 @@ -1264,28 +1112,44 @@
     4465@@ -1264,28 +1147,44 @@
    43044466   endif
    43054467    echohl None
     
    43594521 
    43604522   if type(a:fname) == 1
    4361 @@ -1294,7 +1158,7 @@
     4523@@ -1294,7 +1193,7 @@
    43624524    let fnamelist= a:fname
    43634525   else
     
    43684530   endif
    43694531 "  call Decho("fnamelist<".string(fnamelist).">")
    4370 @@ -1472,7 +1336,7 @@
     4532@@ -1471,8 +1370,29 @@
     4533       keepj call netrw#ErrorMsg(s:ERROR,getline(1),5)
    43714534      endif
    43724535     endif
     4536+
     4537+   elseif b:netrw_method == 9
     4538+    " obtain file using sftp
     4539+"    call Decho("obtain via sftp (method #9)")
     4540+    if a:fname =~ '/'
     4541+     let localfile= substitute(a:fname,'^.*/','','')
     4542+    else
     4543+     let localfile= a:fname
     4544+    endif
     4545+"    call Decho("exe ".s:netrw_silentxfer."!".g:netrw_sftp_cmd." ".shellescape(g:netrw_machine.":".b:netrw_fname,1).shellescape(localfile)." ".shellescape(tgtdir))
     4546+    exe s:netrw_silentxfer."!".g:netrw_sftp_cmd." ".shellescape(g:netrw_machine.":".b:netrw_fname,1).shellescape(localfile)." ".shellescape(tgtdir)
     4547+
    43734548    elseif !exists("b:netrw_method") || b:netrw_method < 0
    43744549-"    call Dfunc("netrw#NetrwObtain : unsupported method")
    4375 +"    call Dfunc("netrw#Obtain : unsupported method")
     4550+    " probably a badly formed url; protocol not recognized
     4551+"    call Dret("netrw#Obtain : unsupported method")
     4552+    return
     4553+
     4554+   else
     4555+    " protocol recognized but not supported for Obtain (yet?)
     4556+    if !exists("g:netrw_quiet")
     4557+     keepj call netrw#ErrorMsg(s:ERROR,"current protocol not supported for obtaining file",97)
     4558+    endif
     4559+"    call Dret("netrw#Obtain : current protocol not supported for obtaining file")
    43764560     return
    43774561    endif
    43784562 
    4379 @@ -1492,553 +1356,407 @@
     4563@@ -1492,107 +1412,387 @@
    43804564    endif
    43814565   endif
     
    44474631-  call s:NetrwSafeOptions()
    44484632-  call s:RestoreCursorline()
    4449 -
    4450 -  " NetRead: interpret mode into a readcmd {{{3
    4451 -  if     a:mode == 0 " read remote file before current line
    4452 -   let readcmd = "0r"
    4453 -  elseif a:mode == 1 " read file after current line
    4454 -   let readcmd = "r"
    4455 -  elseif a:mode == 2 " replace with remote file
    4456 -   let readcmd = "%r"
    4457 -  elseif a:mode == 3 " skip read of file (leave as temporary)
    4458 -   let readcmd = "t"
    4459 -  else
    4460 -   exe a:mode
    4461 -   let readcmd = "r"
    4462 -  endif
    4463 -  let ichoice = (a:0 == 0)? 0 : 1
    4464 -"  call Decho("readcmd<".readcmd."> ichoice=".ichoice)
    4465 -
    4466 -  " NetRead: get temporary filename {{{3
    4467 -  let tmpfile= s:GetTempfile("")
    4468 -  if tmpfile == ""
    4469 -"   call Dret("netrw#NetRead : unable to get a tempfile!")
    44704633+" s:NetrwOptionRestore: restore options (based on prior s:NetrwOptionSave) {{{2
    44714634+fun! s:NetrwOptionRestore(vt)
     
    44854648+"   call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
    44864649+"   call Dret("s:NetrwOptionRestore : ".a:vt."netrw_optionsave doesn't exist")
    4487     return
    4488    endif
     4650+   return
     4651+  endif
    44894652+  unlet {a:vt}netrw_optionsave
    44904653 
    4491 -  while ichoice <= a:0
    4492 -
    4493 -   " attempt to repeat with previous host-file-etc
    4494 -   if exists("b:netrw_lastfile") && a:0 == 0
    4495 -"    call Decho("using b:netrw_lastfile<" . b:netrw_lastfile . ">")
    4496 -    let choice = b:netrw_lastfile
    4497 -    let ichoice= ichoice + 1
    4498 -
    4499 -   else
    4500 -    exe "let choice= a:" . ichoice
    4501 -"    call Decho("no lastfile: choice<" . choice . ">")
    4502 -
    4503 -    if match(choice,"?") == 0
    4504 -     " give help
    4505 -     echomsg 'NetRead Usage:'
    4506 -     echomsg ':Nread machine:path                         uses rcp'
    4507 -     echomsg ':Nread "machine path"                       uses ftp   with <.netrc>'
    4508 -     echomsg ':Nread "machine id password path"           uses ftp'
    4509 -     echomsg ':Nread dav://machine[:port]/path            uses cadaver'
    4510 -     echomsg ':Nread fetch://machine/path                 uses fetch'
    4511 -     echomsg ':Nread ftp://[user@]machine[:port]/path     uses ftp   autodetects <.netrc>'
    4512 -     echomsg ':Nread http://[user@]machine/path           uses http  wget'
    4513 -     echomsg ':Nread rcp://[user@]machine/path            uses rcp'
    4514 -     echomsg ':Nread rsync://machine[:port]/path          uses rsync'
    4515 -     echomsg ':Nread scp://[user@]machine[[:#]port]/path  uses scp'
    4516 -     echomsg ':Nread sftp://[user@]machine[[:#]port]/path uses sftp'
    4517 -     sleep 4
    4518 -     break
    4519 -
    4520 -    elseif match(choice,'^"') != -1
    4521 -     " Reconstruct Choice if choice starts with '"'
    4522 -"     call Decho("reconstructing choice")
    4523 -     if match(choice,'"$') != -1
    4524 -      " case "..."
    4525 -      let choice= strpart(choice,1,strlen(choice)-2)
    4526 -     else
    4527 -       "  case "... ... ..."
    4528 -      let choice      = strpart(choice,1,strlen(choice)-1)
    4529 -      let wholechoice = ""
    4530 -
    4531 -      while match(choice,'"$') == -1
    4532 -       let wholechoice = wholechoice . " " . choice
    4533 -       let ichoice     = ichoice + 1
    4534 -       if ichoice > a:0
    4535 -               if !exists("g:netrw_quiet")
    4536 -        call netrw#ErrorMsg(s:ERROR,"Unbalanced string in filename '". wholechoice ."'",3)
    4537 -       endif
    4538 -"        call Dret("netrw#NetRead :2 getcwd<".getcwd().">")
    4539 -        return
    4540 -       endif
    4541 -       let choice= a:{ichoice}
    4542 -      endwhile
    4543 -      let choice= strpart(wholechoice,1,strlen(wholechoice)-1) . " " . strpart(choice,0,strlen(choice)-1)
    4544 -     endif
     4654-  " NetRead: interpret mode into a readcmd {{{3
     4655-  if     a:mode == 0 " read remote file before current line
     4656-   let readcmd = "0r"
     4657-  elseif a:mode == 1 " read file after current line
     4658-   let readcmd = "r"
     4659-  elseif a:mode == 2 " replace with remote file
     4660-   let readcmd = "%r"
     4661-  elseif a:mode == 3 " skip read of file (leave as temporary)
     4662-   let readcmd = "t"
    45454663+  if exists("+acd")
    45464664+   if exists("{a:vt}netrw_acdkeep")
     
    45514669+    if &l:acd
    45524670+     call s:NetrwLcd(curdir)
    4553      endif
    4554     endif
    4555 -
    4556 -"   call Decho("choice<" . choice . ">")
    4557 -   let ichoice= ichoice + 1
    4558 -
    4559 -   " NetRead: Determine method of read (ftp, rcp, etc) {{{3
    4560 -   call s:NetrwMethod(choice)
    4561 -   if !exists("b:netrw_method") || b:netrw_method < 0
    4562 -"    call Dfunc("netrw#NetRead : unsupported method")
    4563 -    return
     4671+    endif
     4672+   endif
    45644673+  endif
    45654674+  if exists("{a:vt}netrw_aikeep")   |let &l:ai     = {a:vt}netrw_aikeep      |unlet {a:vt}netrw_aikeep   |endif
     
    45904699+  if exists("{a:vt}netrw_modkeep")  |let &l:mod    = {a:vt}netrw_modkeep     |unlet {a:vt}netrw_modkeep  |endif
    45914700+  if exists("{a:vt}netrw_nukeep")   |let &l:nu     = {a:vt}netrw_nukeep      |unlet {a:vt}netrw_nukeep   |endif
     4701+  if exists("{a:vt}netrw_rnukeep")  |let &l:rnu    = {a:vt}netrw_rnukeep     |unlet {a:vt}netrw_rnukeep  |endif
    45924702+  if exists("{a:vt}netrw_repkeep")  |let &l:report = {a:vt}netrw_repkeep     |unlet {a:vt}netrw_repkeep  |endif
    45934703+  if exists("{a:vt}netrw_rokeep")   |let &l:ro     = {a:vt}netrw_rokeep      |unlet {a:vt}netrw_rokeep   |endif
     
    46174727+    sil! let &l:swf= {a:vt}netrw_swfkeep
    46184728+    unlet {a:vt}netrw_swfkeep
    4619     endif
    4620 -   let tmpfile= s:GetTempfile(b:netrw_fname) " apply correct suffix
    4621 -
    4622 -   " Check if NetrwBrowse() should be handling this request
    4623 -"   call Decho("checking if NetrwBrowse() should handle choice<".choice."> with netrw_list_cmd<".g:netrw_list_cmd.">")
    4624 -   if choice =~ "^.*[\/]$" && b:netrw_method != 5 && choice !~ '^https\=://'
    4625 -"    call Decho("yes, choice matches '^.*[\/]$'")
    4626 -    keepj call s:NetrwBrowse(0,choice)
    4627 -"    call Dret("netrw#NetRead :3 getcwd<".getcwd().">")
    4628 -    return
     4729+   endif
    46294730+  endif
    46304731+  if exists("{a:vt}netrw_dirkeep") && isdirectory({a:vt}netrw_dirkeep) && g:netrw_keepdir
     
    46454746+   if exists("s:nbcd_curpos_".bufnr('%'))
    46464747+    unlet s:nbcd_curpos_{bufnr('%')}
    4647     endif
    4648 +  else
     4748+   endif
     4749   else
     4750-   exe a:mode
     4751-   let readcmd = "r"
    46494752+"   call Decho("no previous position")
    4650 +  endif
    4651  
    4652 -   " ============
    4653 -   " NetRead: Perform Protocol-Based Read {{{3
    4654 -   " ===========================
    4655 -   if exists("g:netrw_silent") && g:netrw_silent == 0 && &ch >= 1
    4656 -    echo "(netrw) Processing your read request..."
    4657 -   endif
     4753   endif
     4754-  let ichoice = (a:0 == 0)? 0 : 1
     4755-"  call Decho("readcmd<".readcmd."> ichoice=".ichoice)
     4756 
     4757-  " NetRead: get temporary filename {{{3
     4758-  let tmpfile= s:GetTempfile("")
     4759-  if tmpfile == ""
     4760-"   call Dret("netrw#NetRead : unable to get a tempfile!")
     4761-   return
    46584762+"  call Decho("g:netrw_keepdir=".g:netrw_keepdir.": getcwd<".getcwd()."> acd=".&acd)
    46594763+"  call Decho("fo=".&fo.(exists("+acd")? " acd=".&acd : " acd doesn't exist"))
     
    46674771+"   call Decho("filetype detect  (ft=".&ft.")")
    46684772+   filetype detect
    4669 +  endif
     4773   endif
    46704774+"  call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt)
    46714775+"  call Dret("s:NetrwOptionRestore : tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> modified=".&modified." modifiable=".&modifiable." readonly=".&readonly)
    46724776+endfun
    46734777 
    4674 -   ".........................................
    4675 -   " NetRead: (rcp)  NetRead Method #1 {{{3
    4676 -   if  b:netrw_method == 1 " read with rcp
    4677 -"    call Decho("read via rcp (method #1)")
    4678 -   " ER: nothing done with g:netrw_uid yet?
    4679 -   " ER: on Win2K" rcp machine[.user]:file tmpfile
    4680 -   " ER: if machine contains '.' adding .user is required (use $USERNAME)
    4681 -   " ER: the tmpfile is full path: rcp sees C:\... as host C
    4682 -   if s:netrw_has_nt_rcp == 1
    4683 -    if exists("g:netrw_uid") &&        ( g:netrw_uid != "" )
    4684 -     let uid_machine = g:netrw_machine .'.'. g:netrw_uid
    4685 -    else
    4686 -     " Any way needed it machine contains a '.'
    4687 -     let uid_machine = g:netrw_machine .'.'. $USERNAME
    4688 -    endif
    4689 -   else
    4690 -    if exists("g:netrw_uid") &&        ( g:netrw_uid != "" )
    4691 -     let uid_machine = g:netrw_uid .'@'. g:netrw_machine
    4692 -    else
    4693 -     let uid_machine = g:netrw_machine
    4694 -    endif
    4695 -   endif
    4696 -"   call Decho("executing: !".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".shellescape(uid_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1))
    4697 -   exe s:netrw_silentxfer."!".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".shellescape(uid_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1)
    4698 -   let result           = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)
    4699 -   let b:netrw_lastfile = choice
     4778-  while ichoice <= a:0
     4779-
     4780-   " attempt to repeat with previous host-file-etc
     4781-   if exists("b:netrw_lastfile") && a:0 == 0
     4782-"    call Decho("using b:netrw_lastfile<" . b:netrw_lastfile . ">")
     4783-    let choice = b:netrw_lastfile
     4784-    let ichoice= ichoice + 1
    47004785+" ---------------------------------------------------------------------
    47014786+" s:NetrwOptionSave: save options prior to setting to "netrw-buffer-standard" form {{{2
     
    47114796+"  call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt)
    47124797 
    4713 -   ".........................................
    4714 -   " NetRead: (ftp + <.netrc>)  NetRead Method #2 {{{3
    4715 -   elseif b:netrw_method  == 2         " read with ftp + <.netrc>
    4716 -"     call Decho("read via ftp+.netrc (method #2)")
    4717 -     let netrw_fname= b:netrw_fname
    4718 -     keepj call s:SaveBufVars()|new|keepj call s:RestoreBufVars()
    4719 -     let filtbuf= bufnr("%")
    4720 -     setl ff=unix
    4721 -     keepj put =g:netrw_ftpmode
    4722 -"     call Decho("filter input: ".getline(line("$")))
    4723 -     if exists("g:netrw_ftpextracmd")
    4724 -      keepj put =g:netrw_ftpextracmd
    4725 -"      call Decho("filter input: ".getline(line("$")))
    4726 -     endif
    4727 -     call setline(line("$")+1,'get "'.netrw_fname.'" '.tmpfile)
    4728 -"     call Decho("filter input: ".getline(line("$")))
    4729 -     if exists("g:netrw_port") && g:netrw_port != ""
    4730 -"      call Decho("executing: %!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1))
    4731 -      exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1)
    4732 -     else
    4733 -"      call Decho("executing: %!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1))
    4734 -      exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)
    4735 -     endif
    4736 -     " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar)
    4737 -     if getline(1) !~ "^$" && !exists("g:netrw_quiet") && getline(1) !~ '^Trying '
    4738 -      let debugkeep = &debug
    4739 -      setl debug=msg
    4740 -      keepj call netrw#ErrorMsg(s:ERROR,getline(1),4)
    4741 -      let &debug    = debugkeep
    4742 -     endif
    4743 -     call s:SaveBufVars()
    4744 -     bd!
    4745 -     if bufname("%") == "" && getline("$") == "" && line('$') == 1
    4746 -      " needed when one sources a file in a nolbl setting window via ftp
    4747 -      q!
    4748 -     endif
    4749 -     call s:RestoreBufVars()
    4750 -     let result           = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)
    4751 -     let b:netrw_lastfile = choice
     4798-   else
     4799-    exe "let choice= a:" . ichoice
     4800-"    call Decho("no lastfile: choice<" . choice . ">")
    47524801+  if !exists("{a:vt}netrw_optionsave")
    47534802+   let {a:vt}netrw_optionsave= 1
     
    47584807+"  call Decho("prior to save: fo=".&fo.(exists("+acd")? " acd=".&acd : " acd doesn't exist")." diff=".&l:diff)
    47594808 
    4760 -   ".........................................
    4761 -   " NetRead: (ftp + machine,id,passwd,filename)  NetRead Method #3 {{{3
    4762 -   elseif b:netrw_method == 3          " read with ftp + machine, id, passwd, and fname
    4763 -    " Construct execution string (four lines) which will be passed through filter
    4764 -"    call Decho("read via ftp+mipf (method #3)")
    4765 -    let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape)
    4766 -    keepj call s:SaveBufVars()|new|keepj call s:RestoreBufVars()
    4767 -    let filtbuf= bufnr("%")
    4768 -    setl ff=unix
    4769 -    if exists("g:netrw_port") && g:netrw_port != ""
    4770 -     keepj put ='open '.g:netrw_machine.' '.g:netrw_port
    4771 -"     call Decho("filter input: ".getline('.'))
    4772 -    else
    4773 -     keepj put ='open '.g:netrw_machine
    4774 -"     call Decho("filter input: ".getline('.'))
    4775 -    endif
     4809-    if match(choice,"?") == 0
     4810-     " give help
     4811-     echomsg 'NetRead Usage:'
     4812-     echomsg ':Nread machine:path                         uses rcp'
     4813-     echomsg ':Nread "machine path"                       uses ftp   with <.netrc>'
     4814-     echomsg ':Nread "machine id password path"           uses ftp'
     4815-     echomsg ':Nread dav://machine[:port]/path            uses cadaver'
     4816-     echomsg ':Nread fetch://machine/path                 uses fetch'
     4817-     echomsg ':Nread ftp://[user@]machine[:port]/path     uses ftp   autodetects <.netrc>'
     4818-     echomsg ':Nread http://[user@]machine/path           uses http  wget'
     4819-     echomsg ':Nread rcp://[user@]machine/path            uses rcp'
     4820-     echomsg ':Nread rsync://machine[:port]/path          uses rsync'
    47764821+  " Save current settings and current directory
    47774822+"  call Decho("saving current settings and current directory")
     
    47824827+  let {a:vt}netrw_bhkeep    = &l:bh
    47834828+  let {a:vt}netrw_blkeep    = &l:bl
    4784 +"  let {a:vt}netrw_btkeep    = &l:bt
     4829+  let {a:vt}netrw_btkeep    = &l:bt
    47854830+  let {a:vt}netrw_bombkeep  = &l:bomb
    47864831+  let {a:vt}netrw_cedit     = &cedit
     
    47924837+  let {a:vt}netrw_diffkeep  = &l:diff
    47934838+  let {a:vt}netrw_fenkeep   = &l:fen
    4794 +  let {a:vt}netrw_ffkeep    = &l:ff
     4839+  if !exists("g:netrw_ffkeep") || g:netrw_ffkeep == 1
     4840+   let {a:vt}netrw_ffkeep    = &l:ff
     4841+  endif
    47954842+  let {a:vt}netrw_fokeep    = &l:fo           " formatoptions
    47964843+  let {a:vt}netrw_gdkeep    = &l:gd           " gdefault
     
    48034850+  let {a:vt}netrw_modkeep   = &l:mod
    48044851+  let {a:vt}netrw_nukeep    = &l:nu
     4852+  let {a:vt}netrw_rnukeep   = &l:rnu
    48054853+  let {a:vt}netrw_repkeep   = &l:report
    48064854+  let {a:vt}netrw_rokeep    = &l:ro
     
    48184866+  let {a:vt}netrw_wrapkeep  = &l:wrap
    48194867+  let {a:vt}netrw_writekeep = &l:write
    4820  
    4821 -    if exists("g:netrw_uid") && g:netrw_uid != ""
    4822 -     if exists("g:netrw_ftp") && g:netrw_ftp == 1
    4823 -      keepj put =g:netrw_uid
    4824 -"       call Decho("filter input: ".getline('.'))
    4825 -      if exists("s:netrw_passwd")
    4826 -       keepj put ='\"'.s:netrw_passwd.'\"'
    4827 -      endif
    4828 -"      call Decho("filter input: ".getline('.'))
    4829 -     elseif exists("s:netrw_passwd")
    4830 -      keepj put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"'
    4831 -"      call Decho("filter input: ".getline('.'))
    4832 -     endif
    4833 -    endif
     4868+
    48344869+  " save a few selected netrw-related variables
    48354870+"  call Decho("saving a few selected netrw-related variables")
     
    48414876+  endif
    48424877+  sil! let {a:vt}netrw_regslash= @/
    4843  
    4844 -    if exists("g:netrw_ftpmode") && g:netrw_ftpmode != ""
    4845 -     keepj put =g:netrw_ftpmode
    4846 -"     call Decho("filter input: ".getline('.'))
    4847 -    endif
    4848 -    if exists("g:netrw_ftpextracmd")
    4849 -     keepj put =g:netrw_ftpextracmd
    4850 -"     call Decho("filter input: ".getline('.'))
    4851 -    endif
    4852 -    keepj put ='get \"'.netrw_fname.'\" '.tmpfile
    4853 -"    call Decho("filter input: ".getline('.'))
     4878+
    48544879+"  call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt)
    48554880+"  call Dret("s:NetrwOptionSave : tab#".tabpagenr()." win#".winnr())
    48564881+endfun
    4857  
    4858 -    " perform ftp:
    4859 -    " -i       : turns off interactive prompting from ftp
    4860 -    " -n  unix : DON'T use <.netrc>, even though it exists
    4861 -    " -n  win32: quit being obnoxious about password
    4862 -    keepj norm! 1Gdd
    4863 -"    call Decho("executing: %!".s:netrw_ftp_cmd." ".g:netrw_ftp_options)
    4864 -    exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." ".g:netrw_ftp_options
    4865 -    " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar)
    4866 -    if getline(1) !~ "^$"
    4867 -"     call Decho("error<".getline(1).">")
    4868 -     if !exists("g:netrw_quiet")
    4869 -      call netrw#ErrorMsg(s:ERROR,getline(1),5)
    4870 -     endif
    4871 -    endif
    4872 -    call s:SaveBufVars()|bd!|call s:RestoreBufVars()
    4873 -    let result           = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)
    4874 -    let b:netrw_lastfile = choice
     4882+
    48754883+" ------------------------------------------------------------------------
    48764884+" s:NetrwSafeOptions: sets options to help netrw do its job {{{2
     
    49114919+  setl cedit&
    49124920+  call s:NetrwCursor()
    4913  
    4914 -   ".........................................
    4915 -   " NetRead: (scp) NetRead Method #4 {{{3
    4916 -   elseif     b:netrw_method  == 4     " read with scp
    4917 -"    call Decho("read via scp (method #4)")
    4918 -    if exists("g:netrw_port") && g:netrw_port != ""
    4919 -     let useport= " ".g:netrw_scpport." ".g:netrw_port
    4920 -    else
    4921 -     let useport= ""
    4922 -    endif
    4923 -"    call Decho("exe ".s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1))
    4924 -    exe s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1)
    4925 -    let result           = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)
    4926 -    let b:netrw_lastfile = choice
     4921+
    49274922+  " allow the user to override safe options
    49284923+"  call Decho("ft<".&ft."> ei=".&ei)
     
    49314926+   sil! keepalt keepj doau FileType netrw
    49324927+  endif
    4933  
    4934 -   ".........................................
    4935 -   " NetRead: (http) NetRead Method #5 (wget) {{{3
    4936 -   elseif     b:netrw_method  == 5
    4937 -"    call Decho("read via http (method #5)")
    4938 -    if g:netrw_http_cmd == ""
    4939 -     if !exists("g:netrw_quiet")
    4940 -      call netrw#ErrorMsg(s:ERROR,"neither the wget nor the fetch command is available",6)
    4941 -     endif
    4942 -"     call Dret("netrw#NetRead :4 getcwd<".getcwd().">")
    4943 -     return
    4944 -    endif
    4945 -
    4946 -    if match(b:netrw_fname,"#") == -1 || exists("g:netrw_http_xcmd")
    4947 -     " using g:netrw_http_cmd (usually elinks, links, curl, wget, or fetch)
    4948 -"     call Decho('using '.g:netrw_http_cmd.' (# not in b:netrw_fname<'.b:netrw_fname.">)")
    4949 -     if exists("g:netrw_http_xcmd")
    4950 -"      call Decho("exe ".s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape("http://".g:netrw_machine.b:netrw_fname,1)." ".g:netrw_http_xcmd." ".shellescape(tmpfile,1))
    4951 -      exe s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape("http://".g:netrw_machine.b:netrw_fname,1)." ".g:netrw_http_xcmd." ".shellescape(tmpfile,1)
    4952 -     else
    4953 -"      call Decho("exe ".s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile,1)." ".shellescape("http://".g:netrw_machine.b:netrw_fname,1))
    4954 -      exe s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile,1)." ".shellescape("http://".g:netrw_machine.b:netrw_fname,1)
    4955 -     endif
    4956 -     let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)
    4957 -
    4958 -    else
    4959 -     " wget/curl/fetch plus a jump to an in-page marker (ie. http://abc/def.html#aMarker)
    4960 -"     call Decho("wget/curl plus jump (# in b:netrw_fname<".b:netrw_fname.">)")
    4961 -     let netrw_html= substitute(b:netrw_fname,"#.*$","","")
    4962 -     let netrw_tag = substitute(b:netrw_fname,"^.*#","","")
    4963 -"     call Decho("netrw_html<".netrw_html.">")
    4964 -"     call Decho("netrw_tag <".netrw_tag.">")
    4965 -"     call Decho("exe ".s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile,1)." ".shellescape("http://".g:netrw_machine.netrw_html,1))
    4966 -     exe s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile,1)." ".shellescape("http://".g:netrw_machine.netrw_html,1)
    4967 -     let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)
    4968 -"     call Decho('<\s*a\s*name=\s*"'.netrw_tag.'"/')
    4969 -     exe 'keepj norm! 1G/<\s*a\s*name=\s*"'.netrw_tag.'"/'."\<CR>"
    4970 -    endif
    4971 -    let b:netrw_lastfile = choice
    4972 -"    call Decho("(NetRead) setl ro")
    4973 -    setl ro
    4974 -
    4975 -   ".........................................
    4976 -   " NetRead: (dav) NetRead Method #6 {{{3
    4977 -   elseif     b:netrw_method  == 6
    4978 -"    call Decho("read via cadaver (method #6)")
    4979 -
    4980 -    if !executable(g:netrw_dav_cmd)
    4981 -     call netrw#ErrorMsg(s:ERROR,g:netrw_dav_cmd." is not executable",73)
    4982 -"     call Dret("netrw#NetRead : ".g:netrw_dav_cmd." not executable")
    4983 -     return
    4984 -    endif
    4985 -    if g:netrw_dav_cmd =~ "curl"
    4986 -"     call Decho("exe ".s:netrw_silentxfer."!".g:netrw_dav_cmd." ".shellescape("dav://".g:netrw_machine.b:netrw_fname,1)." ".shellescape(tmpfile,1))
    4987 -     exe s:netrw_silentxfer."!".g:netrw_dav_cmd." ".shellescape("dav://".g:netrw_machine.b:netrw_fname,1)." ".shellescape(tmpfile,1)
    4988 -    else
    4989 -     " Construct execution string (four lines) which will be passed through filter
    4990 -     let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape)
    4991 -     new
    4992 -     setl ff=unix
    4993 -     if exists("g:netrw_port") && g:netrw_port != ""
    4994 -      keepj put ='open '.g:netrw_machine.' '.g:netrw_port
    4995 -     else
    4996 -      keepj put ='open '.g:netrw_machine
    4997 -     endif
    4998 -     if exists("g:netrw_uid") && exists("s:netrw_passwd") && g:netrw_uid != ""
    4999 -      keepj put ='user '.g:netrw_uid.' '.s:netrw_passwd
    5000 -     endif
    5001 -     keepj put ='get '.netrw_fname.' '.tmpfile
    5002 -     keepj put ='quit'
    5003 -
    5004 -     " perform cadaver operation:
    5005 -     keepj norm! 1Gdd
    5006 -"    call Decho("executing: %!".g:netrw_dav_cmd)
    5007 -     exe s:netrw_silentxfer."%!".g:netrw_dav_cmd
    5008 -     bd!
    5009 -    endif
    5010 -    let result           = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)
    5011 -    let b:netrw_lastfile = choice
    5012 -
    5013 -   ".........................................
    5014 -   " NetRead: (rsync) NetRead Method #7 {{{3
    5015 -   elseif     b:netrw_method  == 7
    5016 -"    call Decho("read via rsync (method #7)")
    5017 -"    call Decho("exe ".s:netrw_silentxfer."!".g:netrw_rsync_cmd." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1))
    5018 -    exe s:netrw_silentxfer."!".g:netrw_rsync_cmd." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1)
    5019 -    let result          = s:NetrwGetFile(readcmd,tmpfile, b:netrw_method)
    5020 -    let b:netrw_lastfile = choice
    5021 -
    5022 -   ".........................................
    5023 -   " NetRead: (fetch) NetRead Method #8 {{{3
    5024 -   "    fetch://[user@]host[:http]/path
    5025 -   elseif     b:netrw_method  == 8
    5026 -"    call Decho("read via fetch (method #8)")
    5027 -    if g:netrw_fetch_cmd == ""
    5028 -     if !exists("g:netrw_quiet")
    5029 -      keepj call netrw#ErrorMsg(s:ERROR,"fetch command not available",7)
    5030 -     endif
    5031 -"     call Dret("NetRead")
    5032 -     return
    5033 -    endif
    5034 -    if exists("g:netrw_option") && g:netrw_option == ":https\="
    5035 -     let netrw_option= "http"
    5036 -    else
    5037 -     let netrw_option= "ftp"
    5038 -    endif
    5039 -"    call Decho("read via fetch for ".netrw_option)
    5040 -
    5041 -    if exists("g:netrw_uid") && g:netrw_uid != "" && exists("s:netrw_passwd") && s:netrw_passwd != ""
    5042 -"     call Decho("exe ".s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".shellescape(tmpfile,1)." ".shellescape(netrw_option."://".g:netrw_uid.':'.s:netrw_passwd.'@'.g:netrw_machine."/".b:netrw_fname,1))
    5043 -     exe s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".shellescape(tmpfile,1)." ".shellescape(netrw_option."://".g:netrw_uid.':'.s:netrw_passwd.'@'.g:netrw_machine."/".b:netrw_fname,1)
    5044 -    else
    5045 -"     call Decho("exe ".s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".shellescape(tmpfile,1)." ".shellescape(netrw_option."://".g:netrw_machine."/".b:netrw_fname,1))
    5046 -     exe s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".shellescape(tmpfile,1)." ".shellescape(netrw_option."://".g:netrw_machine."/".b:netrw_fname,1)
    5047 -    endif
    5048 -
    5049 -    let result         = s:NetrwGetFile(readcmd,tmpfile, b:netrw_method)
    5050 -    let b:netrw_lastfile = choice
    5051 -"    call Decho("(NetRead) setl ro")
    5052 -    setl ro
     4928+
    50534929+"  call Decho("fo=".&fo.(exists("+acd")? " acd=".&acd : " acd doesn't exist")." bh=".&l:bh)
    50544930+"  call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo)
    50554931+"  call Dret("s:NetrwSafeOptions")
    50564932+endfun
    5057  
    5058 -   ".........................................
    5059 -   " NetRead: (sftp) NetRead Method #9 {{{3
    5060 -   elseif     b:netrw_method  == 9
    5061 -"    call Decho("read via sftp (method #9)")
    5062 -"    call Decho("exe ".s:netrw_silentxfer."!".g:netrw_sftp_cmd." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)." ".tmpfile)
    5063 -    exe s:netrw_silentxfer."!".g:netrw_sftp_cmd." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)." ".tmpfile
    5064 -    let result         = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)
    5065 -    let b:netrw_lastfile = choice
     4933+
    50664934+" ---------------------------------------------------------------------
    50674935+" NetrwStatusLine: {{{2
    50684936+fun! NetrwStatusLine()
    5069  
    5070 -   ".........................................
    5071 -   " NetRead: Complain {{{3
    5072 -   else
    5073 -    call netrw#ErrorMsg(s:WARNING,"unable to comply with your request<" . choice . ">",8)
    5074 -   endif
    5075 -  endwhile
     4937+
    50764938+" vvv NetrwStatusLine() debugging vvv
    50774939+"  let g:stlmsg=""
     
    50904952+"  endif
    50914953+" ^^^ NetrwStatusLine() debugging ^^^
    5092  
    5093 -  " NetRead: cleanup {{{3
    5094 -  if exists("b:netrw_method")
    5095 -"   call Decho("cleanup b:netrw_method and b:netrw_fname")
    5096 -   unlet b:netrw_method
    5097 -   unlet b:netrw_fname
    5098 -  endif
    5099 -  if s:FileReadable(tmpfile) && tmpfile !~ '.tar.bz2$' && tmpfile !~ '.tar.gz$' && tmpfile !~ '.zip' && tmpfile !~ '.tar' && readcmd != 't' && tmpfile !~ '.tar.xz$' && tmpfile !~ '.txz'
    5100 -"   call Decho("cleanup by deleting tmpfile<".tmpfile.">")
    5101 -   keepj call s:NetrwDelete(tmpfile)
     4954+
    51024955+  if !exists("w:netrw_explore_bufnr") || w:netrw_explore_bufnr != bufnr("%") || !exists("w:netrw_explore_line") || w:netrw_explore_line != line(".") || !exists("w:netrw_explore_list")
    51034956+   " restore user's status line
     
    51094962+  else
    51104963+   return "Match ".w:netrw_explore_mtchcnt." of ".w:netrw_explore_listlen
    5111    endif
    5112 -  keepj call s:NetrwOptionRestore("w:")
    5113 -
    5114 -"  call Dret("netrw#NetRead :5 getcwd<".getcwd().">")
    5115  endfun
    5116  
     4964+  endif
     4965+endfun
     4966+
    51174967+" ---------------------------------------------------------------------
    51184968+"  Netrw Transfer Functions: {{{1
    51194969+" ===============================
    51204970+
    5121  " ------------------------------------------------------------------------
    5122 -" netrw#NetWrite: responsible for writing a file over the net {{{2
    5123 -fun! netrw#NetWrite(...) range
    5124 -"  call Dfunc("netrw#NetWrite(a:0=".a:0.") ".g:loaded_netrw)
     4971+" ------------------------------------------------------------------------
    51254972+" netrw#NetRead: responsible for reading a file over the net {{{2
    51264973+"   mode: =0 read remote file and insert before current line
     
    51304977+fun! netrw#NetRead(mode,...)
    51314978+"  call Dfunc("netrw#NetRead(mode=".a:mode.",...) a:0=".a:0." ".g:loaded_netrw.((a:0 > 0)? " a:1<".a:1.">" : ""))
    5132  
    5133 -  " NetWrite: option handling {{{3
    5134 -  let mod= 0
     4979+
    51354980+  " NetRead: save options {{{3
    5136    call s:NetrwOptionSave("w:")
    5137    call s:NetrwSafeOptions()
     4981+  call s:NetrwOptionSave("w:")
     4982+  call s:NetrwSafeOptions()
    51384983+  call s:RestoreCursorline()
    5139  
    5140 -  " NetWrite: Get Temporary Filename {{{3
    5141 -  let tmpfile= s:GetTempfile("")
    5142 -  if tmpfile == ""
    5143 -"   call Dret("netrw#NetWrite : unable to get a tempfile!")
    5144 -   return
    5145 -  endif
    5146 -
    5147 -  if a:0 == 0
    5148 -   let ichoice = 0
    5149 -  else
    5150 -   let ichoice = 1
    5151 -  endif
    5152 -
    5153 -  let curbufname= expand("%")
    5154 -"  call Decho("curbufname<".curbufname.">")
    5155 -  if &binary
    5156 -   " For binary writes, always write entire file.
    5157 -   " (line numbers don't really make sense for that).
    5158 -   " Also supports the writing of tar and zip files.
    5159 -"   call Decho("(write entire file) sil exe w! ".fnameescape(v:cmdarg)." ".fnameescape(tmpfile))
    5160 -   exe "sil keepj w! ".fnameescape(v:cmdarg)." ".fnameescape(tmpfile)
    5161 -  elseif g:netrw_cygwin
    5162 -   " write (selected portion of) file to temporary
    5163 -   let cygtmpfile= substitute(tmpfile,'/cygdrive/\(.\)','\1:','')
    5164 -"   call Decho("(write selected portion) sil exe ".a:firstline."," . a:lastline . "w! ".fnameescape(v:cmdarg)." ".fnameescape(cygtmpfile))
    5165 -   exe "sil keepj ".a:firstline."," . a:lastline . "w! ".fnameescape(v:cmdarg)." ".fnameescape(cygtmpfile)
     4984+
    51664985+  " NetRead: interpret mode into a readcmd {{{3
    51674986+  if     a:mode == 0 " read remote file before current line
     
    51734992+  elseif a:mode == 3 " skip read of file (leave as temporary)
    51744993+   let readcmd = "t"
    5175    else
    5176 -   " write (selected portion of) file to temporary
    5177 -"   call Decho("(write selected portion) sil exe ".a:firstline."," . a:lastline . "w! ".fnameescape(v:cmdarg)." ".fnameescape(tmpfile))
    5178 -   exe "sil keepj ".a:firstline."," . a:lastline . "w! ".fnameescape(v:cmdarg)." ".fnameescape(tmpfile)
     4994+  else
    51794995+   exe a:mode
    51804996+   let readcmd = "r"
    5181    endif
     4997+  endif
    51824998+  let ichoice = (a:0 == 0)? 0 : 1
    51834999+"  call Decho("readcmd<".readcmd."> ichoice=".ichoice)
    5184  
    5185 -  if curbufname == ""
    5186 -   " if the file is [No Name], and one attempts to Nwrite it, the buffer takes
    5187 -   " on the temporary file's name.  Deletion of the temporary file during
    5188 -   " cleanup then causes an error message.
    5189 -   0file!
     5000+
    51905001+  " NetRead: get temporary filename {{{3
    51915002+  let tmpfile= s:GetTempfile("")
     
    51935004+"   call Dret("netrw#NetRead : unable to get a tempfile!")
    51945005+   return
    5195    endif
    5196  
    5197 -  " NetWrite: while choice loop: {{{3
    5198    while ichoice <= a:0
    5199  
    5200 -   " Process arguments: {{{4
    5201     " attempt to repeat with previous host-file-etc
    5202     if exists("b:netrw_lastfile") && a:0 == 0
    5203  "    call Decho("using b:netrw_lastfile<" . b:netrw_lastfile . ">")
    5204      let choice = b:netrw_lastfile
    5205      let ichoice= ichoice + 1
    5206 +
    5207     else
    5208      exe "let choice= a:" . ichoice
     5006+  endif
     5007+
     5008+  while ichoice <= a:0
     5009+
     5010+   " attempt to repeat with previous host-file-etc
     5011+   if exists("b:netrw_lastfile") && a:0 == 0
     5012+"    call Decho("using b:netrw_lastfile<" . b:netrw_lastfile . ">")
     5013+    let choice = b:netrw_lastfile
     5014+    let ichoice= ichoice + 1
     5015+
     5016+   else
     5017+    exe "let choice= a:" . ichoice
    52095018+"    call Decho("no lastfile: choice<" . choice . ">")
    5210  
    5211 -    " Reconstruct Choice if choice starts with '"'
    5212      if match(choice,"?") == 0
    5213 -     echomsg 'NetWrite Usage:"'
    5214 -     echomsg ':Nwrite machine:path                        uses rcp'
    5215 -     echomsg ':Nwrite "machine path"                      uses ftp with <.netrc>'
    5216 -     echomsg ':Nwrite "machine id password path"          uses ftp'
    5217 -     echomsg ':Nwrite dav://[user@]machine/path           uses cadaver'
    5218 -     echomsg ':Nwrite fetch://[user@]machine/path         uses fetch'
    5219 -     echomsg ':Nwrite ftp://machine[#port]/path           uses ftp  (autodetects <.netrc>)'
    5220 -     echomsg ':Nwrite rcp://machine/path                  uses rcp'
    5221 -     echomsg ':Nwrite rsync://[user@]machine/path         uses rsync'
    5222 -     echomsg ':Nwrite scp://[user@]machine[[:#]port]/path uses scp'
    5223 -     echomsg ':Nwrite sftp://[user@]machine/path          uses sftp'
    5224 -     sleep 4
    5225 -     break
    5226 -
    5227 -    elseif match(choice,"^\"") != -1
    5228 -     if match(choice,"\"$") != -1
    5229 -       " case "..."
    5230 -      let choice=strpart(choice,1,strlen(choice)-2)
    5231 -     else
    5232 -      "  case "... ... ..."
    5233 -      let choice      = strpart(choice,1,strlen(choice)-1)
    5234 -      let wholechoice = ""
     5019+
     5020+    if match(choice,"?") == 0
    52355021+     " give help
    52365022+     echomsg 'NetRead Usage:'
     
    52455031+     echomsg ':Nread rcp://[user@]machine/path            uses rcp'
    52465032+     echomsg ':Nread rsync://machine[:port]/path          uses rsync'
    5247 +     echomsg ':Nread scp://[user@]machine[[:#]port]/path  uses scp'
    5248 +     echomsg ':Nread sftp://[user@]machine[[:#]port]/path uses sftp'
    5249 +     sleep 4
    5250 +     break
    5251  
    5252 -      while match(choice,"\"$") == -1
    5253 -       let wholechoice= wholechoice . " " . choice
    5254 -       let ichoice    = ichoice + 1
    5255 -       if choice > a:0
    5256 +    elseif match(choice,'^"') != -1
    5257 +     " Reconstruct Choice if choice starts with '"'
    5258 +"     call Decho("reconstructing choice")
    5259 +     if match(choice,'"$') != -1
    5260 +      " case "..."
    5261 +      let choice= strpart(choice,1,strlen(choice)-2)
    5262 +     else
    5263 +       "  case "... ... ..."
    5264 +      let choice      = strpart(choice,1,strlen(choice)-1)
    5265 +      let wholechoice = ""
    5266 +
    5267 +      while match(choice,'"$') == -1
    5268 +       let wholechoice = wholechoice . " " . choice
    5269 +       let ichoice     = ichoice + 1
    5270 +       if ichoice > a:0
    5271                 if !exists("g:netrw_quiet")
    5272 -        call netrw#ErrorMsg(s:ERROR,"Unbalanced string in filename '". wholechoice ."'",13)
    5273 +        call netrw#ErrorMsg(s:ERROR,"Unbalanced string in filename '". wholechoice ."'",3)
    5274         endif
    5275 -"        call Dret("netrw#NetWrite")
    5276 +"        call Dret("netrw#NetRead :2 getcwd<".getcwd().">")
    5277          return
    5278         endif
    5279         let choice= a:{ichoice}
    5280 @@ -2047,105 +1765,110 @@
     5033      echomsg ':Nread scp://[user@]machine[[:#]port]/path  uses scp'
     5034      echomsg ':Nread sftp://[user@]machine[[:#]port]/path uses sftp'
     5035      sleep 4
     5036@@ -1637,7 +1837,7 @@
     5037    endif
     5038    let tmpfile= s:GetTempfile(b:netrw_fname) " apply correct suffix
     5039 
     5040-   " Check if NetrwBrowse() should be handling this request
     5041+   " Check whether or not NetrwBrowse() should be handling this request
     5042 "   call Decho("checking if NetrwBrowse() should handle choice<".choice."> with netrw_list_cmd<".g:netrw_list_cmd.">")
     5043    if choice =~ "^.*[\/]$" && b:netrw_method != 5 && choice !~ '^https\=://'
     5044 "    call Decho("yes, choice matches '^.*[\/]$'")
     5045@@ -1659,7 +1859,7 @@
     5046 "    call Decho("read via rcp (method #1)")
     5047    " ER: nothing done with g:netrw_uid yet?
     5048    " ER: on Win2K" rcp machine[.user]:file tmpfile
     5049-   " ER: if machine contains '.' adding .user is required (use $USERNAME)
     5050+   " ER: when machine contains '.' adding .user is required (use $USERNAME)
     5051    " ER: the tmpfile is full path: rcp sees C:\... as host C
     5052    if s:netrw_has_nt_rcp == 1
     5053     if exists("g:netrw_uid") &&        ( g:netrw_uid != "" )
     5054@@ -1810,11 +2010,11 @@
     5055      " using g:netrw_http_cmd (usually elinks, links, curl, wget, or fetch)
     5056 "     call Decho('using '.g:netrw_http_cmd.' (# not in b:netrw_fname<'.b:netrw_fname.">)")
     5057      if exists("g:netrw_http_xcmd")
     5058-"      call Decho("exe ".s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape("http://".g:netrw_machine.b:netrw_fname,1)." ".g:netrw_http_xcmd." ".shellescape(tmpfile,1))
     5059-      exe s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape("http://".g:netrw_machine.b:netrw_fname,1)." ".g:netrw_http_xcmd." ".shellescape(tmpfile,1)
     5060+"      call Decho("exe ".s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(b:netrw_http."://".g:netrw_machine.b:netrw_fname,1)." ".g:netrw_http_xcmd." ".shellescape(tmpfile,1))
     5061+      exe s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(b:netrw_http."://".g:netrw_machine.b:netrw_fname,1)." ".g:netrw_http_xcmd." ".shellescape(tmpfile,1)
     5062      else
     5063-"      call Decho("exe ".s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile,1)." ".shellescape("http://".g:netrw_machine.b:netrw_fname,1))
     5064-      exe s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile,1)." ".shellescape("http://".g:netrw_machine.b:netrw_fname,1)
     5065+"      call Decho("exe ".s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile,1)." ".shellescape(b:netrw_http."://".g:netrw_machine.b:netrw_fname,1))
     5066+      exe s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile,1)." ".shellescape(b:netrw_http."://".g:netrw_machine.b:netrw_fname,1)
    52815067      endif
     5068      let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)
     5069 
     5070@@ -1825,15 +2025,15 @@
     5071      let netrw_tag = substitute(b:netrw_fname,"^.*#","","")
     5072 "     call Decho("netrw_html<".netrw_html.">")
     5073 "     call Decho("netrw_tag <".netrw_tag.">")
     5074-"     call Decho("exe ".s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile,1)." ".shellescape("http://".g:netrw_machine.netrw_html,1))
     5075-     exe s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile,1)." ".shellescape("http://".g:netrw_machine.netrw_html,1)
     5076+"     call Decho("exe ".s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile,1)." ".shellescape(b:netrw_http."://".g:netrw_machine.netrw_html,1))
     5077+     exe s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile,1)." ".shellescape(b:netrw_http."://".g:netrw_machine.netrw_html,1)
     5078      let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)
     5079 "     call Decho('<\s*a\s*name=\s*"'.netrw_tag.'"/')
     5080      exe 'keepj norm! 1G/<\s*a\s*name=\s*"'.netrw_tag.'"/'."\<CR>"
    52825081     endif
    5283     endif
    5284 +
    5285 +"   call Decho("choice<" . choice . ">")
    5286     let ichoice= ichoice + 1
    5287 -"   call Decho("choice<" . choice . "> ichoice=".ichoice)
    5288  
    5289 -   " Determine method of write (ftp, rcp, etc) {{{4
    5290 -   keepj call s:NetrwMethod(choice)
    5291 +   " NetRead: Determine method of read (ftp, rcp, etc) {{{3
    5292 +   call s:NetrwMethod(choice)
    5293     if !exists("b:netrw_method") || b:netrw_method < 0
    5294 -"    call Dfunc("netrw#NetWrite : unsupported method")
    5295 +"    call Dfunc("netrw#NetRead : unsupported method")
    5296 +    return
    5297 +   endif
    5298 +   let tmpfile= s:GetTempfile(b:netrw_fname) " apply correct suffix
    5299 +
    5300 +   " Check whether or not NetrwBrowse() should be handling this request
    5301 +"   call Decho("checking if NetrwBrowse() should handle choice<".choice."> with netrw_list_cmd<".g:netrw_list_cmd.">")
    5302 +   if choice =~ "^.*[\/]$" && b:netrw_method != 5 && choice !~ '^https\=://'
    5303 +"    call Decho("yes, choice matches '^.*[\/]$'")
    5304 +    keepj call s:NetrwBrowse(0,choice)
    5305 +"    call Dret("netrw#NetRead :3 getcwd<".getcwd().">")
    5306      return
    5307     endif
    5308  
    5309 -   " =============
    5310 -   " NetWrite: Perform Protocol-Based Write {{{3
    5311 -   " ============================
    5312 +   " ============
    5313 +   " NetRead: Perform Protocol-Based Read {{{3
    5314 +   " ===========================
    5315     if exists("g:netrw_silent") && g:netrw_silent == 0 && &ch >= 1
    5316 -    echo "(netrw) Processing your write request..."
    5317 -"    call Decho("(netrw) Processing your write request...")
    5318 +    echo "(netrw) Processing your read request..."
    5319     endif
     5082     let b:netrw_lastfile = choice
     5083-"    call Decho("(NetRead) setl ro")
     5084-    setl ro
     5085+"    call Decho("setl ro")
     5086+    setl ro nomod
    53205087 
    53215088    ".........................................
    5322 -   " NetWrite: (rcp) NetWrite Method #1 {{{3
    5323 -   if  b:netrw_method == 1
    5324 -"    call Decho("write via rcp (method #1)")
    5325 -    if s:netrw_has_nt_rcp == 1
    5326 -     if exists("g:netrw_uid") &&  ( g:netrw_uid != "" )
    5327 -      let uid_machine = g:netrw_machine .'.'. g:netrw_uid
    5328 -     else
    5329 -      let uid_machine = g:netrw_machine .'.'. $USERNAME
    5330 -     endif
    5331 +   " NetRead: (rcp)  NetRead Method #1 {{{3
    5332 +   if  b:netrw_method == 1 " read with rcp
    5333 +"    call Decho("read via rcp (method #1)")
    5334 +   " ER: nothing done with g:netrw_uid yet?
    5335 +   " ER: on Win2K" rcp machine[.user]:file tmpfile
    5336 +   " ER: when machine contains '.' adding .user is required (use $USERNAME)
    5337 +   " ER: the tmpfile is full path: rcp sees C:\... as host C
    5338 +   if s:netrw_has_nt_rcp == 1
    5339 +    if exists("g:netrw_uid") &&        ( g:netrw_uid != "" )
    5340 +     let uid_machine = g:netrw_machine .'.'. g:netrw_uid
     5089    " NetRead: (dav) NetRead Method #6 {{{3
     5090@@ -1894,7 +2094,7 @@
     5091 "     call Dret("NetRead")
     5092      return
     5093     endif
     5094-    if exists("g:netrw_option") && g:netrw_option == ":https\="
     5095+    if exists("g:netrw_option") && g:netrw_option =~ ":https\="
     5096      let netrw_option= "http"
    53415097     else
    5342 -     if exists("g:netrw_uid") &&  ( g:netrw_uid != "" )
    5343 -      let uid_machine = g:netrw_uid .'@'. g:netrw_machine
    5344 -     else
    5345 -      let uid_machine = g:netrw_machine
    5346 -     endif
    5347 -    endif
    5348 -"    call Decho("executing: !".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".shellescape(tmpfile,1)." ".shellescape(uid_machine.":".b:netrw_fname,1))
    5349 -    exe s:netrw_silentxfer."!".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".shellescape(tmpfile,1)." ".shellescape(uid_machine.":".b:netrw_fname,1)
    5350 -    let b:netrw_lastfile = choice
    5351 -
    5352 -   ".........................................
    5353 -   " NetWrite: (ftp + <.netrc>) NetWrite Method #2 {{{3
    5354 -   elseif b:netrw_method == 2
    5355 -"    call Decho("write via ftp+.netrc (method #2)")
    5356 -    let netrw_fname = b:netrw_fname
    5357 -
    5358 -    " formerly just a "new...bd!", that changed the window sizes when equalalways.  Using enew workaround instead
    5359 -    let bhkeep      = &l:bh
    5360 -    let curbuf      = bufnr("%")
    5361 -    setl bh=hide
    5362 -    keepalt enew
    5363 -
    5364 -"    call Decho("filter input window#".winnr())
    5365 -    setl ff=unix
    5366 -    keepj put =g:netrw_ftpmode
    5367 -"    call Decho("filter input: ".getline('$'))
    5368 -    if exists("g:netrw_ftpextracmd")
    5369 -     keepj put =g:netrw_ftpextracmd
    5370 -"     call Decho("filter input: ".getline("$"))
    5371 +     " Any way needed it machine contains a '.'
    5372 +     let uid_machine = g:netrw_machine .'.'. $USERNAME
    5373      endif
    5374 -    keepj call setline(line("$")+1,'put "'.tmpfile.'" "'.netrw_fname.'"')
    5375 -"    call Decho("filter input: ".getline("$"))
    5376 -    if exists("g:netrw_port") && g:netrw_port != ""
    5377 -"     call Decho("executing: %!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1))
    5378 -     exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1)
    5379 +   else
    5380 +    if exists("g:netrw_uid") &&        ( g:netrw_uid != "" )
    5381 +     let uid_machine = g:netrw_uid .'@'. g:netrw_machine
    5382      else
    5383 -"     call Decho("filter input window#".winnr())
    5384 -"     call Decho("executing: %!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1))
    5385 -     exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)
    5386 -    endif
    5387 -    " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar)
    5388 -    if getline(1) !~ "^$"
    5389 -     if !exists("g:netrw_quiet")
    5390 -      keepj call netrw#ErrorMsg(s:ERROR,getline(1),14)
    5391 -     endif
    5392 -     let mod=1
    5393 +     let uid_machine = g:netrw_machine
    5394      endif
    5395 +   endif
    5396 +"   call Decho("executing: !".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".shellescape(uid_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1))
    5397 +   exe s:netrw_silentxfer."!".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".shellescape(uid_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1)
    5398 +   let result           = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)
    5399 +   let b:netrw_lastfile = choice
    5400  
    5401 -    " remove enew buffer (quietly)
    5402 -    let filtbuf= bufnr("%")
    5403 -    exe curbuf."b!"
    5404 -    let &l:bh            = bhkeep
    5405 -    exe filtbuf."bw!"
    5406 -
    5407 -    let b:netrw_lastfile = choice
    5408 +   ".........................................
    5409 +   " NetRead: (ftp + <.netrc>)  NetRead Method #2 {{{3
    5410 +   elseif b:netrw_method  == 2         " read with ftp + <.netrc>
    5411 +"     call Decho("read via ftp+.netrc (method #2)")
    5412 +     let netrw_fname= b:netrw_fname
    5413 +     keepj call s:SaveBufVars()|new|keepj call s:RestoreBufVars()
    5414 +     let filtbuf= bufnr("%")
    5415 +     setl ff=unix
    5416 +     keepj put =g:netrw_ftpmode
    5417 +"     call Decho("filter input: ".getline(line("$")))
    5418 +     if exists("g:netrw_ftpextracmd")
    5419 +      keepj put =g:netrw_ftpextracmd
    5420 +"      call Decho("filter input: ".getline(line("$")))
    5421 +     endif
    5422 +     call setline(line("$")+1,'get "'.netrw_fname.'" '.tmpfile)
    5423 +"     call Decho("filter input: ".getline(line("$")))
    5424 +     if exists("g:netrw_port") && g:netrw_port != ""
    5425 +"      call Decho("executing: %!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1))
    5426 +      exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1)
    5427 +     else
    5428 +"      call Decho("executing: %!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1))
    5429 +      exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)
    5430 +     endif
    5431 +     " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar)
    5432 +     if getline(1) !~ "^$" && !exists("g:netrw_quiet") && getline(1) !~ '^Trying '
    5433 +      let debugkeep = &debug
    5434 +      setl debug=msg
    5435 +      keepj call netrw#ErrorMsg(s:ERROR,getline(1),4)
    5436 +      let &debug    = debugkeep
    5437 +     endif
    5438 +     call s:SaveBufVars()
    5439 +     bd!
    5440 +     if bufname("%") == "" && getline("$") == "" && line('$') == 1
    5441 +      " needed when one sources a file in a nolbl setting window via ftp
    5442 +      q!
    5443 +     endif
    5444 +     call s:RestoreBufVars()
    5445 +     let result           = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)
    5446 +     let b:netrw_lastfile = choice
     5098      let netrw_option= "ftp"
     5099@@ -1911,8 +2111,8 @@
     5100 
     5101     let result         = s:NetrwGetFile(readcmd,tmpfile, b:netrw_method)
     5102     let b:netrw_lastfile = choice
     5103-"    call Decho("(NetRead) setl ro")
     5104-    setl ro
     5105+"    call Decho("setl ro")
     5106+    setl ro nomod
    54475107 
    54485108    ".........................................
    5449 -   " NetWrite: (ftp + machine, id, passwd, filename) NetWrite Method #3 {{{3
    5450 -   elseif b:netrw_method == 3
    5451 -    " Construct execution string (three or more lines) which will be passed through filter
    5452 +   " NetRead: (ftp + machine,id,passwd,filename)  NetRead Method #3 {{{3
    5453 +   elseif b:netrw_method == 3          " read with ftp + machine, id, passwd, and fname
    5454 +    " Construct execution string (four lines) which will be passed through filter
    5455  "    call Decho("read via ftp+mipf (method #3)")
    5456 -    let netrw_fname = b:netrw_fname
    5457 -    let bhkeep      = &l:bh
    5458 -
    5459 -    " formerly just a "new...bd!", that changed the window sizes when equalalways.  Using enew workaround instead
    5460 -    let curbuf      = bufnr("%")
    5461 -    setl bh=hide
    5462 -    keepalt enew
    5463 +    let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape)
    5464 +    keepj call s:SaveBufVars()|new|keepj call s:RestoreBufVars()
    5465 +    let filtbuf= bufnr("%")
    5466      setl ff=unix
    5467 -
    5468      if exists("g:netrw_port") && g:netrw_port != ""
    5469       keepj put ='open '.g:netrw_machine.' '.g:netrw_port
    5470  "     call Decho("filter input: ".getline('.'))
    5471 @@ -2153,29 +1876,31 @@
    5472       keepj put ='open '.g:netrw_machine
    5473  "     call Decho("filter input: ".getline('.'))
    5474      endif
    5475 +
    5476      if exists("g:netrw_uid") && g:netrw_uid != ""
    5477       if exists("g:netrw_ftp") && g:netrw_ftp == 1
    5478        keepj put =g:netrw_uid
    5479 -"      call Decho("filter input: ".getline('.'))
    5480 -      if exists("s:netrw_passwd") && s:netrw_passwd != ""
    5481 +"       call Decho("filter input: ".getline('.'))
    5482 +      if exists("s:netrw_passwd")
    5483         keepj put ='\"'.s:netrw_passwd.'\"'
    5484        endif
    5485  "      call Decho("filter input: ".getline('.'))
    5486 -     elseif exists("s:netrw_passwd") && s:netrw_passwd != ""
    5487 +     elseif exists("s:netrw_passwd")
    5488        keepj put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"'
    5489  "      call Decho("filter input: ".getline('.'))
    5490       endif
    5491      endif
    5492 -    keepj put =g:netrw_ftpmode
    5493 -"    call Decho("filter input: ".getline('$'))
    5494 +
    5495 +    if exists("g:netrw_ftpmode") && g:netrw_ftpmode != ""
    5496 +     keepj put =g:netrw_ftpmode
    5497 +"     call Decho("filter input: ".getline('.'))
    5498 +    endif
    5499      if exists("g:netrw_ftpextracmd")
    5500       keepj put =g:netrw_ftpextracmd
    5501 -"     call Decho("filter input: ".getline("$"))
    5502 +"     call Decho("filter input: ".getline('.'))
    5503      endif
    5504 -    keepj put ='put \"'.tmpfile.'\" \"'.netrw_fname.'\"'
    5505 +    keepj put ='get \"'.netrw_fname.'\" '.tmpfile
    5506  "    call Decho("filter input: ".getline('.'))
    5507 -    " save choice/id/password for future use
    5508 -    let b:netrw_lastfile = choice
    5509  
    5510      " perform ftp:
    5511      " -i       : turns off interactive prompting from ftp
    5512 @@ -2186,3113 +1911,3829 @@
    5513      exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." ".g:netrw_ftp_options
    5514      " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar)
    5515      if getline(1) !~ "^$"
    5516 -     if  !exists("g:netrw_quiet")
    5517 -      call netrw#ErrorMsg(s:ERROR,getline(1),15)
    5518 +"     call Decho("error<".getline(1).">")
    5519 +     if !exists("g:netrw_quiet")
    5520 +      call netrw#ErrorMsg(s:ERROR,getline(1),5)
    5521       endif
    5522 -     let mod=1
    5523      endif
    5524 -
    5525 -    " remove enew buffer (quietly)
    5526 -    let filtbuf= bufnr("%")
    5527 -    exe curbuf."b!"
    5528 -    let &l:bh= bhkeep
    5529 -    exe filtbuf."bw!"
    5530 +    call s:SaveBufVars()|bd!|call s:RestoreBufVars()
    5531 +    let result           = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)
    5532 +    let b:netrw_lastfile = choice
    5533  
    5534     ".........................................
    5535 -   " NetWrite: (scp) NetWrite Method #4 {{{3
    5536 -   elseif     b:netrw_method == 4
    5537 -"    call Decho("write via scp (method #4)")
    5538 +   " NetRead: (scp) NetRead Method #4 {{{3
    5539 +   elseif     b:netrw_method  == 4     " read with scp
    5540 +"    call Decho("read via scp (method #4)")
    5541      if exists("g:netrw_port") && g:netrw_port != ""
    5542 -     let useport= " ".g:netrw_scpport." ".fnameescape(g:netrw_port)
    5543 +     let useport= " ".g:netrw_scpport." ".g:netrw_port
    5544      else
    5545       let useport= ""
    5546      endif
    5547 -"    call Decho("exe ".s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".shellescape(tmpfile,1)." ".shellescape(g:netrw_machine.":".b:netrw_fname,1))
    5548 -    exe s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".shellescape(tmpfile,1)." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)
    5549 +"    call Decho("exe ".s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1))
    5550 +    exe s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1)
    5551 +    let result           = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)
    5552      let b:netrw_lastfile = choice
    5553  
    5554     ".........................................
    5555 -   " NetWrite: (http) NetWrite Method #5 {{{3
    5556 -   elseif     b:netrw_method == 5
    5557 -"    call Decho("write via http (method #5)")
     5109    " NetRead: (sftp) NetRead Method #9 {{{3
     5110@@ -1978,7 +2178,7 @@
     5111    exe "sil keepj w! ".fnameescape(v:cmdarg)." ".fnameescape(tmpfile)
     5112   elseif g:netrw_cygwin
     5113    " write (selected portion of) file to temporary
     5114-   let cygtmpfile= substitute(tmpfile,'/cygdrive/\(.\)','\1:','')
     5115+   let cygtmpfile= substitute(tmpfile,g:netrw_cygdrive.'/\(.\)','\1:','')
     5116 "   call Decho("(write selected portion) sil exe ".a:firstline."," . a:lastline . "w! ".fnameescape(v:cmdarg)." ".fnameescape(cygtmpfile))
     5117    exe "sil keepj ".a:firstline."," . a:lastline . "w! ".fnameescape(v:cmdarg)." ".fnameescape(cygtmpfile)
     5118   else
     5119@@ -1988,7 +2188,7 @@
     5120   endif
     5121 
     5122   if curbufname == ""
     5123-   " if the file is [No Name], and one attempts to Nwrite it, the buffer takes
     5124+   " when the file is [No Name], and one attempts to Nwrite it, the buffer takes
     5125    " on the temporary file's name.  Deletion of the temporary file during
     5126    " cleanup then causes an error message.
     5127    0file!
     5128@@ -2006,7 +2206,7 @@
     5129    else
     5130     exe "let choice= a:" . ichoice
     5131 
     5132-    " Reconstruct Choice if choice starts with '"'
     5133+    " Reconstruct Choice when choice starts with '"'
     5134     if match(choice,"?") == 0
     5135      echomsg 'NetWrite Usage:"'
     5136      echomsg ':Nwrite machine:path                        uses rcp'
     5137@@ -2215,8 +2415,13 @@
     5138    " NetWrite: (http) NetWrite Method #5 {{{3
     5139    elseif     b:netrw_method == 5
     5140 "    call Decho("write via http (method #5)")
    55585141-    if !exists("g:netrw_quiet")
    55595142-     call netrw#ErrorMsg(s:ERROR,"currently <netrw.vim> does not support writing using http:",16)
    5560 -    endif
    5561 -
    5562 -   ".........................................
    5563 -   " NetWrite: (dav) NetWrite Method #6 (cadaver) {{{3
    5564 -   elseif     b:netrw_method == 6
    5565 -"    call Decho("write via cadaver (method #6)")
    5566 -
    5567 -    " Construct execution string (four lines) which will be passed through filter
    5568 -    let netrw_fname = escape(b:netrw_fname,g:netrw_fname_escape)
    5569 -    let bhkeep      = &l:bh
    5570 +   " NetRead: (http) NetRead Method #5 (wget) {{{3
    5571 +   elseif     b:netrw_method  == 5
    5572 +"    call Decho("read via http (method #5)")
    5573 +    if g:netrw_http_cmd == ""
    5574 +     if !exists("g:netrw_quiet")
    5575 +      call netrw#ErrorMsg(s:ERROR,"neither the wget nor the fetch command is available",6)
    5576 +     endif
    5577 +"     call Dret("netrw#NetRead :4 getcwd<".getcwd().">")
    5578 +     return
    5579 +    endif
    5580  
    5581 -    " formerly just a "new...bd!", that changed the window sizes when equalalways.  Using enew workaround instead
    5582 -    let curbuf      = bufnr("%")
    5583 -    setl bh=hide
    5584 -    keepalt enew
    5585 +    if match(b:netrw_fname,"#") == -1 || exists("g:netrw_http_xcmd")
    5586 +     " using g:netrw_http_cmd (usually elinks, links, curl, wget, or fetch)
    5587 +"     call Decho('using '.g:netrw_http_cmd.' (# not in b:netrw_fname<'.b:netrw_fname.">)")
    5588 +     if exists("g:netrw_http_xcmd")
    5589 +"      call Decho("exe ".s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(b:netrw_http."://".g:netrw_machine.b:netrw_fname,1)." ".g:netrw_http_xcmd." ".shellescape(tmpfile,1))
    5590 +      exe s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(b:netrw_http."://".g:netrw_machine.b:netrw_fname,1)." ".g:netrw_http_xcmd." ".shellescape(tmpfile,1)
    5591 +     else
    5592 +"      call Decho("exe ".s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile,1)." ".shellescape(b:netrw_http."://".g:netrw_machine.b:netrw_fname,1))
    5593 +      exe s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile,1)." ".shellescape(b:netrw_http."://".g:netrw_machine.b:netrw_fname,1)
    5594 +     endif
    5595 +     let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)
    5596  
    5597 -    setl ff=unix
    5598 -    if exists("g:netrw_port") && g:netrw_port != ""
    5599 -     keepj put ='open '.g:netrw_machine.' '.g:netrw_port
    5600      else
    5601 -     keepj put ='open '.g:netrw_machine
    5602 -    endif
    5603 -    if exists("g:netrw_uid") && exists("s:netrw_passwd") && g:netrw_uid != ""
    5604 -     keepj put ='user '.g:netrw_uid.' '.s:netrw_passwd
    5605 +     " wget/curl/fetch plus a jump to an in-page marker (ie. http://abc/def.html#aMarker)
    5606 +"     call Decho("wget/curl plus jump (# in b:netrw_fname<".b:netrw_fname.">)")
    5607 +     let netrw_html= substitute(b:netrw_fname,"#.*$","","")
    5608 +     let netrw_tag = substitute(b:netrw_fname,"^.*#","","")
    5609 +"     call Decho("netrw_html<".netrw_html.">")
    5610 +"     call Decho("netrw_tag <".netrw_tag.">")
    5611 +"     call Decho("exe ".s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile,1)." ".shellescape(b:netrw_http."://".g:netrw_machine.netrw_html,1))
    5612 +     exe s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile,1)." ".shellescape(b:netrw_http."://".g:netrw_machine.netrw_html,1)
    5613 +     let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)
    5614 +"     call Decho('<\s*a\s*name=\s*"'.netrw_tag.'"/')
    5615 +     exe 'keepj norm! 1G/<\s*a\s*name=\s*"'.netrw_tag.'"/'."\<CR>"
    5616      endif
    5617 -    keepj put ='put '.tmpfile.' '.netrw_fname
    5618 +    let b:netrw_lastfile = choice
    5619 +"    call Decho("setl ro")
    5620 +    setl ro
    5621  
    5622 -    " perform cadaver operation:
    5623 -    keepj norm! 1Gdd
    5624 -"    call Decho("executing: %!".g:netrw_dav_cmd)
    5625 -    exe s:netrw_silentxfer."%!".g:netrw_dav_cmd
    5626 +   ".........................................
    5627 +   " NetRead: (dav) NetRead Method #6 {{{3
    5628 +   elseif     b:netrw_method  == 6
    5629 +"    call Decho("read via cadaver (method #6)")
    5630  
    5631 -    " remove enew buffer (quietly)
    5632 -    let filtbuf= bufnr("%")
    5633 -    exe curbuf."b!"
    5634 -    let &l:bh            = bhkeep
    5635 -    exe filtbuf."bw!"
    5636 +    if !executable(g:netrw_dav_cmd)
    5637 +     call netrw#ErrorMsg(s:ERROR,g:netrw_dav_cmd." is not executable",73)
    5638 +"     call Dret("netrw#NetRead : ".g:netrw_dav_cmd." not executable")
    5639 +     return
    5640 +    endif
    5641 +    if g:netrw_dav_cmd =~ "curl"
    5642 +"     call Decho("exe ".s:netrw_silentxfer."!".g:netrw_dav_cmd." ".shellescape("dav://".g:netrw_machine.b:netrw_fname,1)." ".shellescape(tmpfile,1))
    5643 +     exe s:netrw_silentxfer."!".g:netrw_dav_cmd." ".shellescape("dav://".g:netrw_machine.b:netrw_fname,1)." ".shellescape(tmpfile,1)
    5644 +    else
    5645 +     " Construct execution string (four lines) which will be passed through filter
    5646 +     let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape)
    5647 +     new
    5648 +     setl ff=unix
    5649 +     if exists("g:netrw_port") && g:netrw_port != ""
    5650 +      keepj put ='open '.g:netrw_machine.' '.g:netrw_port
    5651 +     else
    5652 +      keepj put ='open '.g:netrw_machine
    5653 +     endif
    5654 +     if exists("g:netrw_uid") && exists("s:netrw_passwd") && g:netrw_uid != ""
    5655 +      keepj put ='user '.g:netrw_uid.' '.s:netrw_passwd
    5656 +     endif
    5657 +     keepj put ='get '.netrw_fname.' '.tmpfile
    5658 +     keepj put ='quit'
    5659  
    5660 +     " perform cadaver operation:
    5661 +     keepj norm! 1Gdd
    5662 +"    call Decho("executing: %!".g:netrw_dav_cmd)
    5663 +     exe s:netrw_silentxfer."%!".g:netrw_dav_cmd
    5664 +     bd!
    5665 +    endif
    5666 +    let result           = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)
    5667      let b:netrw_lastfile = choice
    5668  
    5669     ".........................................
    5670 -   " NetWrite: (rsync) NetWrite Method #7 {{{3
    5671 -   elseif     b:netrw_method == 7
    5672 -"    call Decho("write via rsync (method #7)")
    5673 -"    call Decho("executing: !".g:netrw_rsync_cmd." ".shellescape(tmpfile,1)." ".shellescape(g:netrw_machine.":".b:netrw_fname,1))
    5674 -    exe s:netrw_silentxfer."!".g:netrw_rsync_cmd." ".shellescape(tmpfile,1)." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)
    5675 +   " NetRead: (rsync) NetRead Method #7 {{{3
    5676 +   elseif     b:netrw_method  == 7
    5677 +"    call Decho("read via rsync (method #7)")
    5678 +"    call Decho("exe ".s:netrw_silentxfer."!".g:netrw_rsync_cmd." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1))
    5679 +    exe s:netrw_silentxfer."!".g:netrw_rsync_cmd." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1)
    5680 +    let result          = s:NetrwGetFile(readcmd,tmpfile, b:netrw_method)
    5681      let b:netrw_lastfile = choice
    5682  
    5683     ".........................................
    5684 -   " NetWrite: (sftp) NetWrite Method #9 {{{3
    5685 -   elseif     b:netrw_method == 9
    5686 -"    call Decho("write via sftp (method #9)")
    5687 -    let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape)
    5688 -    if exists("g:netrw_uid") &&  ( g:netrw_uid != "" )
    5689 -     let uid_machine = g:netrw_uid .'@'. g:netrw_machine
    5690 +   " NetRead: (fetch) NetRead Method #8 {{{3
    5691 +   "    fetch://[user@]host[:http]/path
    5692 +   elseif     b:netrw_method  == 8
    5693 +"    call Decho("read via fetch (method #8)")
    5694 +    if g:netrw_fetch_cmd == ""
    5695 +     if !exists("g:netrw_quiet")
    5696 +      keepj call netrw#ErrorMsg(s:ERROR,"fetch command not available",7)
    5697 +     endif
    5698 +"     call Dret("NetRead")
    5699 +     return
    5700 +    endif
    5701 +    if exists("g:netrw_option") && g:netrw_option =~ ":https\="
    5702 +     let netrw_option= "http"
    5703      else
    5704 -     let uid_machine = g:netrw_machine
    5705 +     let netrw_option= "ftp"
    5706      endif
    5707 +"    call Decho("read via fetch for ".netrw_option)
    5708  
    5709 -    " formerly just a "new...bd!", that changed the window sizes when equalalways.  Using enew workaround instead
    5710 -    let bhkeep = &l:bh
    5711 -    let curbuf = bufnr("%")
    5712 -    setl bh=hide
    5713 -    keepalt enew
    5714 +    if exists("g:netrw_uid") && g:netrw_uid != "" && exists("s:netrw_passwd") && s:netrw_passwd != ""
    5715 +"     call Decho("exe ".s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".shellescape(tmpfile,1)." ".shellescape(netrw_option."://".g:netrw_uid.':'.s:netrw_passwd.'@'.g:netrw_machine."/".b:netrw_fname,1))
    5716 +     exe s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".shellescape(tmpfile,1)." ".shellescape(netrw_option."://".g:netrw_uid.':'.s:netrw_passwd.'@'.g:netrw_machine."/".b:netrw_fname,1)
    5717 +    else
    5718 +"     call Decho("exe ".s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".shellescape(tmpfile,1)." ".shellescape(netrw_option."://".g:netrw_machine."/".b:netrw_fname,1))
    5719 +     exe s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".shellescape(tmpfile,1)." ".shellescape(netrw_option."://".g:netrw_machine."/".b:netrw_fname,1)
    5720 +    endif
    5721  
    5722 -    setl ff=unix
    5723 -    call setline(1,'put "'.escape(tmpfile,'\').'" '.netrw_fname)
    5724 -"    call Decho("filter input: ".getline('.'))
    5725 -"    call Decho("executing: %!".g:netrw_sftp_cmd.' '.shellescape(uid_machine,1))
    5726 -    let sftpcmd= substitute(g:netrw_sftp_cmd,"%TEMPFILE%",escape(tmpfile,'\'),"g")
    5727 -    exe s:netrw_silentxfer."%!".sftpcmd.' '.shellescape(uid_machine,1)
    5728 -    let filtbuf= bufnr("%")
    5729 -    exe curbuf."b!"
    5730 -    let &l:bh            = bhkeep
    5731 -    exe filtbuf."bw!"
    5732 +    let result         = s:NetrwGetFile(readcmd,tmpfile, b:netrw_method)
    5733      let b:netrw_lastfile = choice
    5734 +"    call Decho("setl ro")
    5735 +    setl ro
    5736  
    5737     ".........................................
    5738 -   " NetWrite: Complain {{{3
    5739 +   " NetRead: (sftp) NetRead Method #9 {{{3
    5740 +   elseif     b:netrw_method  == 9
    5741 +"    call Decho("read via sftp (method #9)")
    5742 +"    call Decho("exe ".s:netrw_silentxfer."!".g:netrw_sftp_cmd." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)." ".tmpfile)
    5743 +    exe s:netrw_silentxfer."!".g:netrw_sftp_cmd." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)." ".tmpfile
    5744 +    let result         = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)
    5745 +    let b:netrw_lastfile = choice
    5746 +
    5747 +   ".........................................
    5748 +   " NetRead: Complain {{{3
    5749     else
    5750 -    call netrw#ErrorMsg(s:WARNING,"unable to comply with your request<" . choice . ">",17)
    5751 -    let leavemod= 1
    5752 +    call netrw#ErrorMsg(s:WARNING,"unable to comply with your request<" . choice . ">",8)
    5753     endif
    5754    endwhile
    5755  
    5756 -  " NetWrite: Cleanup: {{{3
    5757 -"  call Decho("cleanup")
    5758 -  if s:FileReadable(tmpfile)
    5759 -"   call Decho("tmpfile<".tmpfile."> readable, will now delete it")
    5760 -   call s:NetrwDelete(tmpfile)
    5761 +  " NetRead: cleanup {{{3
    5762 +  if exists("b:netrw_method")
    5763 +"   call Decho("cleanup b:netrw_method and b:netrw_fname")
    5764 +   unlet b:netrw_method
    5765 +   unlet b:netrw_fname
    5766    endif
    5767 -  call s:NetrwOptionRestore("w:")
    5768 -
    5769 -  if a:firstline == 1 && a:lastline == line("$")
    5770 -   " restore modifiability; usually equivalent to set nomod
    5771 -   let &mod= mod
    5772 -"   call Decho("(NetWrite)  ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
    5773 -  elseif !exists("leavemod")
    5774 -   " indicate that the buffer has not been modified since last written
    5775 -"   call Decho("(NetWrite) set nomod")
    5776 -   set nomod
    5777 -"   call Decho("(NetWrite)  ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
    5778 +  if s:FileReadable(tmpfile) && tmpfile !~ '.tar.bz2$' && tmpfile !~ '.tar.gz$' && tmpfile !~ '.zip' && tmpfile !~ '.tar' && readcmd != 't' && tmpfile !~ '.tar.xz$' && tmpfile !~ '.txz'
    5779 +"   call Decho("cleanup by deleting tmpfile<".tmpfile.">")
    5780 +   keepj call s:NetrwDelete(tmpfile)
    5781    endif
    5782 +  keepj call s:NetrwOptionRestore("w:")
    5783  
    5784 -"  call Dret("netrw#NetWrite")
    5785 +"  call Dret("netrw#NetRead :5 getcwd<".getcwd().">")
    5786  endfun
    5787  
    5788 -" ---------------------------------------------------------------------
    5789 -" netrw#NetSource: source a remotely hosted vim script {{{2
    5790 -" uses NetRead to get a copy of the file into a temporarily file,
    5791 -"              then sources that file,
    5792 -"              then removes that file.
    5793 -fun! netrw#NetSource(...)
    5794 -"  call Dfunc("netrw#NetSource() a:0=".a:0)
    5795 -  if a:0 > 0 && a:1 == '?'
    5796 -   " give help
    5797 -   echomsg 'NetSource Usage:'
    5798 -   echomsg ':Nsource dav://machine[:port]/path            uses cadaver'
    5799 -   echomsg ':Nsource fetch://machine/path                 uses fetch'
    5800 -   echomsg ':Nsource ftp://[user@]machine[:port]/path     uses ftp   autodetects <.netrc>'
    5801 -   echomsg ':Nsource http[s]://[user@]machine/path        uses http  wget'
    5802 -   echomsg ':Nsource rcp://[user@]machine/path            uses rcp'
    5803 -   echomsg ':Nsource rsync://machine[:port]/path          uses rsync'
    5804 -   echomsg ':Nsource scp://[user@]machine[[:#]port]/path  uses scp'
    5805 -   echomsg ':Nsource sftp://[user@]machine[[:#]port]/path uses sftp'
    5806 -   sleep 4
    5807 -  else
    5808 -   let i= 1
    5809 -   while i <= a:0
    5810 -    call netrw#NetRead(3,a:{i})
    5811 -"    call Decho("(netrw#NetSource) s:netread_tmpfile<".s:netrw_tmpfile.">")
    5812 -    if s:FileReadable(s:netrw_tmpfile)
    5813 -"     call Decho("(netrw#NetSource) exe so ".fnameescape(s:netrw_tmpfile))
    5814 -     exe "so ".fnameescape(s:netrw_tmpfile)
    5815 -"     call Decho("(netrw#NetSource) delete(".s:netrw_tmpfile.")")
    5816 -     call delete(s:netrw_tmpfile)
    5817 -     unlet s:netrw_tmpfile
    5818 -    else
    5819 -     call netrw#ErrorMsg(s:ERROR,"unable to source <".a:{i}.">!",48)
    5820 -    endif
    5821 -    let i= i + 1
    5822 -   endwhile
    5823 -  endif
    5824 -"  call Dret("netrw#NetSource")
    5825 -endfun
    5826 +" ------------------------------------------------------------------------
    5827 +" netrw#NetWrite: responsible for writing a file over the net {{{2
    5828 +fun! netrw#NetWrite(...) range
    5829 +"  call Dfunc("netrw#NetWrite(a:0=".a:0.") ".g:loaded_netrw)
    5830  
    5831 -" ===========================================
    5832 -" s:NetrwGetFile: Function to read temporary file "tfile" with command "readcmd". {{{2
    5833 -"    readcmd == %r : replace buffer with newly read file
    5834 -"            == 0r : read file at top of buffer
    5835 -"            == r  : read file after current line
    5836 -"            == t  : leave file in temporary form (ie. don't read into buffer)
    5837 -fun! s:NetrwGetFile(readcmd, tfile, method)
    5838 -"  call Dfunc("NetrwGetFile(readcmd<".a:readcmd.">,tfile<".a:tfile."> method<".a:method.">)")
    5839 +  " NetWrite: option handling {{{3
    5840 +  let mod= 0
    5841 +  call s:NetrwOptionSave("w:")
    5842 +  call s:NetrwSafeOptions()
    5843  
    5844 -  " readcmd=='t': simply do nothing
    5845 -  if a:readcmd == 't'
    5846 -"   call Decho("(NetrwGetFile)  ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
    5847 -"   call Dret("NetrwGetFile : skip read of <".a:tfile.">")
    5848 +  " NetWrite: Get Temporary Filename {{{3
    5849 +  let tmpfile= s:GetTempfile("")
    5850 +  if tmpfile == ""
    5851 +"   call Dret("netrw#NetWrite : unable to get a tempfile!")
    5852     return
    5853    endif
    5854  
    5855 -  " get name of remote filename (ie. url and all)
    5856 -  let rfile= bufname("%")
    5857 -"  call Decho("rfile<".rfile.">")
    5858 -
    5859 -  if exists("*NetReadFixup")
    5860 -   " for the use of NetReadFixup (not otherwise used internally)
    5861 -   let line2= line("$")
    5862 +  if a:0 == 0
    5863 +   let ichoice = 0
    5864 +  else
    5865 +   let ichoice = 1
    5866    endif
    5867  
    5868 -  if a:readcmd[0] == '%'
    5869 -  " get file into buffer
    5870 -"   call Decho("get file into buffer")
    5871 -
    5872 -   " rename the current buffer to the temp file (ie. tfile)
    5873 -   if g:netrw_cygwin
    5874 -    let tfile= substitute(a:tfile,'/cygdrive/\(.\)','\1:','')
    5875 -   else
    5876 -    let tfile= a:tfile
    5877 -   endif
    5878 -"   call Decho("exe sil! keepalt file ".fnameescape(tfile))
    5879 -   exe "sil! keepalt file ".fnameescape(tfile)
    5880 -
    5881 -   " edit temporary file (ie. read the temporary file in)
    5882 -   if     rfile =~ '\.zip$'
    5883 -"    call Decho("handling remote zip file with zip#Browse(tfile<".tfile.">)")
    5884 -    call zip#Browse(tfile)
    5885 -   elseif rfile =~ '\.tar$'
    5886 -"    call Decho("handling remote tar file with tar#Browse(tfile<".tfile.">)")
    5887 -    call tar#Browse(tfile)
    5888 -   elseif rfile =~ '\.tar\.gz$'
    5889 -"    call Decho("handling remote gzip-compressed tar file")
    5890 -    call tar#Browse(tfile)
    5891 -   elseif rfile =~ '\.tar\.bz2$'
    5892 -"    call Decho("handling remote bz2-compressed tar file")
    5893 -    call tar#Browse(tfile)
    5894 -   elseif rfile =~ '\.tar\.xz$'
    5895 -"    call Decho("handling remote xz-compressed tar file")
    5896 -    call tar#Browse(tfile)
    5897 -   elseif rfile =~ '\.txz$'
    5898 -"    call Decho("handling remote xz-compressed tar file (.txz)")
    5899 -    call tar#Browse(tfile)
    5900 -   else
    5901 -"    call Decho("edit temporary file")
    5902 -    e!
    5903 -   endif
    5904 -
    5905 -   " rename buffer back to remote filename
    5906 -"   call Decho("exe sil! keepalt file ".fnameescape(rfile))
    5907 -   exe "sil! keepj keepalt file ".fnameescape(rfile)
    5908 -
    5909 -   " Detect filetype of local version of remote file.
    5910 -   " Note that isk must not include a "/" for scripts.vim
    5911 -   " to process this detection correctly.
    5912 -"   call Decho("detect filetype of local version of remote file")
    5913 -   let iskkeep= &l:isk
    5914 -   setl isk-=/
    5915 -   let &l:isk= iskkeep
    5916 -"   call Dredir("renamed buffer back to remote filename<".rfile."> : expand(%)<".expand("%").">","ls!")
    5917 -   let line1 = 1
    5918 -   let line2 = line("$")
    5919 -
    5920 -  elseif s:FileReadable(a:tfile)
    5921 -   " read file after current line
    5922 -"   call Decho("read file<".a:tfile."> after current line")
    5923 -   let curline = line(".")
    5924 -   let lastline= line("$")
    5925 -"   call Decho("exe<".a:readcmd." ".fnameescape(v:cmdarg)." ".fnameescape(a:tfile).">  line#".curline)
    5926 -   exe "keepj ".a:readcmd." ".fnameescape(v:cmdarg)." ".fnameescape(a:tfile)
    5927 -   let line1= curline + 1
    5928 -   let line2= line("$") - lastline + 1
    5929 -
    5930 +  let curbufname= expand("%")
    5931 +"  call Decho("curbufname<".curbufname.">")
    5932 +  if &binary
    5933 +   " For binary writes, always write entire file.
    5934 +   " (line numbers don't really make sense for that).
    5935 +   " Also supports the writing of tar and zip files.
    5936 +"   call Decho("(write entire file) sil exe w! ".fnameescape(v:cmdarg)." ".fnameescape(tmpfile))
    5937 +   exe "sil keepj w! ".fnameescape(v:cmdarg)." ".fnameescape(tmpfile)
    5938 +  elseif g:netrw_cygwin
    5939 +   " write (selected portion of) file to temporary
    5940 +   let cygtmpfile= substitute(tmpfile,g:netrw_cygdrive.'/\(.\)','\1:','')
    5941 +"   call Decho("(write selected portion) sil exe ".a:firstline."," . a:lastline . "w! ".fnameescape(v:cmdarg)." ".fnameescape(cygtmpfile))
    5942 +   exe "sil keepj ".a:firstline."," . a:lastline . "w! ".fnameescape(v:cmdarg)." ".fnameescape(cygtmpfile)
    5943    else
    5944 -   " not readable
    5945 -"   call Decho("(NetrwGetFile)  ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
    5946 -"   call Decho("tfile<".a:tfile."> not readable")
    5947 -   keepj call netrw#ErrorMsg(s:WARNING,"file <".a:tfile."> not readable",9)
    5948 -"   call Dret("NetrwGetFile : tfile<".a:tfile."> not readable")
    5949 -   return
    5950 +   " write (selected portion of) file to temporary
    5951 +"   call Decho("(write selected portion) sil exe ".a:firstline."," . a:lastline . "w! ".fnameescape(v:cmdarg)." ".fnameescape(tmpfile))
    5952 +   exe "sil keepj ".a:firstline."," . a:lastline . "w! ".fnameescape(v:cmdarg)." ".fnameescape(tmpfile)
    5953    endif
    5954  
    5955 -  " User-provided (ie. optional) fix-it-up command
    5956 -  if exists("*NetReadFixup")
    5957 -"   call Decho("calling NetReadFixup(method<".a:method."> line1=".line1." line2=".line2.")")
    5958 -   keepj call NetReadFixup(a:method, line1, line2)
    5959 -"  else " Decho
    5960 -"   call Decho("NetReadFixup() not called, doesn't exist  (line1=".line1." line2=".line2.")")
    5961 +  if curbufname == ""
    5962 +   " when the file is [No Name], and one attempts to Nwrite it, the buffer takes
    5963 +   " on the temporary file's name.  Deletion of the temporary file during
    5964 +   " cleanup then causes an error message.
    5965 +   0file!
    5966    endif
    5967  
    5968 -  if has("gui") && has("menu") && has("gui_running") && &go =~# 'm' && g:netrw_menu
    5969 -   " update the Buffers menu
    5970 -   keepj call s:UpdateBuffersMenu()
    5971 -  endif
    5972 +  " NetWrite: while choice loop: {{{3
    5973 +  while ichoice <= a:0
    5974  
    5975 -"  call Decho("readcmd<".a:readcmd."> cmdarg<".v:cmdarg."> tfile<".a:tfile."> readable=".s:FileReadable(a:tfile))
    5976 +   " Process arguments: {{{4
    5977 +   " attempt to repeat with previous host-file-etc
    5978 +   if exists("b:netrw_lastfile") && a:0 == 0
    5979 +"    call Decho("using b:netrw_lastfile<" . b:netrw_lastfile . ">")
    5980 +    let choice = b:netrw_lastfile
    5981 +    let ichoice= ichoice + 1
    5982 +   else
    5983 +    exe "let choice= a:" . ichoice
    5984  
    5985 - " make sure file is being displayed
    5986 -"  redraw!
    5987 +    " Reconstruct Choice when choice starts with '"'
    5988 +    if match(choice,"?") == 0
    5989 +     echomsg 'NetWrite Usage:"'
    5990 +     echomsg ':Nwrite machine:path                        uses rcp'
    5991 +     echomsg ':Nwrite "machine path"                      uses ftp with <.netrc>'
    5992 +     echomsg ':Nwrite "machine id password path"          uses ftp'
    5993 +     echomsg ':Nwrite dav://[user@]machine/path           uses cadaver'
    5994 +     echomsg ':Nwrite fetch://[user@]machine/path         uses fetch'
    5995 +     echomsg ':Nwrite ftp://machine[#port]/path           uses ftp  (autodetects <.netrc>)'
    5996 +     echomsg ':Nwrite rcp://machine/path                  uses rcp'
    5997 +     echomsg ':Nwrite rsync://[user@]machine/path         uses rsync'
    5998 +     echomsg ':Nwrite scp://[user@]machine[[:#]port]/path uses scp'
    5999 +     echomsg ':Nwrite sftp://[user@]machine/path          uses sftp'
    6000 +     sleep 4
    6001 +     break
    6002  
    6003 -"  call Decho("(NetrwGetFile)  ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
    6004 -"  call Dret("NetrwGetFile")
    6005 -endfun
    6006 +    elseif match(choice,"^\"") != -1
    6007 +     if match(choice,"\"$") != -1
    6008 +       " case "..."
    6009 +      let choice=strpart(choice,1,strlen(choice)-2)
    6010 +     else
    6011 +      "  case "... ... ..."
    6012 +      let choice      = strpart(choice,1,strlen(choice)-1)
    6013 +      let wholechoice = ""
    6014  
    6015 -" ------------------------------------------------------------------------
    6016 -" s:NetrwMethod:  determine method of transfer {{{2
    6017 -" Input:
    6018 -"   choice = url   [protocol:]//[userid@]hostname[:port]/[path-to-file]
    6019 -" Output:
    6020 -"  b:netrw_method= 1: rcp                                             
    6021 -"                  2: ftp + <.netrc>                                 
    6022 -"                 3: ftp + machine, id, password, and [path]filename
    6023 -"                 4: scp                                             
    6024 -"                 5: http[s] (wget)                                     
    6025 -"                 6: dav
    6026 -"                 7: rsync                                           
    6027 -"                 8: fetch                                           
    6028 -"                 9: sftp                                           
    6029 -"  g:netrw_machine= hostname
    6030 -"  b:netrw_fname  = filename
    6031 -"  g:netrw_port   = optional port number (for ftp)
    6032 -"  g:netrw_choice = copy of input url (choice)
    6033 -fun! s:NetrwMethod(choice)
    6034 -"   call Dfunc("NetrwMethod(a:choice<".a:choice.">)")
    6035 +      while match(choice,"\"$") == -1
    6036 +       let wholechoice= wholechoice . " " . choice
    6037 +       let ichoice    = ichoice + 1
    6038 +       if choice > a:0
    6039 +               if !exists("g:netrw_quiet")
    6040 +        call netrw#ErrorMsg(s:ERROR,"Unbalanced string in filename '". wholechoice ."'",13)
    6041 +       endif
    6042 +"        call Dret("netrw#NetWrite")
    6043 +        return
    6044 +       endif
    6045 +       let choice= a:{ichoice}
    6046 +      endwhile
    6047 +      let choice= strpart(wholechoice,1,strlen(wholechoice)-1) . " " . strpart(choice,0,strlen(choice)-1)
    6048 +     endif
    6049 +    endif
    6050 +   endif
    6051 +   let ichoice= ichoice + 1
    6052 +"   call Decho("choice<" . choice . "> ichoice=".ichoice)
    6053  
    6054 -   " sanity check: choice should have at least three slashes in it
    6055 -   if strlen(substitute(a:choice,'[^/]','','g')) < 3
    6056 -    call netrw#ErrorMsg(s:ERROR,"not a netrw-style url; netrw uses protocol://[user@]hostname[:port]/[path])",78)
    6057 -    let b:netrw_method = -1
    6058 -"    call Dret("NetrwMethod : incorrect url format<".a:choice.">")
    6059 +   " Determine method of write (ftp, rcp, etc) {{{4
    6060 +   keepj call s:NetrwMethod(choice)
    6061 +   if !exists("b:netrw_method") || b:netrw_method < 0
    6062 +"    call Dfunc("netrw#NetWrite : unsupported method")
    6063      return
    6064     endif
    6065  
    6066 -   " record current g:netrw_machine, if any
    6067 -   " curmachine used if protocol == ftp and no .netrc
    6068 -   if exists("g:netrw_machine")
    6069 -    let curmachine= g:netrw_machine
    6070 -"    call Decho("curmachine<".curmachine.">")
    6071 -   else
    6072 -    let curmachine= "N O T A HOST"
    6073 -   endif
    6074 -   if exists("g:netrw_port")
    6075 -    let netrw_port= g:netrw_port
    6076 +   " =============
    6077 +   " NetWrite: Perform Protocol-Based Write {{{3
    6078 +   " ============================
    6079 +   if exists("g:netrw_silent") && g:netrw_silent == 0 && &ch >= 1
    6080 +    echo "(netrw) Processing your write request..."
    6081 +"    call Decho("(netrw) Processing your write request...")
    6082     endif
    6083  
    6084 -   " insure that netrw_ftp_cmd starts off every method determination
    6085 -   " with the current g:netrw_ftp_cmd
    6086 -   let s:netrw_ftp_cmd= g:netrw_ftp_cmd
    6087 +   ".........................................
    6088 +   " NetWrite: (rcp) NetWrite Method #1 {{{3
    6089 +   if  b:netrw_method == 1
    6090 +"    call Decho("write via rcp (method #1)")
    6091 +    if s:netrw_has_nt_rcp == 1
    6092 +     if exists("g:netrw_uid") &&  ( g:netrw_uid != "" )
    6093 +      let uid_machine = g:netrw_machine .'.'. g:netrw_uid
    6094 +     else
    6095 +      let uid_machine = g:netrw_machine .'.'. $USERNAME
    6096 +     endif
    6097 +    else
    6098 +     if exists("g:netrw_uid") &&  ( g:netrw_uid != "" )
    6099 +      let uid_machine = g:netrw_uid .'@'. g:netrw_machine
    6100 +     else
    6101 +      let uid_machine = g:netrw_machine
    6102 +     endif
    6103 +    endif
    6104 +"    call Decho("executing: !".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".shellescape(tmpfile,1)." ".shellescape(uid_machine.":".b:netrw_fname,1))
    6105 +    exe s:netrw_silentxfer."!".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".shellescape(tmpfile,1)." ".shellescape(uid_machine.":".b:netrw_fname,1)
    6106 +    let b:netrw_lastfile = choice
    6107  
    6108 -  " initialization
    6109 -  let b:netrw_method  = 0
    6110 -  let g:netrw_machine = ""
    6111 -  let b:netrw_fname   = ""
    6112 -  let g:netrw_port    = ""
    6113 -  let g:netrw_choice  = a:choice
    6114 +   ".........................................
    6115 +   " NetWrite: (ftp + <.netrc>) NetWrite Method #2 {{{3
    6116 +   elseif b:netrw_method == 2
    6117 +"    call Decho("write via ftp+.netrc (method #2)")
    6118 +    let netrw_fname = b:netrw_fname
    6119  
    6120 -  " Patterns:
    6121 -  " mipf     : a:machine a:id password filename             Use ftp
    6122 -  " mf     : a:machine filename                     Use ftp + <.netrc> or g:netrw_uid s:netrw_passwd
    6123 -  " ftpurm   : ftp://[user@]host[[#:]port]/filename  Use ftp + <.netrc> or g:netrw_uid s:netrw_passwd
    6124 -  " rcpurm   : rcp://[user@]host/filename           Use rcp
    6125 -  " rcphf    : [user@]host:filename                 Use rcp
    6126 -  " scpurm   : scp://[user@]host[[#:]port]/filename  Use scp
    6127 -  " httpurm  : http[s]://[user@]host/filename       Use wget
    6128 -  " davurm   : dav[s]://host[:port]/path             Use cadaver/curl
    6129 -  " rsyncurm : rsync://host[:port]/path              Use rsync
    6130 -  " fetchurm : fetch://[user@]host[:http]/filename   Use fetch (defaults to ftp, override for http)
    6131 -  " sftpurm  : sftp://[user@]host/filename  Use scp
    6132 -  let mipf     = '^\(\S\+\)\s\+\(\S\+\)\s\+\(\S\+\)\s\+\(\S\+\)$'
    6133 -  let mf       = '^\(\S\+\)\s\+\(\S\+\)$'
    6134 -"  let ftpurm   = '^ftp://\(\([^/@]\{-}\)@\)\=\([^/#:]\{-}\)\([#:]\d\+\)\=/\(.*\)$'
    6135 -"  let rcpurm   = '^rcp://\%(\([^/@]\{-}\)@\)\=\([^/]\{-}\)/\(.*\)$'
    6136 -"  let fetchurm = '^fetch://\(\([^/@]\{-}\)@\)\=\([^/#:]\{-}\)\(:http\)\=/\(.*\)$'
    6137 -  let ftpurm   = '^ftp://\(\([^/]*\)@\)\=\([^/#:]\{-}\)\([#:]\d\+\)\=/\(.*\)$'
    6138 -  let rcpurm   = '^rcp://\%(\([^/]*\)@\)\=\([^/]\{-}\)/\(.*\)$'
    6139 -  let rcphf    = '^\(\(\h\w*\)@\)\=\(\h\w*\):\([^@]\+\)$'
    6140 -  let scpurm   = '^scp://\([^/#:]\+\)\%([#:]\(\d\+\)\)\=/\(.*\)$'
    6141 -  let httpurm  = '^https\=://\([^/]\{-}\)\(/.*\)\=$'
    6142 -  let davurm   = '^davs\=://\([^/]\+\)/\(.*/\)\([-_.~[:alnum:]]\+\)$'
    6143 -  let rsyncurm = '^rsync://\([^/]\{-}\)/\(.*\)\=$'
    6144 -  let fetchurm = '^fetch://\(\([^/]*\)@\)\=\([^/#:]\{-}\)\(:http\)\=/\(.*\)$'
    6145 -  let sftpurm  = '^sftp://\([^/]\{-}\)/\(.*\)\=$'
    6146 +    " formerly just a "new...bd!", that changed the window sizes when equalalways.  Using enew workaround instead
    6147 +    let bhkeep      = &l:bh
    6148 +    let curbuf      = bufnr("%")
    6149 +    setl bh=hide
    6150 +    keepalt enew
    6151  
    6152 -"  call Decho("determine method:")
    6153 -  " Determine Method
    6154 -  " Method#1: rcp://user@hostname/...path-to-file {{{3
    6155 -  if match(a:choice,rcpurm) == 0
    6156 -"   call Decho("rcp://...")
    6157 -   let b:netrw_method  = 1
    6158 -   let userid          = substitute(a:choice,rcpurm,'\1',"")
    6159 -   let g:netrw_machine = substitute(a:choice,rcpurm,'\2',"")
    6160 -   let b:netrw_fname   = substitute(a:choice,rcpurm,'\3',"")
    6161 -   if userid != ""
    6162 -    let g:netrw_uid= userid
    6163 -   endif
    6164 -
    6165 -  " Method#4: scp://user@hostname/...path-to-file {{{3
    6166 -  elseif match(a:choice,scpurm) == 0
    6167 -"   call Decho("scp://...")
    6168 -   let b:netrw_method  = 4
    6169 -   let g:netrw_machine = substitute(a:choice,scpurm,'\1',"")
    6170 -   let g:netrw_port    = substitute(a:choice,scpurm,'\2',"")
    6171 -   let b:netrw_fname   = substitute(a:choice,scpurm,'\3',"")
    6172 +"    call Decho("filter input window#".winnr())
    6173 +    setl ff=unix
    6174 +    keepj put =g:netrw_ftpmode
    6175 +"    call Decho("filter input: ".getline('$'))
    6176 +    if exists("g:netrw_ftpextracmd")
    6177 +     keepj put =g:netrw_ftpextracmd
    6178 +"     call Decho("filter input: ".getline("$"))
    6179 +    endif
    6180 +    keepj call setline(line("$")+1,'put "'.tmpfile.'" "'.netrw_fname.'"')
    6181 +"    call Decho("filter input: ".getline("$"))
    6182 +    if exists("g:netrw_port") && g:netrw_port != ""
    6183 +"     call Decho("executing: %!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1))
    6184 +     exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1)
    6185 +    else
    6186 +"     call Decho("filter input window#".winnr())
    6187 +"     call Decho("executing: %!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1))
    6188 +     exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)
    6189 +    endif
    6190 +    " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar)
    6191 +    if getline(1) !~ "^$"
    6192 +     if !exists("g:netrw_quiet")
    6193 +      keepj call netrw#ErrorMsg(s:ERROR,getline(1),14)
    6194 +     endif
    6195 +     let mod=1
    6196 +    endif
    6197  
    6198 -  " Method#5: http[s]://user@hostname/...path-to-file {{{3
    6199 -  elseif match(a:choice,httpurm) == 0
    6200 -"   call Decho("http://...")
    6201 -   let b:netrw_method = 5
    6202 -   let g:netrw_machine= substitute(a:choice,httpurm,'\1',"")
    6203 -   let b:netrw_fname  = substitute(a:choice,httpurm,'\2',"")
    6204 +    " remove enew buffer (quietly)
    6205 +    let filtbuf= bufnr("%")
    6206 +    exe curbuf."b!"
    6207 +    let &l:bh            = bhkeep
    6208 +    exe filtbuf."bw!"
    6209  
    6210 -  " Method#6: dav://hostname[:port]/..path-to-file.. {{{3
    6211 -  elseif match(a:choice,davurm) == 0
    6212 -"   call Decho("dav://...")
    6213 -   let b:netrw_method= 6
    6214 -   if a:choice =~ 'davs:'
    6215 -    let g:netrw_machine= 'https://'.substitute(a:choice,davurm,'\1/\2',"")
    6216 -   else
    6217 -    let g:netrw_machine= 'http://'.substitute(a:choice,davurm,'\1/\2',"")
    6218 -   endif
    6219 -   let b:netrw_fname  = substitute(a:choice,davurm,'\3',"")
    6220 +    let b:netrw_lastfile = choice
    6221  
    6222 -   " Method#7: rsync://user@hostname/...path-to-file {{{3
    6223 -  elseif match(a:choice,rsyncurm) == 0
    6224 -"   call Decho("rsync://...")
    6225 -   let b:netrw_method = 7
    6226 -   let g:netrw_machine= substitute(a:choice,rsyncurm,'\1',"")
    6227 -   let b:netrw_fname  = substitute(a:choice,rsyncurm,'\2',"")
    6228 +   ".........................................
    6229 +   " NetWrite: (ftp + machine, id, passwd, filename) NetWrite Method #3 {{{3
    6230 +   elseif b:netrw_method == 3
    6231 +    " Construct execution string (three or more lines) which will be passed through filter
    6232 +"    call Decho("read via ftp+mipf (method #3)")
    6233 +    let netrw_fname = b:netrw_fname
    6234 +    let bhkeep      = &l:bh
    6235  
    6236 -   " Methods 2,3: ftp://[user@]hostname[[:#]port]/...path-to-file {{{3
    6237 -  elseif match(a:choice,ftpurm) == 0
    6238 -"   call Decho("ftp://...")
    6239 -   let userid        = substitute(a:choice,ftpurm,'\2',"")
    6240 -   let g:netrw_machine= substitute(a:choice,ftpurm,'\3',"")
    6241 -   let g:netrw_port   = substitute(a:choice,ftpurm,'\4',"")
    6242 -   let b:netrw_fname  = substitute(a:choice,ftpurm,'\5',"")
    6243 -"   call Decho("g:netrw_machine<".g:netrw_machine.">")
    6244 -   if userid != ""
    6245 -    let g:netrw_uid= userid
    6246 -   endif
    6247 +    " formerly just a "new...bd!", that changed the window sizes when equalalways.  Using enew workaround instead
    6248 +    let curbuf      = bufnr("%")
    6249 +    setl bh=hide
    6250 +    keepalt enew
    6251 +    setl ff=unix
    6252  
    6253 -   if curmachine != g:netrw_machine
    6254 -    if exists("s:netwr_hup[".g:netrw_machine."]")
    6255 -     call NetUserPass("ftp:".g:netrw_machine)
    6256 -    elseif exists("s:netrw_passwd")
    6257 -     " if there's a change in hostname, require password re-entry
    6258 -     unlet s:netrw_passwd
    6259 +    if exists("g:netrw_port") && g:netrw_port != ""
    6260 +     keepj put ='open '.g:netrw_machine.' '.g:netrw_port
    6261 +"     call Decho("filter input: ".getline('.'))
    6262 +    else
    6263 +     keepj put ='open '.g:netrw_machine
    6264 +"     call Decho("filter input: ".getline('.'))
    6265      endif
    6266 -    if exists("netrw_port")
    6267 -     unlet netrw_port
    6268 +    if exists("g:netrw_uid") && g:netrw_uid != ""
    6269 +     if exists("g:netrw_ftp") && g:netrw_ftp == 1
    6270 +      keepj put =g:netrw_uid
    6271 +"      call Decho("filter input: ".getline('.'))
    6272 +      if exists("s:netrw_passwd") && s:netrw_passwd != ""
    6273 +       keepj put ='\"'.s:netrw_passwd.'\"'
    6274 +      endif
    6275 +"      call Decho("filter input: ".getline('.'))
    6276 +     elseif exists("s:netrw_passwd") && s:netrw_passwd != ""
    6277 +      keepj put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"'
    6278 +"      call Decho("filter input: ".getline('.'))
    6279 +     endif
    6280      endif
    6281 -   endif
    6282 -
    6283 -   if exists("g:netrw_uid") && exists("s:netrw_passwd")
    6284 -    let b:netrw_method = 3
    6285 -   else
    6286 -    let host= substitute(g:netrw_machine,'\..*$','','')
    6287 -    if exists("s:netrw_hup[host]")
    6288 -     call NetUserPass("ftp:".host)
    6289 +    keepj put =g:netrw_ftpmode
    6290 +"    call Decho("filter input: ".getline('$'))
    6291 +    if exists("g:netrw_ftpextracmd")
    6292 +     keepj put =g:netrw_ftpextracmd
    6293 +"     call Decho("filter input: ".getline("$"))
    6294 +    endif
    6295 +    keepj put ='put \"'.tmpfile.'\" \"'.netrw_fname.'\"'
    6296 +"    call Decho("filter input: ".getline('.'))
    6297 +    " save choice/id/password for future use
    6298 +    let b:netrw_lastfile = choice
    6299  
    6300 -    elseif (has("win32") || has("win95") || has("win64") || has("win16")) && s:netrw_ftp_cmd =~ '-[sS]:'
    6301 -"     call Decho("has -s: : s:netrw_ftp_cmd<".s:netrw_ftp_cmd.">")
    6302 -"     call Decho("          g:netrw_ftp_cmd<".g:netrw_ftp_cmd.">")
    6303 -     if g:netrw_ftp_cmd =~ '-[sS]:\S*MACHINE\>'
    6304 -      let s:netrw_ftp_cmd= substitute(g:netrw_ftp_cmd,'\<MACHINE\>',g:netrw_machine,'')
    6305 -"      call Decho("s:netrw_ftp_cmd<".s:netrw_ftp_cmd.">")
    6306 -     endif
    6307 -     let b:netrw_method= 2
    6308 -    elseif s:FileReadable(expand("$HOME/.netrc")) && !g:netrw_ignorenetrc
    6309 -"     call Decho("using <".expand("$HOME/.netrc")."> (readable)")
    6310 -     let b:netrw_method= 2
    6311 -    else
    6312 -     if !exists("g:netrw_uid") || g:netrw_uid == ""
    6313 -      call NetUserPass()
    6314 -     elseif !exists("s:netrw_passwd") || s:netrw_passwd == ""
    6315 -      call NetUserPass(g:netrw_uid)
    6316 -    " else just use current g:netrw_uid and s:netrw_passwd
    6317 +    " perform ftp:
    6318 +    " -i       : turns off interactive prompting from ftp
    6319 +    " -n  unix : DON'T use <.netrc>, even though it exists
    6320 +    " -n  win32: quit being obnoxious about password
    6321 +    keepj norm! 1Gdd
    6322 +"    call Decho("executing: %!".s:netrw_ftp_cmd." ".g:netrw_ftp_options)
    6323 +    exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." ".g:netrw_ftp_options
    6324 +    " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar)
    6325 +    if getline(1) !~ "^$"
    6326 +     if  !exists("g:netrw_quiet")
    6327 +      call netrw#ErrorMsg(s:ERROR,getline(1),15)
    6328       endif
    6329 -     let b:netrw_method= 3
    6330 +     let mod=1
    6331      endif
    6332 -   endif
    6333  
    6334 -  " Method#8: fetch {{{3
    6335 -  elseif match(a:choice,fetchurm) == 0
    6336 -"   call Decho("fetch://...")
    6337 -   let b:netrw_method = 8
    6338 -   let g:netrw_userid = substitute(a:choice,fetchurm,'\2',"")
    6339 -   let g:netrw_machine= substitute(a:choice,fetchurm,'\3',"")
    6340 -   let b:netrw_option = substitute(a:choice,fetchurm,'\4',"")
    6341 -   let b:netrw_fname  = substitute(a:choice,fetchurm,'\5',"")
    6342 +    " remove enew buffer (quietly)
    6343 +    let filtbuf= bufnr("%")
    6344 +    exe curbuf."b!"
    6345 +    let &l:bh= bhkeep
    6346 +    exe filtbuf."bw!"
    6347  
    6348 -   " Method#3: Issue an ftp : "machine id password [path/]filename" {{{3
    6349 -  elseif match(a:choice,mipf) == 0
    6350 -"   call Decho("(ftp) host id pass file")
    6351 -   let b:netrw_method  = 3
    6352 -   let g:netrw_machine = substitute(a:choice,mipf,'\1',"")
    6353 -   let g:netrw_uid     = substitute(a:choice,mipf,'\2',"")
    6354 -   let s:netrw_passwd  = substitute(a:choice,mipf,'\3',"")
    6355 -   let b:netrw_fname   = substitute(a:choice,mipf,'\4',"")
    6356 -   call NetUserPass(g:netrw_machine,g:netrw_uid,s:netrw_passwd)
    6357 +   ".........................................
    6358 +   " NetWrite: (scp) NetWrite Method #4 {{{3
    6359 +   elseif     b:netrw_method == 4
    6360 +"    call Decho("write via scp (method #4)")
    6361 +    if exists("g:netrw_port") && g:netrw_port != ""
    6362 +     let useport= " ".g:netrw_scpport." ".fnameescape(g:netrw_port)
    6363 +    else
    6364 +     let useport= ""
    6365 +    endif
    6366 +"    call Decho("exe ".s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".shellescape(tmpfile,1)." ".shellescape(g:netrw_machine.":".b:netrw_fname,1))
    6367 +    exe s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".shellescape(tmpfile,1)." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)
    6368 +    let b:netrw_lastfile = choice
    6369  
    6370 -  " Method#3: Issue an ftp: "hostname [path/]filename" {{{3
    6371 -  elseif match(a:choice,mf) == 0
    6372 -"   call Decho("(ftp) host file")
    6373 -   if exists("g:netrw_uid") && exists("s:netrw_passwd")
    6374 -    let b:netrw_method  = 3
    6375 -    let g:netrw_machine = substitute(a:choice,mf,'\1',"")
    6376 -    let b:netrw_fname   = substitute(a:choice,mf,'\2',"")
    6377 +   ".........................................
    6378 +   " NetWrite: (http) NetWrite Method #5 {{{3
    6379 +   elseif     b:netrw_method == 5
    6380 +"    call Decho("write via http (method #5)")
    63815143+    let curl= substitute(g:netrw_http_put_cmd,'\s\+.*$',"","")
    63825144+    if executable(curl)
     
    63865148+    elseif !exists("g:netrw_quiet")
    63875149+     call netrw#ErrorMsg(s:ERROR,"can't write to http using <".g:netrw_http_put_cmd".">".",16)
    6388 +    endif
    6389  
    6390 -   elseif s:FileReadable(expand("$HOME/.netrc"))
    6391 -    let b:netrw_method  = 2
    6392 -    let g:netrw_machine = substitute(a:choice,mf,'\1',"")
    6393 -    let b:netrw_fname   = substitute(a:choice,mf,'\2',"")
    6394 -   endif
    6395 +   ".........................................
    6396 +   " NetWrite: (dav) NetWrite Method #6 (cadaver) {{{3
    6397 +   elseif     b:netrw_method == 6
    6398 +"    call Decho("write via cadaver (method #6)")
    6399  
    6400 -  " Method#9: sftp://user@hostname/...path-to-file {{{3
    6401 -  elseif match(a:choice,sftpurm) == 0
    6402 -"   call Decho("sftp://...")
    6403 -   let b:netrw_method = 9
    6404 -   let g:netrw_machine= substitute(a:choice,sftpurm,'\1',"")
    6405 -   let b:netrw_fname  = substitute(a:choice,sftpurm,'\2',"")
    6406 +    " Construct execution string (four lines) which will be passed through filter
    6407 +    let netrw_fname = escape(b:netrw_fname,g:netrw_fname_escape)
    6408 +    let bhkeep      = &l:bh
    6409  
    6410 -  " Method#1: Issue an rcp: hostname:filename"  (this one should be last) {{{3
    6411 -  elseif match(a:choice,rcphf) == 0
    6412 -"   call Decho("(rcp) [user@]host:file) rcphf<".rcphf.">")
    6413 -   let b:netrw_method  = 1
    6414 -   let userid          = substitute(a:choice,rcphf,'\2',"")
    6415 -   let g:netrw_machine = substitute(a:choice,rcphf,'\3',"")
    6416 -   let b:netrw_fname   = substitute(a:choice,rcphf,'\4',"")
    6417 -"   call Decho('\1<'.substitute(a:choice,rcphf,'\1',"").">")
    6418 -"   call Decho('\2<'.substitute(a:choice,rcphf,'\2',"").">")
    6419 -"   call Decho('\3<'.substitute(a:choice,rcphf,'\3',"").">")
    6420 -"   call Decho('\4<'.substitute(a:choice,rcphf,'\4',"").">")
    6421 -   if userid != ""
    6422 -    let g:netrw_uid= userid
    6423 -   endif
    6424 +    " formerly just a "new...bd!", that changed the window sizes when equalalways.  Using enew workaround instead
    6425 +    let curbuf      = bufnr("%")
    6426 +    setl bh=hide
    6427 +    keepalt enew
    6428  
    6429 -  " Cannot Determine Method {{{3
    6430 -  else
    6431 -   if !exists("g:netrw_quiet")
    6432 -    call netrw#ErrorMsg(s:WARNING,"cannot determine method (format: protocol://[user@]hostname[:port]/[path])",45)
    6433 -   endif
    6434 -   let b:netrw_method  = -1
    6435 -  endif
    6436 -  "}}}3
    6437 +    setl ff=unix
    6438 +    if exists("g:netrw_port") && g:netrw_port != ""
    6439 +     keepj put ='open '.g:netrw_machine.' '.g:netrw_port
    6440 +    else
    6441 +     keepj put ='open '.g:netrw_machine
    6442 +    endif
    6443 +    if exists("g:netrw_uid") && exists("s:netrw_passwd") && g:netrw_uid != ""
    6444 +     keepj put ='user '.g:netrw_uid.' '.s:netrw_passwd
    6445 +    endif
    6446 +    keepj put ='put '.tmpfile.' '.netrw_fname
    6447  
    6448 -  if g:netrw_port != ""
    6449 -   " remove any leading [:#] from port number
    6450 -   let g:netrw_port = substitute(g:netrw_port,'[#:]\+','','')
    6451 -  elseif exists("netrw_port")
    6452 -   " retain port number as implicit for subsequent ftp operations
    6453 -   let g:netrw_port= netrw_port
    6454 -  endif
    6455 +    " perform cadaver operation:
    6456 +    keepj norm! 1Gdd
    6457 +"    call Decho("executing: %!".g:netrw_dav_cmd)
    6458 +    exe s:netrw_silentxfer."%!".g:netrw_dav_cmd
    6459  
    6460 -"  call Decho("a:choice       <".a:choice.">")
    6461 -"  call Decho("b:netrw_method <".b:netrw_method.">")
    6462 -"  call Decho("g:netrw_machine<".g:netrw_machine.">")
    6463 -"  call Decho("g:netrw_port   <".g:netrw_port.">")
    6464 -"  if exists("g:netrw_uid")            "Decho
    6465 -"   call Decho("g:netrw_uid    <".g:netrw_uid.">")
    6466 -"  endif                                       "Decho
    6467 -"  if exists("s:netrw_passwd")         "Decho
    6468 -"   call Decho("s:netrw_passwd <".s:netrw_passwd.">")
    6469 -"  endif                                       "Decho
    6470 -"  call Decho("b:netrw_fname  <".b:netrw_fname.">")
    6471 -"  call Dret("NetrwMethod : b:netrw_method=".b:netrw_method." g:netrw_port=".g:netrw_port)
    6472 -endfun
    6473 +    " remove enew buffer (quietly)
    6474 +    let filtbuf= bufnr("%")
    6475 +    exe curbuf."b!"
    6476 +    let &l:bh            = bhkeep
    6477 +    exe filtbuf."bw!"
    6478  
    6479 -" ------------------------------------------------------------------------
    6480 -" NetReadFixup: this sort of function is typically written by the user {{{2
    6481 -"               to handle extra junk that their system's ftp dumps
    6482 -"               into the transfer.  This function is provided as an
    6483 -"               example and as a fix for a Windows 95 problem: in my
    6484 -"               experience, win95's ftp always dumped four blank lines
    6485 -"               at the end of the transfer.
    6486 -if has("win95") && exists("g:netrw_win95ftp") && g:netrw_win95ftp
    6487 - fun! NetReadFixup(method, line1, line2)
    6488 -"   call Dfunc("NetReadFixup(method<".a:method."> line1=".a:line1." line2=".a:line2.")")
    6489 +    let b:netrw_lastfile = choice
    6490  
    6491 -   " sanity checks -- attempt to convert inputs to integers
    6492 -   let method = a:method + 0
    6493 -   let line1  = a:line1 + 0
    6494 -   let line2  = a:line2 + 0
    6495 -   if type(method) != 0 || type(line1) != 0 || type(line2) != 0 || method < 0 || line1 <= 0 || line2 <= 0
    6496 -"    call Dret("NetReadFixup")
    6497 -    return
    6498 -   endif
    6499 +   ".........................................
    6500 +   " NetWrite: (rsync) NetWrite Method #7 {{{3
    6501 +   elseif     b:netrw_method == 7
    6502 +"    call Decho("write via rsync (method #7)")
    6503 +"    call Decho("executing: !".g:netrw_rsync_cmd." ".shellescape(tmpfile,1)." ".shellescape(g:netrw_machine.":".b:netrw_fname,1))
    6504 +    exe s:netrw_silentxfer."!".g:netrw_rsync_cmd." ".shellescape(tmpfile,1)." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)
    6505 +    let b:netrw_lastfile = choice
    6506  
    6507 -   if method == 3   " ftp (no <.netrc>)
    6508 -    let fourblanklines= line2 - 3
    6509 -    if fourblanklines >= line1
    6510 -     exe "sil keepj ".fourblanklines.",".line2."g/^\s*$/d"
    6511 -     call histdel("/",-1)
    6512 +   ".........................................
    6513 +   " NetWrite: (sftp) NetWrite Method #9 {{{3
    6514 +   elseif     b:netrw_method == 9
    6515 +"    call Decho("write via sftp (method #9)")
    6516 +    let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape)
    6517 +    if exists("g:netrw_uid") &&  ( g:netrw_uid != "" )
    6518 +     let uid_machine = g:netrw_uid .'@'. g:netrw_machine
    6519 +    else
    6520 +     let uid_machine = g:netrw_machine
    65215150     endif
    6522 -   endif
    6523 -
    6524 -"   call Dret("NetReadFixup")
    6525 - endfun
    6526 -endif
    6527 -
    6528 -" ---------------------------------------------------------------------
    6529 -" NetUserPass: set username and password for subsequent ftp transfer {{{2
    6530 -"   Usage:  :call NetUserPass()                               -- will prompt for userid and password
    6531 -"          :call NetUserPass("uid")                   -- will prompt for password
    6532 -"          :call NetUserPass("uid","password")        -- sets global userid and password
    6533 -"          :call NetUserPass("ftp:host")              -- looks up userid and password using hup dictionary
    6534 -"          :call NetUserPass("host","uid","password") -- sets hup dictionary with host, userid, password
    6535 -fun! NetUserPass(...)
    6536  
    6537 -" call Dfunc("NetUserPass() a:0=".a:0)
    6538 +    " formerly just a "new...bd!", that changed the window sizes when equalalways.  Using enew workaround instead
    6539 +    let bhkeep = &l:bh
    6540 +    let curbuf = bufnr("%")
    6541 +    setl bh=hide
    6542 +    keepalt enew
    6543  
    6544 - if !exists('s:netrw_hup')
    6545 -  let s:netrw_hup= {}
    6546 - endif
    6547 +    setl ff=unix
    6548 +    call setline(1,'put "'.escape(tmpfile,'\').'" '.netrw_fname)
    6549 +"    call Decho("filter input: ".getline('.'))
    6550 +"    call Decho("executing: %!".g:netrw_sftp_cmd.' '.shellescape(uid_machine,1))
    6551 +    let sftpcmd= substitute(g:netrw_sftp_cmd,"%TEMPFILE%",escape(tmpfile,'\'),"g")
    6552 +    exe s:netrw_silentxfer."%!".sftpcmd.' '.shellescape(uid_machine,1)
    6553 +    let filtbuf= bufnr("%")
    6554 +    exe curbuf."b!"
    6555 +    let &l:bh            = bhkeep
    6556 +    exe filtbuf."bw!"
    6557 +    let b:netrw_lastfile = choice
    6558  
    6559 - if a:0 == 0
    6560 -  " case: no input arguments
    6561 +   ".........................................
    6562 +   " NetWrite: Complain {{{3
    6563 +   else
    6564 +    call netrw#ErrorMsg(s:WARNING,"unable to comply with your request<" . choice . ">",17)
    6565 +    let leavemod= 1
    6566 +   endif
    6567 +  endwhile
    6568  
    6569 -  " change host and username if not previously entered; get new password
    6570 -  if !exists("g:netrw_machine")
    6571 -   let g:netrw_machine= input('Enter hostname: ')
    6572 -  endif
    6573 -  if !exists("g:netrw_uid") || g:netrw_uid == ""
    6574 -   " get username (user-id) via prompt
    6575 -   let g:netrw_uid= input('Enter username: ')
    6576 +  " NetWrite: Cleanup: {{{3
    6577 +"  call Decho("cleanup")
    6578 +  if s:FileReadable(tmpfile)
    6579 +"   call Decho("tmpfile<".tmpfile."> readable, will now delete it")
    6580 +   call s:NetrwDelete(tmpfile)
    6581    endif
    6582 -  " get password via prompting
    6583 -  let s:netrw_passwd= inputsecret("Enter Password: ")
    6584 +  call s:NetrwOptionRestore("w:")
    6585  
    6586 -  " set up hup database
    6587 -  let host = substitute(g:netrw_machine,'\..*$','','')
    6588 -  if !exists('s:netrw_hup[host]')
    6589 -   let s:netrw_hup[host]= {}
    6590 +  if a:firstline == 1 && a:lastline == line("$")
    6591 +   " restore modifiability; usually equivalent to set nomod
    6592 +   let &mod= mod
     5151 
     5152    ".........................................
     5153@@ -2313,12 +2518,12 @@
     5154   if a:firstline == 1 && a:lastline == line("$")
     5155    " restore modifiability; usually equivalent to set nomod
     5156    let &mod= mod
     5157-"   call Decho("(NetWrite)  ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
    65935158+"   call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
    6594 +  elseif !exists("leavemod")
    6595 +   " indicate that the buffer has not been modified since last written
     5159   elseif !exists("leavemod")
     5160    " indicate that the buffer has not been modified since last written
     5161-"   call Decho("(NetWrite) set nomod")
     5162-   set nomod
     5163-"   call Decho("(NetWrite)  ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
    65965164+"   call Decho("set nomod")
    65975165+   setl nomod
    65985166+"   call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
    65995167   endif
    6600 -  let s:netrw_hup[host].uid    = g:netrw_uid
    6601 -  let s:netrw_hup[host].passwd = s:netrw_passwd
    6602  
    6603 - elseif a:0 == 1
    6604 -  " case: one input argument
    6605 -
    6606 -  if a:1 =~ '^ftp:'
    6607 -   " get host from ftp:... url
    6608 -   " access userid and password from hup (host-user-passwd) dictionary
    6609 -   let host = substitute(a:1,'^ftp:','','')
    6610 -   let host = substitute(host,'\..*','','')
    6611 -   if exists("s:netrw_hup[host]")
    6612 -    let g:netrw_uid    = s:netrw_hup[host].uid
    6613 -    let s:netrw_passwd = s:netrw_hup[host].passwd
    6614 -"    call Decho("get s:netrw_hup[".host."].uid   <".s:netrw_hup[host].uid.">")
    6615 -"    call Decho("get s:netrw_hup[".host."].passwd<".s:netrw_hup[host].passwd.">")
    6616 -   else
    6617 -    let g:netrw_uid    = input("Enter UserId: ")
    6618 -    let s:netrw_passwd = inputsecret("Enter Password: ")
    6619 -   endif
    6620 +"  call Dret("netrw#NetWrite")
    6621 +endfun
    6622  
    6623 +" ---------------------------------------------------------------------
    6624 +" netrw#NetSource: source a remotely hosted vim script {{{2
    6625 +" uses NetRead to get a copy of the file into a temporarily file,
    6626 +"              then sources that file,
    6627 +"              then removes that file.
    6628 +fun! netrw#NetSource(...)
    6629 +"  call Dfunc("netrw#NetSource() a:0=".a:0)
    6630 +  if a:0 > 0 && a:1 == '?'
    6631 +   " give help
    6632 +   echomsg 'NetSource Usage:'
    6633 +   echomsg ':Nsource dav://machine[:port]/path            uses cadaver'
    6634 +   echomsg ':Nsource fetch://machine/path                 uses fetch'
    6635 +   echomsg ':Nsource ftp://[user@]machine[:port]/path     uses ftp   autodetects <.netrc>'
    6636 +   echomsg ':Nsource http[s]://[user@]machine/path        uses http  wget'
    6637 +   echomsg ':Nsource rcp://[user@]machine/path            uses rcp'
    6638 +   echomsg ':Nsource rsync://machine[:port]/path          uses rsync'
    6639 +   echomsg ':Nsource scp://[user@]machine[[:#]port]/path  uses scp'
    6640 +   echomsg ':Nsource sftp://[user@]machine[[:#]port]/path uses sftp'
    6641 +   sleep 4
    6642    else
    6643 -   " case: one input argument, not an url.  Using it as a new user-id.
    6644 -   if exists("g:netrw_machine")
    6645 -    let host= substitute(g:netrw_machine,'\..*$','','')
    6646 -   else
    6647 -    let g:netrw_machine= input('Enter hostname: ')
    6648 -   endif
    6649 -   let g:netrw_uid = a:1
    6650 -"   call Decho("set g:netrw_uid= <".g:netrw_uid.">")
    6651 -   if exists("g:netrw_passwd")
    6652 -    " ask for password if one not previously entered
    6653 -    let s:netrw_passwd= g:netrw_passwd
    6654 -   else
    6655 -    let s:netrw_passwd = inputsecret("Enter Password: ")
    6656 -   endif
    6657 +   let i= 1
    6658 +   while i <= a:0
    6659 +    call netrw#NetRead(3,a:{i})
     5168 
     5169 "  call Dret("netrw#NetWrite")
     5170@@ -2347,11 +2552,11 @@
     5171    let i= 1
     5172    while i <= a:0
     5173     call netrw#NetRead(3,a:{i})
     5174-"    call Decho("(netrw#NetSource) s:netread_tmpfile<".s:netrw_tmpfile.">")
    66605175+"    call Decho("s:netread_tmpfile<".s:netrw_tmpfile.">")
    6661 +    if s:FileReadable(s:netrw_tmpfile)
     5176     if s:FileReadable(s:netrw_tmpfile)
     5177-"     call Decho("(netrw#NetSource) exe so ".fnameescape(s:netrw_tmpfile))
    66625178+"     call Decho("exe so ".fnameescape(s:netrw_tmpfile))
    6663 +     exe "so ".fnameescape(s:netrw_tmpfile)
     5179      exe "so ".fnameescape(s:netrw_tmpfile)
     5180-"     call Decho("(netrw#NetSource) delete(".s:netrw_tmpfile.")")
    66645181+"     call Decho("delete(".s:netrw_tmpfile.")")
    6665 +     call delete(s:netrw_tmpfile)
    6666 +     unlet s:netrw_tmpfile
    6667 +    else
    6668 +     call netrw#ErrorMsg(s:ERROR,"unable to source <".a:{i}.">!",48)
    6669 +    endif
    6670 +    let i= i + 1
    6671 +   endwhile
    6672    endif
    6673 +"  call Dret("netrw#NetSource")
    6674 +endfun
    6675  
    6676 -"  call Decho("host<".host.">")
    6677 -  if exists("host")
    6678 -   if !exists('s:netrw_hup[host]')
    6679 -    let s:netrw_hup[host]= {}
    6680 -   endif
    6681 -   let s:netrw_hup[host].uid    = g:netrw_uid
    6682 -   let s:netrw_hup[host].passwd = s:netrw_passwd
     5182      call delete(s:netrw_tmpfile)
     5183      unlet s:netrw_tmpfile
     5184     else
     5185@@ -2363,6 +2568,49 @@
     5186 "  call Dret("netrw#NetSource")
     5187 endfun
     5188 
    66835189+" ---------------------------------------------------------------------
    66845190+" netrw#SetTreetop: resets the tree top to the current directory/specified directory {{{2
     
    67205226+  else
    67215227+   call s:NetrwBrowse(islocal,s:NetrwBrowseChgDir(islocal,treedir))
    6722    endif
     5228+  endif
    67235229+"  call Dret("netrw#SetTreetop")
    67245230+endfun
    6725  
    6726 - elseif a:0 == 2
    6727 -  let g:netrw_uid    = a:1
    6728 -  let s:netrw_passwd = a:2
    6729 +" ===========================================
    6730 +" s:NetrwGetFile: Function to read temporary file "tfile" with command "readcmd". {{{2
    6731 +"    readcmd == %r : replace buffer with newly read file
    6732 +"            == 0r : read file at top of buffer
    6733 +"            == r  : read file after current line
    6734 +"            == t  : leave file in temporary form (ie. don't read into buffer)
    6735 +fun! s:NetrwGetFile(readcmd, tfile, method)
    6736 +"  call Dfunc("NetrwGetFile(readcmd<".a:readcmd.">,tfile<".a:tfile."> method<".a:method.">)")
    6737  
    6738 - elseif a:0 == 3
    6739 -  " enter hostname, user-id, and password into the hup dictionary
    6740 -  let host = substitute(a:1,'^\a\+:','','')
    6741 -  let host = substitute(host,'\..*$','','')
    6742 -  if !exists('s:netrw_hup[host]')
    6743 -   let s:netrw_hup[host]= {}
    6744 +  " readcmd=='t': simply do nothing
    6745 +  if a:readcmd == 't'
     5231+
     5232 " ===========================================
     5233 " s:NetrwGetFile: Function to read temporary file "tfile" with command "readcmd". {{{2
     5234 "    readcmd == %r : replace buffer with newly read file
     5235@@ -2374,7 +2622,7 @@
     5236 
     5237   " readcmd=='t': simply do nothing
     5238   if a:readcmd == 't'
     5239-"   call Decho("(NetrwGetFile)  ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
    67465240+"   call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
    6747 +"   call Dret("NetrwGetFile : skip read of <".a:tfile.">")
     5241 "   call Dret("NetrwGetFile : skip read of <".a:tfile.">")
     5242    return
     5243   endif
     5244@@ -2394,7 +2642,7 @@
     5245 
     5246    " rename the current buffer to the temp file (ie. tfile)
     5247    if g:netrw_cygwin
     5248-    let tfile= substitute(a:tfile,'/cygdrive/\(.\)','\1:','')
     5249+    let tfile= substitute(a:tfile,g:netrw_cygdrive.'/\(.\)','\1:','')
     5250    else
     5251     let tfile= a:tfile
     5252    endif
     5253@@ -2440,6 +2688,12 @@
     5254    let line1 = 1
     5255    let line2 = line("$")
     5256 
     5257+  elseif !&ma
     5258+   " attempting to read a file after the current line in the file, but the buffer is not modifiable
     5259+   keepj call netrw#ErrorMsg(s:WARNING,"attempt to read<".a:tfile."> into a non-modifiable buffer!",94)
     5260+"   call Dret("NetrwGetFile : attempt to read<".a:tfile."> into a non-modifiable buffer!")
    67485261+   return
    6749    endif
    6750 -  let s:netrw_hup[host].uid    = a:2
    6751 -  let s:netrw_hup[host].passwd = a:3
    6752 -  let g:netrw_uid              = s:netrw_hup[host].uid
    6753 -  let s:netrw_passwd           = s:netrw_hup[host].passwd
    6754 -"  call Decho("set s:netrw_hup[".host."].uid   <".s:netrw_hup[host].uid.">")
    6755 -"  call Decho("set s:netrw_hup[".host."].passwd<".s:netrw_hup[host].passwd.">")
    6756 - endif
    6757  
    6758 -" call Dret("NetUserPass : uid<".g:netrw_uid."> passwd<".s:netrw_passwd.">")
    6759 -endfun
    6760 +  " get name of remote filename (ie. url and all)
    6761 +  let rfile= bufname("%")
    6762 +"  call Decho("rfile<".rfile.">")
    6763  
    6764 -" ===========================================
    6765 -"  Shared Browsing Support:    {{{1
    6766 -" ===========================================
    6767 +  if exists("*NetReadFixup")
    6768 +   " for the use of NetReadFixup (not otherwise used internally)
    6769 +   let line2= line("$")
    6770 +  endif
    6771  
    6772 -" ---------------------------------------------------------------------
     5262+
     5263   elseif s:FileReadable(a:tfile)
     5264    " read file after current line
     5265 "   call Decho("read file<".a:tfile."> after current line")
     5266@@ -2452,7 +2706,7 @@
     5267 
     5268   else
     5269    " not readable
     5270-"   call Decho("(NetrwGetFile)  ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
     5271+"   call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
     5272 "   call Decho("tfile<".a:tfile."> not readable")
     5273    keepj call netrw#ErrorMsg(s:WARNING,"file <".a:tfile."> not readable",9)
     5274 "   call Dret("NetrwGetFile : tfile<".a:tfile."> not readable")
     5275@@ -2477,7 +2731,7 @@
     5276  " make sure file is being displayed
     5277 "  redraw!
     5278 
     5279-"  call Decho("(NetrwGetFile)  ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
     5280+"  call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
     5281 "  call Dret("NetrwGetFile")
     5282 endfun
     5283 
     5284@@ -2583,10 +2837,11 @@
     5285 
     5286   " Method#5: http[s]://user@hostname/...path-to-file {{{3
     5287   elseif match(a:choice,httpurm) == 0
     5288-"   call Decho("http://...")
     5289+"   call Decho("http[s]://...")
     5290    let b:netrw_method = 5
     5291    let g:netrw_machine= substitute(a:choice,httpurm,'\1',"")
     5292    let b:netrw_fname  = substitute(a:choice,httpurm,'\2',"")
     5293+   let b:netrw_http   = (a:choice =~ '^https:')? "https" : "http"
     5294 
     5295   " Method#6: dav://hostname[:port]/..path-to-file.. {{{3
     5296   elseif match(a:choice,davurm) == 0
     5297@@ -2820,6 +3075,7 @@
     5298   if a:1 =~ '^ftp:'
     5299    " get host from ftp:... url
     5300    " access userid and password from hup (host-user-passwd) dictionary
     5301+"   call Decho("case a:0=1: a:1<".a:1."> (get host from ftp:... url)")
     5302    let host = substitute(a:1,'^ftp:','','')
     5303    let host = substitute(host,'\..*','','')
     5304    if exists("s:netrw_hup[host]")
     5305@@ -2834,8 +3090,13 @@
     5306 
     5307   else
     5308    " case: one input argument, not an url.  Using it as a new user-id.
     5309+"   call Decho("case a:0=1: a:1<".a:1."> (get host from input argument, not an url)")
     5310    if exists("g:netrw_machine")
     5311-    let host= substitute(g:netrw_machine,'\..*$','','')
     5312+    if g:netrw_machine =~ '[0-9.]\+'
     5313+     let host= g:netrw_machine
     5314+    else
     5315+     let host= substitute(g:netrw_machine,'\..*$','','')
     5316+    endif
     5317    else
     5318     let g:netrw_machine= input('Enter hostname: ')
     5319    endif
     5320@@ -2885,365 +3146,32 @@
     5321 " ===========================================
     5322 
     5323 " ---------------------------------------------------------------------
    67735324-" s:NetrwMaps: {{{2
    67745325-fun! s:NetrwMaps(islocal)
    67755326-"  call Dfunc("s:NetrwMaps(islocal=".a:islocal.") b:netrw_curdir<".b:netrw_curdir.">")
    6776 +  if a:readcmd[0] == '%'
    6777 +  " get file into buffer
    6778 +"   call Decho("get file into buffer")
     5327+" s:ExplorePatHls: converts an Explore pattern into a regular expression search pattern {{{2
     5328+fun! s:ExplorePatHls(pattern)
     5329+"  call Dfunc("s:ExplorePatHls(pattern<".a:pattern.">)")
     5330+  let repat= substitute(a:pattern,'^**/\{1,2}','','')
     5331+"  call Decho("repat<".repat.">")
     5332+  let repat= escape(repat,'][.\')
     5333+"  call Decho("repat<".repat.">")
     5334+  let repat= '\<'.substitute(repat,'\*','\\(\\S\\+ \\)*\\S\\+','g').'\>'
     5335+"  call Dret("s:ExplorePatHls repat<".repat.">")
     5336+  return repat
     5337+endfun
    67795338 
    67805339-  " set up Rexplore and [ 2-leftmouse-click -or- c-leftmouse ]
     
    67915350-     nmap <unique> <silent> <c-leftmouse>      <Plug>NetrwReturn
    67925351-    endif
    6793 +   " rename the current buffer to the temp file (ie. tfile)
    6794 +   if g:netrw_cygwin
    6795 +    let tfile= substitute(a:tfile,g:netrw_cygdrive.'/\(.\)','\1:','')
    6796 +   else
    6797 +    let tfile= a:tfile
    6798     endif
     5352-   endif
    67995353-   nno <silent> <Plug>NetrwReturn      :Rexplore<cr>
    68005354-"   call Decho("(NetrwMaps) made <Plug>NetrwReturn map")
    6801 +"   call Decho("exe sil! keepalt file ".fnameescape(tfile))
    6802 +   exe "sil! keepalt file ".fnameescape(tfile)
    6803 +
    6804 +   " edit temporary file (ie. read the temporary file in)
    6805 +   if     rfile =~ '\.zip$'
    6806 +"    call Decho("handling remote zip file with zip#Browse(tfile<".tfile.">)")
    6807 +    call zip#Browse(tfile)
    6808 +   elseif rfile =~ '\.tar$'
    6809 +"    call Decho("handling remote tar file with tar#Browse(tfile<".tfile.">)")
    6810 +    call tar#Browse(tfile)
    6811 +   elseif rfile =~ '\.tar\.gz$'
    6812 +"    call Decho("handling remote gzip-compressed tar file")
    6813 +    call tar#Browse(tfile)
    6814 +   elseif rfile =~ '\.tar\.bz2$'
    6815 +"    call Decho("handling remote bz2-compressed tar file")
    6816 +    call tar#Browse(tfile)
    6817 +   elseif rfile =~ '\.tar\.xz$'
    6818 +"    call Decho("handling remote xz-compressed tar file")
    6819 +    call tar#Browse(tfile)
    6820 +   elseif rfile =~ '\.txz$'
    6821 +"    call Decho("handling remote xz-compressed tar file (.txz)")
    6822 +    call tar#Browse(tfile)
    6823 +   else
    6824 +"    call Decho("edit temporary file")
    6825 +    e!
    6826 +   endif
    6827 +
    6828 +   " rename buffer back to remote filename
    6829 +"   call Decho("exe sil! keepalt file ".fnameescape(rfile))
    6830 +   exe "sil! keepj keepalt file ".fnameescape(rfile)
    6831 +
    6832 +   " Detect filetype of local version of remote file.
    6833 +   " Note that isk must not include a "/" for scripts.vim
    6834 +   " to process this detection correctly.
    6835 +"   call Decho("detect filetype of local version of remote file")
    6836 +   let iskkeep= &l:isk
    6837 +   setl isk-=/
    6838 +   let &l:isk= iskkeep
    6839 +"   call Dredir("renamed buffer back to remote filename<".rfile."> : expand(%)<".expand("%").">","ls!")
    6840 +   let line1 = 1
    6841 +   let line2 = line("$")
    6842 +
    6843 +  elseif !&ma
    6844 +   " attempting to read a file after the current line in the file, but the buffer is not modifiable
    6845 +   keepj call netrw#ErrorMsg(s:WARNING,"attempt to read<".a:tfile."> into a non-modifiable buffer!",94)
    6846 +"   call Dret("NetrwGetFile : attempt to read<".a:tfile."> into a non-modifiable buffer!")
    6847 +   return
    6848 +
    6849 +  elseif s:FileReadable(a:tfile)
    6850 +   " read file after current line
    6851 +"   call Decho("read file<".a:tfile."> after current line")
    6852 +   let curline = line(".")
    6853 +   let lastline= line("$")
    6854 +"   call Decho("exe<".a:readcmd." ".fnameescape(v:cmdarg)." ".fnameescape(a:tfile).">  line#".curline)
    6855 +   exe "keepj ".a:readcmd." ".fnameescape(v:cmdarg)." ".fnameescape(a:tfile)
    6856 +   let line1= curline + 1
    6857 +   let line2= line("$") - lastline + 1
    6858 +
    6859 +  else
    6860 +   " not readable
    6861 +"   call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
    6862 +"   call Decho("tfile<".a:tfile."> not readable")
    6863 +   keepj call netrw#ErrorMsg(s:WARNING,"file <".a:tfile."> not readable",9)
    6864 +"   call Dret("NetrwGetFile : tfile<".a:tfile."> not readable")
    6865 +   return
    6866    endif
    6867  
     5355-  endif
     5356-
    68685357-  if a:islocal
    68695358-"   call Decho("(NetrwMaps) make local maps")
     
    69715460-    nmap <buffer> <unique> <c-h> <Plug>NetrwHideEdit
    69725461-    imap <buffer> <unique> <c-h> <Plug>NetrwHideEdit
    6973 +  " User-provided (ie. optional) fix-it-up command
    6974 +  if exists("*NetReadFixup")
    6975 +"   call Decho("calling NetReadFixup(method<".a:method."> line1=".line1." line2=".line2.")")
    6976 +   keepj call NetReadFixup(a:method, line1, line2)
    6977 +"  else " Decho
    6978 +"   call Decho("NetReadFixup() not called, doesn't exist  (line1=".line1." line2=".line2.")")
    6979 +  endif
    6980 +
    6981 +  if has("gui") && has("menu") && has("gui_running") && &go =~# 'm' && g:netrw_menu
    6982 +   " update the Buffers menu
    6983 +   keepj call s:UpdateBuffersMenu()
    6984 +  endif
    6985 +
    6986 +"  call Decho("readcmd<".a:readcmd."> cmdarg<".v:cmdarg."> tfile<".a:tfile."> readable=".s:FileReadable(a:tfile))
    6987 +
    6988 + " make sure file is being displayed
    6989 +"  redraw!
    6990 +
    6991 +"  call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
    6992 +"  call Dret("NetrwGetFile")
    6993 +endfun
    6994 +
    6995 +" ------------------------------------------------------------------------
    6996 +" s:NetrwMethod:  determine method of transfer {{{2
    6997 +" Input:
    6998 +"   choice = url   [protocol:]//[userid@]hostname[:port]/[path-to-file]
    6999 +" Output:
    7000 +"  b:netrw_method= 1: rcp                                             
    7001 +"                  2: ftp + <.netrc>                                 
    7002 +"                 3: ftp + machine, id, password, and [path]filename
    7003 +"                 4: scp                                             
    7004 +"                 5: http[s] (wget)                                     
    7005 +"                 6: dav
    7006 +"                 7: rsync                                           
    7007 +"                 8: fetch                                           
    7008 +"                 9: sftp                                           
    7009 +"  g:netrw_machine= hostname
    7010 +"  b:netrw_fname  = filename
    7011 +"  g:netrw_port   = optional port number (for ftp)
    7012 +"  g:netrw_choice = copy of input url (choice)
    7013 +fun! s:NetrwMethod(choice)
    7014 +"   call Dfunc("NetrwMethod(a:choice<".a:choice.">)")
    7015 +
    7016 +   " sanity check: choice should have at least three slashes in it
    7017 +   if strlen(substitute(a:choice,'[^/]','','g')) < 3
    7018 +    call netrw#ErrorMsg(s:ERROR,"not a netrw-style url; netrw uses protocol://[user@]hostname[:port]/[path])",78)
    7019 +    let b:netrw_method = -1
    7020 +"    call Dret("NetrwMethod : incorrect url format<".a:choice.">")
    7021 +    return
    7022     endif
     5462-   endif
    70235463-   nnoremap <buffer> <silent> <Plug>NetrwHideEdit      :call <SID>NetrwHideEdit(1)<cr>
    70245464-   if !hasmapto('<Plug>NetrwRefresh')
    70255465-    nmap <buffer> <unique> <c-l> <Plug>NetrwRefresh
    70265466-    imap <buffer> <unique> <c-l> <Plug>NetrwRefresh
    7027 +
    7028 +   " record current g:netrw_machine, if any
    7029 +   " curmachine used if protocol == ftp and no .netrc
    7030 +   if exists("g:netrw_machine")
    7031 +    let curmachine= g:netrw_machine
    7032 +"    call Decho("curmachine<".curmachine.">")
    7033 +   else
    7034 +    let curmachine= "N O T A HOST"
    7035     endif
     5467-   endif
    70365468-   nnoremap <buffer> <silent> <Plug>NetrwRefresh               :call <SID>NetrwRefresh(1,<SID>NetrwBrowseChgDir(1,'./'))<cr>
    70375469-   if s:didstarstar || !mapcheck("<s-down>","n")
     
    70645496-    exe 'vnoremap <buffer> <silent> <rightmouse>  <leftmouse>:call <SID>NetrwLocalRm("'.mapsafecurdir.'")<cr>'
    70655497-    exe 'inoremap <buffer> <silent> <rightmouse>  <c-o><leftmouse><c-o>:call <SID>NetrwLocalRm("'.mapsafecurdir.'")<cr>'
    7066 +   if exists("g:netrw_port")
    7067 +    let netrw_port= g:netrw_port
    7068     endif
     5498-   endif
    70695499-   exe 'nnoremap <buffer> <silent> <del>       :call <SID>NetrwLocalRm("'.mapsafecurdir.'")<cr>'
    70705500-   exe 'nnoremap <buffer> <silent> D           :call <SID>NetrwLocalRm("'.mapsafecurdir.'")<cr>'
     
    70795509-   exe 'inoremap <buffer> <silent> <Leader>m   <c-o>:call <SID>NetrwMakeDir("")<cr>'
    70805510-   nnoremap <buffer> <F1>              :he netrw-quickhelp<cr>
    7081  
     5511-
    70825512-  else " remote
    70835513-"   call Decho("(NetrwMaps) make remote maps")
     
    71895619-    imap <buffer> <c-l> <Plug>NetrwRefresh
    71905620-   endif
    7191 +   " insure that netrw_ftp_cmd starts off every method determination
    7192 +   " with the current g:netrw_ftp_cmd
    7193 +   let s:netrw_ftp_cmd= g:netrw_ftp_cmd
    7194  
     5621-
    71955622-   let mapsafepath     = escape(s:path, s:netrw_map_escape)
    71965623-   let mapsafeusermach = escape(s:user.s:machine, s:netrw_map_escape)
    7197 +  " initialization
    7198 +  let b:netrw_method  = 0
    7199 +  let g:netrw_machine = ""
    7200 +  let b:netrw_fname   = ""
    7201 +  let g:netrw_port    = ""
    7202 +  let g:netrw_choice  = a:choice
    7203  
     5624-
    72045625-   nnoremap <buffer> <silent> <Plug>NetrwRefresh       :call <SID>NetrwRefresh(0,<SID>NetrwBrowseChgDir(0,'./'))<cr>
    72055626-   if g:netrw_mousemaps == 1
     
    72235644-    exe 'vnoremap <buffer> <silent> <rightmouse> <leftmouse>:call <SID>NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")<cr>'
    72245645-    exe 'inoremap <buffer> <silent> <rightmouse> <c-o><leftmouse><c-o>:call <SID>NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")<cr>'
    7225 +  " Patterns:
    7226 +  " mipf     : a:machine a:id password filename             Use ftp
    7227 +  " mf     : a:machine filename                     Use ftp + <.netrc> or g:netrw_uid s:netrw_passwd
    7228 +  " ftpurm   : ftp://[user@]host[[#:]port]/filename  Use ftp + <.netrc> or g:netrw_uid s:netrw_passwd
    7229 +  " rcpurm   : rcp://[user@]host/filename           Use rcp
    7230 +  " rcphf    : [user@]host:filename                 Use rcp
    7231 +  " scpurm   : scp://[user@]host[[#:]port]/filename  Use scp
    7232 +  " httpurm  : http[s]://[user@]host/filename       Use wget
    7233 +  " davurm   : dav[s]://host[:port]/path             Use cadaver/curl
    7234 +  " rsyncurm : rsync://host[:port]/path              Use rsync
    7235 +  " fetchurm : fetch://[user@]host[:http]/filename   Use fetch (defaults to ftp, override for http)
    7236 +  " sftpurm  : sftp://[user@]host/filename  Use scp
    7237 +  let mipf     = '^\(\S\+\)\s\+\(\S\+\)\s\+\(\S\+\)\s\+\(\S\+\)$'
    7238 +  let mf       = '^\(\S\+\)\s\+\(\S\+\)$'
    7239 +"  let ftpurm   = '^ftp://\(\([^/@]\{-}\)@\)\=\([^/#:]\{-}\)\([#:]\d\+\)\=/\(.*\)$'
    7240 +"  let rcpurm   = '^rcp://\%(\([^/@]\{-}\)@\)\=\([^/]\{-}\)/\(.*\)$'
    7241 +"  let fetchurm = '^fetch://\(\([^/@]\{-}\)@\)\=\([^/#:]\{-}\)\(:http\)\=/\(.*\)$'
    7242 +  let ftpurm   = '^ftp://\(\([^/]*\)@\)\=\([^/#:]\{-}\)\([#:]\d\+\)\=/\(.*\)$'
    7243 +  let rcpurm   = '^rcp://\%(\([^/]*\)@\)\=\([^/]\{-}\)/\(.*\)$'
    7244 +  let rcphf    = '^\(\(\h\w*\)@\)\=\(\h\w*\):\([^@]\+\)$'
    7245 +  let scpurm   = '^scp://\([^/#:]\+\)\%([#:]\(\d\+\)\)\=/\(.*\)$'
    7246 +  let httpurm  = '^https\=://\([^/]\{-}\)\(/.*\)\=$'
    7247 +  let davurm   = '^davs\=://\([^/]\+\)/\(.*/\)\([-_.~[:alnum:]]\+\)$'
    7248 +  let rsyncurm = '^rsync://\([^/]\{-}\)/\(.*\)\=$'
    7249 +  let fetchurm = '^fetch://\(\([^/]*\)@\)\=\([^/#:]\{-}\)\(:http\)\=/\(.*\)$'
    7250 +  let sftpurm  = '^sftp://\([^/]\{-}\)/\(.*\)\=$'
    7251 +
    7252 +"  call Decho("determine method:")
    7253 +  " Determine Method
    7254 +  " Method#1: rcp://user@hostname/...path-to-file {{{3
    7255 +  if match(a:choice,rcpurm) == 0
    7256 +"   call Decho("rcp://...")
    7257 +   let b:netrw_method  = 1
    7258 +   let userid          = substitute(a:choice,rcpurm,'\1',"")
    7259 +   let g:netrw_machine = substitute(a:choice,rcpurm,'\2',"")
    7260 +   let b:netrw_fname   = substitute(a:choice,rcpurm,'\3',"")
    7261 +   if userid != ""
    7262 +    let g:netrw_uid= userid
    7263     endif
     5646-   endif
    72645647-   exe 'nnoremap <buffer> <silent> <del>       :call <SID>NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")<cr>'
    72655648-   exe 'nnoremap <buffer> <silent> d           :call <SID>NetrwMakeDir("'.mapsafeusermach.'")<cr>'
     
    72765659-   inoremap <buffer> <F1>                      <c-o>:he netrw-quickhelp<cr>
    72775660-  endif
    7278  
     5661-
    72795662-  keepj call s:SetRexDir(a:islocal,b:netrw_curdir)
    7280 +  " Method#4: scp://user@hostname/...path-to-file {{{3
    7281 +  elseif match(a:choice,scpurm) == 0
    7282 +"   call Decho("scp://...")
    7283 +   let b:netrw_method  = 4
    7284 +   let g:netrw_machine = substitute(a:choice,scpurm,'\1',"")
    7285 +   let g:netrw_port    = substitute(a:choice,scpurm,'\2',"")
    7286 +   let b:netrw_fname   = substitute(a:choice,scpurm,'\3',"")
    7287  
     5663-
    72885664-"  call Dret("s:NetrwMaps")
    72895665-endfun
    7290 +  " Method#5: http[s]://user@hostname/...path-to-file {{{3
    7291 +  elseif match(a:choice,httpurm) == 0
    7292 +"   call Decho("http[s]://...")
    7293 +   let b:netrw_method = 5
    7294 +   let g:netrw_machine= substitute(a:choice,httpurm,'\1',"")
    7295 +   let b:netrw_fname  = substitute(a:choice,httpurm,'\2',"")
    7296 +   let b:netrw_http   = (a:choice =~ '^https:')? "https" : "http"
    7297  
     5666-
    72985667-" ---------------------------------------------------------------------
    72995668-" s:ExplorePatHls: converts an Explore pattern into a regular expression search pattern {{{2
     
    73085677-  return repat
    73095678-endfun
    7310 +  " Method#6: dav://hostname[:port]/..path-to-file.. {{{3
    7311 +  elseif match(a:choice,davurm) == 0
    7312 +"   call Decho("dav://...")
    7313 +   let b:netrw_method= 6
    7314 +   if a:choice =~ 'davs:'
    7315 +    let g:netrw_machine= 'https://'.substitute(a:choice,davurm,'\1/\2',"")
    7316 +   else
    7317 +    let g:netrw_machine= 'http://'.substitute(a:choice,davurm,'\1/\2',"")
    7318 +   endif
    7319 +   let b:netrw_fname  = substitute(a:choice,davurm,'\3',"")
    7320  
     5679-
    73215680-" ---------------------------------------------------------------------
    73225681-"  s:NetrwBookHistHandler: {{{2
     
    73335692-"   "  call Dret("s:NetrwBookHistHandler - suppressed due to g:netrw_dirhistmax")
    73345693-   return
    7335 -  endif
    7336 +   " Method#7: rsync://user@hostname/...path-to-file {{{3
    7337 +  elseif match(a:choice,rsyncurm) == 0
    7338 +"   call Decho("rsync://...")
    7339 +   let b:netrw_method = 7
    7340 +   let g:netrw_machine= substitute(a:choice,rsyncurm,'\1',"")
    7341 +   let b:netrw_fname  = substitute(a:choice,rsyncurm,'\2',"")
    7342  
    7343 -  let ykeep= @@
    7344 -  if a:chg == 0
    7345 -   " bookmark the current directory
    7346 -"   call Decho("(user: <b>) bookmark the current directory")
    7347 -   if !exists("g:netrw_bookmarklist")
    7348 -    let g:netrw_bookmarklist= []
    7349 -   endif
    7350 -   if index(g:netrw_bookmarklist,a:curdir) == -1
    7351 -    " curdir not currently in g:netrw_bookmarklist, so include it
    7352 -    call add(g:netrw_bookmarklist,a:curdir)
    7353 -    call sort(g:netrw_bookmarklist)
    7354 +   " Methods 2,3: ftp://[user@]hostname[[:#]port]/...path-to-file {{{3
    7355 +  elseif match(a:choice,ftpurm) == 0
    7356 +"   call Decho("ftp://...")
    7357 +   let userid        = substitute(a:choice,ftpurm,'\2',"")
    7358 +   let g:netrw_machine= substitute(a:choice,ftpurm,'\3',"")
    7359 +   let g:netrw_port   = substitute(a:choice,ftpurm,'\4',"")
    7360 +   let b:netrw_fname  = substitute(a:choice,ftpurm,'\5',"")
    7361 +"   call Decho("g:netrw_machine<".g:netrw_machine.">")
    7362 +   if userid != ""
    7363 +    let g:netrw_uid= userid
    7364     endif
    7365 -   echo "bookmarked the current directory"
    7366  
    7367 -  elseif a:chg == 1
    7368 -   " change to the bookmarked directory
    7369 -"   call Decho("(user: <".v:count."gb>) change to the bookmarked directory")
    7370 -   if exists("g:netrw_bookmarklist[v:count-1]")
    7371 -"    call Decho("(user: <".v:count."gb>) bookmarklist=".string(g:netrw_bookmarklist))
    7372 -    exe "keepj e ".fnameescape(g:netrw_bookmarklist[v:count-1])
    7373 -   else
    7374 -    echomsg "Sorry, bookmark#".v:count." doesn't exist!"
    7375 +   if curmachine != g:netrw_machine
    7376 +    if exists("s:netwr_hup[".g:netrw_machine."]")
    7377 +     call NetUserPass("ftp:".g:netrw_machine)
    7378 +    elseif exists("s:netrw_passwd")
    7379 +     " if there's a change in hostname, require password re-entry
    7380 +     unlet s:netrw_passwd
    7381 +    endif
    7382 +    if exists("netrw_port")
    7383 +     unlet netrw_port
    7384 +    endif
    7385     endif
    7386  
    7387 -  elseif a:chg == 2
    7388 -"   redraw!
    7389 -   let didwork= 0
    7390 -   " list user's bookmarks
    7391 -"   call Decho("(user: <q>) list user's bookmarks")
    7392 -   if exists("g:netrw_bookmarklist")
    7393 -"    call Decho('list '.len(g:netrw_bookmarklist).' bookmarks')
    7394 -    let cnt= 1
    7395 -    for bmd in g:netrw_bookmarklist
    7396 -"     call Decho("Netrw Bookmark#".cnt.": ".g:netrw_bookmarklist[cnt-1])
    7397 -     echo printf("Netrw Bookmark#%-2d: %s",cnt,g:netrw_bookmarklist[cnt-1])
    7398 -     let didwork = 1
    7399 -     let cnt     = cnt + 1
    7400 -    endfor
    7401 -   endif
    7402 +   if exists("g:netrw_uid") && exists("s:netrw_passwd")
    7403 +    let b:netrw_method = 3
    7404 +   else
    7405 +    let host= substitute(g:netrw_machine,'\..*$','','')
    7406 +    if exists("s:netrw_hup[host]")
    7407 +     call NetUserPass("ftp:".host)
    7408  
    7409 -   " list directory history
    7410 -   let cnt     = g:netrw_dirhist_cnt
    7411 -   let first   = 1
    7412 -   let histcnt = 0
    7413 -   if g:netrw_dirhistmax > 0
    7414 -    while ( first || cnt != g:netrw_dirhist_cnt )
    7415 -"    call Decho("first=".first." cnt=".cnt." dirhist_cnt=".g:netrw_dirhist_cnt)
    7416 -     if exists("g:netrw_dirhist_{cnt}")
    7417 -"     call Decho("Netrw  History#".histcnt.": ".g:netrw_dirhist_{cnt})
    7418 -      echo printf("Netrw  History#%-2d: %s",histcnt,g:netrw_dirhist_{cnt})
    7419 -      let didwork= 1
    7420 +    elseif (has("win32") || has("win95") || has("win64") || has("win16")) && s:netrw_ftp_cmd =~ '-[sS]:'
    7421 +"     call Decho("has -s: : s:netrw_ftp_cmd<".s:netrw_ftp_cmd.">")
    7422 +"     call Decho("          g:netrw_ftp_cmd<".g:netrw_ftp_cmd.">")
    7423 +     if g:netrw_ftp_cmd =~ '-[sS]:\S*MACHINE\>'
    7424 +      let s:netrw_ftp_cmd= substitute(g:netrw_ftp_cmd,'\<MACHINE\>',g:netrw_machine,'')
    7425 +"      call Decho("s:netrw_ftp_cmd<".s:netrw_ftp_cmd.">")
    7426       endif
    7427 -     let histcnt = histcnt + 1
    7428 -     let first   = 0
    7429 -     let cnt     = ( cnt - 1 ) % g:netrw_dirhistmax
    7430 -     if cnt < 0
    7431 -      let cnt= cnt + g:netrw_dirhistmax
    7432 +     let b:netrw_method= 2
    7433 +    elseif s:FileReadable(expand("$HOME/.netrc")) && !g:netrw_ignorenetrc
    7434 +"     call Decho("using <".expand("$HOME/.netrc")."> (readable)")
    7435 +     let b:netrw_method= 2
    7436 +    else
    7437 +     if !exists("g:netrw_uid") || g:netrw_uid == ""
    7438 +      call NetUserPass()
    7439 +     elseif !exists("s:netrw_passwd") || s:netrw_passwd == ""
    7440 +      call NetUserPass(g:netrw_uid)
    7441 +    " else just use current g:netrw_uid and s:netrw_passwd
    7442       endif
    7443 -    endwhile
    7444 -   else
    7445 -    let g:netrw_dirhist_cnt= 0
    7446 -   endif
    7447 -   if didwork
    7448 -    call inputsave()|call input("Press <cr> to continue")|call inputrestore()
    7449 -   endif
    7450 -
    7451 -  elseif a:chg == 3
    7452 -   " saves most recently visited directories (when they differ)
    7453 -"   call Decho("(browsing) record curdir history")
    7454 -   if !exists("g:netrw_dirhist_cnt") || !exists("g:netrw_dirhist_{g:netrw_dirhist_cnt}") || g:netrw_dirhist_{g:netrw_dirhist_cnt} != a:curdir
    7455 -    if g:netrw_dirhistmax > 0
    7456 -     let g:netrw_dirhist_cnt                   = ( g:netrw_dirhist_cnt + 1 ) % g:netrw_dirhistmax
    7457 -     let g:netrw_dirhist_{g:netrw_dirhist_cnt} = a:curdir
    7458 +     let b:netrw_method= 3
    7459      endif
    7460 -"    call Decho("save dirhist#".g:netrw_dirhist_cnt."<".g:netrw_dirhist_{g:netrw_dirhist_cnt}.">")
    7461     endif
    7462  
    7463 -  elseif a:chg == 4
    7464 -   " u: change to the previous directory stored on the history list
    7465 -"   call Decho("(user: <u>) chg to prev dir from history")
    7466 -   if g:netrw_dirhistmax > 0
    7467 -    let g:netrw_dirhist_cnt= ( g:netrw_dirhist_cnt - v:count1 ) % g:netrw_dirhistmax
    7468 -    if g:netrw_dirhist_cnt < 0
    7469 -     let g:netrw_dirhist_cnt= g:netrw_dirhist_cnt + g:netrw_dirhistmax
    7470 -    endif
    7471 -   else
    7472 -    let g:netrw_dirhist_cnt= 0
    7473 -   endif
    7474 -   if exists("g:netrw_dirhist_{g:netrw_dirhist_cnt}")
    7475 -"    call Decho("changedir u#".g:netrw_dirhist_cnt."<".g:netrw_dirhist_{g:netrw_dirhist_cnt}.">")
    7476 -    if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir")
    7477 -     setl ma noro
    7478 -"     call Decho("(NetrwBookHistHandler) setl ma noro")
    7479 -     sil! keepj %d
    7480 -     setl nomod
    7481 -"     call Decho("(NetrwBookHistHandler) setl nomod")
    7482 -"     call Decho("(NetrwBookHistHandler)  ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
    7483 -    endif
    7484 -"    "    call Decho("exe e! ".fnameescape(g:netrw_dirhist_{g:netrw_dirhist_cnt}))
    7485 -    exe "keepj e! ".fnameescape(g:netrw_dirhist_{g:netrw_dirhist_cnt})
    7486 -   else
    7487 -    if g:netrw_dirhistmax > 0
    7488 -     let g:netrw_dirhist_cnt= ( g:netrw_dirhist_cnt + v:count1 ) % g:netrw_dirhistmax
    7489 -    else
    7490 -     let g:netrw_dirhist_cnt= 0
    7491 -    endif
    7492 -    echo "Sorry, no predecessor directory exists yet"
    7493 +  " Method#8: fetch {{{3
    7494 +  elseif match(a:choice,fetchurm) == 0
    7495 +"   call Decho("fetch://...")
    7496 +   let b:netrw_method = 8
    7497 +   let g:netrw_userid = substitute(a:choice,fetchurm,'\2',"")
    7498 +   let g:netrw_machine= substitute(a:choice,fetchurm,'\3',"")
    7499 +   let b:netrw_option = substitute(a:choice,fetchurm,'\4',"")
    7500 +   let b:netrw_fname  = substitute(a:choice,fetchurm,'\5',"")
    7501 +
    7502 +   " Method#3: Issue an ftp : "machine id password [path/]filename" {{{3
    7503 +  elseif match(a:choice,mipf) == 0
    7504 +"   call Decho("(ftp) host id pass file")
    7505 +   let b:netrw_method  = 3
    7506 +   let g:netrw_machine = substitute(a:choice,mipf,'\1',"")
    7507 +   let g:netrw_uid     = substitute(a:choice,mipf,'\2',"")
    7508 +   let s:netrw_passwd  = substitute(a:choice,mipf,'\3',"")
    7509 +   let b:netrw_fname   = substitute(a:choice,mipf,'\4',"")
    7510 +   call NetUserPass(g:netrw_machine,g:netrw_uid,s:netrw_passwd)
    7511 +
    7512 +  " Method#3: Issue an ftp: "hostname [path/]filename" {{{3
    7513 +  elseif match(a:choice,mf) == 0
    7514 +"   call Decho("(ftp) host file")
    7515 +   if exists("g:netrw_uid") && exists("s:netrw_passwd")
    7516 +    let b:netrw_method  = 3
    7517 +    let g:netrw_machine = substitute(a:choice,mf,'\1',"")
    7518 +    let b:netrw_fname   = substitute(a:choice,mf,'\2',"")
    7519 +
    7520 +   elseif s:FileReadable(expand("$HOME/.netrc"))
    7521 +    let b:netrw_method  = 2
    7522 +    let g:netrw_machine = substitute(a:choice,mf,'\1',"")
    7523 +    let b:netrw_fname   = substitute(a:choice,mf,'\2',"")
    7524     endif
    7525  
    7526 -  elseif a:chg == 5
    7527 -   " U: change to the subsequent directory stored on the history list
    7528 -"   call Decho("(user: <U>) chg to next dir from history")
    7529 -   if g:netrw_dirhistmax > 0
    7530 -    let g:netrw_dirhist_cnt= ( g:netrw_dirhist_cnt + 1 ) % g:netrw_dirhistmax
    7531 -    if exists("g:netrw_dirhist_{g:netrw_dirhist_cnt}")
    7532 -"    call Decho("changedir U#".g:netrw_dirhist_cnt."<".g:netrw_dirhist_{g:netrw_dirhist_cnt}.">")
    7533 -     if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir")
    7534 -"      call Decho("(NetrwBookHistHandler) setl ma noro")
    7535 -      setl ma noro
    7536 -      sil! keepj %d
    7537 -"      call Decho("removed all lines from buffer (%d)")
    7538 -"      call Decho("(NetrwBookHistHandler) setl nomod")
    7539 -      setl nomod
    7540 -"      call Decho("(set nomod)  ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
    7541 -     endif
    7542 -"    call Decho("exe e! ".fnameescape(g:netrw_dirhist_{g:netrw_dirhist_cnt}))
    7543 -     exe "keepj e! ".fnameescape(g:netrw_dirhist_{g:netrw_dirhist_cnt})
    7544 -    else
    7545 -     let g:netrw_dirhist_cnt= ( g:netrw_dirhist_cnt - 1 ) % g:netrw_dirhistmax
    7546 -     if g:netrw_dirhist_cnt < 0
    7547 -      let g:netrw_dirhist_cnt= g:netrw_dirhist_cnt + g:netrw_dirhistmax
    7548 -     endif
    7549 -     echo "Sorry, no successor directory exists yet"
    7550 -    endif
    7551 -   else
    7552 -    let g:netrw_dirhist_cnt= 0
    7553 -    echo "Sorry, no successor directory exists yet (g:netrw_dirhistmax is ".g:netrw_dirhistmax.")"
    7554 +  " Method#9: sftp://user@hostname/...path-to-file {{{3
    7555 +  elseif match(a:choice,sftpurm) == 0
    7556 +"   call Decho("sftp://...")
    7557 +   let b:netrw_method = 9
    7558 +   let g:netrw_machine= substitute(a:choice,sftpurm,'\1',"")
    7559 +   let b:netrw_fname  = substitute(a:choice,sftpurm,'\2',"")
    7560 +
    7561 +  " Method#1: Issue an rcp: hostname:filename"  (this one should be last) {{{3
    7562 +  elseif match(a:choice,rcphf) == 0
    7563 +"   call Decho("(rcp) [user@]host:file) rcphf<".rcphf.">")
    7564 +   let b:netrw_method  = 1
    7565 +   let userid          = substitute(a:choice,rcphf,'\2',"")
    7566 +   let g:netrw_machine = substitute(a:choice,rcphf,'\3',"")
    7567 +   let b:netrw_fname   = substitute(a:choice,rcphf,'\4',"")
    7568 +"   call Decho('\1<'.substitute(a:choice,rcphf,'\1',"").">")
    7569 +"   call Decho('\2<'.substitute(a:choice,rcphf,'\2',"").">")
    7570 +"   call Decho('\3<'.substitute(a:choice,rcphf,'\3',"").">")
    7571 +"   call Decho('\4<'.substitute(a:choice,rcphf,'\4',"").">")
    7572 +   if userid != ""
    7573 +    let g:netrw_uid= userid
    7574     endif
    7575  
    7576 -  elseif a:chg == 6
    7577 -   " delete the v:count'th bookmark
    7578 -"   call Decho("delete bookmark#".v:count."<".g:netrw_bookmarklist[v:count-1].">")
    7579 -   let savefile= s:NetrwHome()."/.netrwbook"
    7580 -   if filereadable(savefile)
    7581 -"    call Decho("merge bookmarks (active and file)")
    7582 -    keepj call s:NetrwBookHistSave() " done here to merge bookmarks first
    7583 -"    call Decho("bookmark delete savefile<".savefile.">")
    7584 -    keepj call delete(savefile)
    7585 +  " Cannot Determine Method {{{3
    7586 +  else
    7587 +   if !exists("g:netrw_quiet")
    7588 +    call netrw#ErrorMsg(s:WARNING,"cannot determine method (format: protocol://[user@]hostname[:port]/[path])",45)
    7589     endif
    7590 -"   call Decho("remove g:netrw_bookmarklist[".(v:count-1)."]")
    7591 -   keepj call remove(g:netrw_bookmarklist,v:count-1)
    7592 -"   call Decho("resulting g:netrw_bookmarklist=".string(g:netrw_bookmarklist))
    7593 +   let b:netrw_method  = -1
    7594    endif
    7595 -  call s:NetrwBookmarkMenu()
    7596 -  call s:NetrwTgtMenu()
    7597 -  let @@= ykeep
    7598 -"  call Dret("s:NetrwBookHistHandler")
    7599 -endfun
    7600 +  "}}}3
    7601  
    7602 -" ---------------------------------------------------------------------
    7603 -" s:NetrwBookHistRead: this function reads bookmarks and history {{{2
    7604 -"                      Sister function: s:NetrwBookHistSave()
    7605 -fun! s:NetrwBookHistRead()
    7606 -"  call Dfunc("s:NetrwBookHistRead()")
    7607 -  if !exists("g:netrw_dirhistmax") || g:netrw_dirhistmax <= 0
    7608 -"   "  call Dret("s:NetrwBookHistRead - suppressed due to g:netrw_dirhistmax")
    7609 -   return
    7610 +  if g:netrw_port != ""
    7611 +   " remove any leading [:#] from port number
    7612 +   let g:netrw_port = substitute(g:netrw_port,'[#:]\+','','')
    7613 +  elseif exists("netrw_port")
    7614 +   " retain port number as implicit for subsequent ftp operations
    7615 +   let g:netrw_port= netrw_port
    7616    endif
    7617 -  let ykeep= @@
    7618 -  if !exists("s:netrw_initbookhist")
    7619 -   let home    = s:NetrwHome()
    7620 -   let savefile= home."/.netrwbook"
    7621 -   if filereadable(savefile)
    7622 -"    call Decho("sourcing .netrwbook")
    7623 -    exe "keepalt keepj so ".savefile
    7624 +
    7625 +"  call Decho("a:choice       <".a:choice.">")
    7626 +"  call Decho("b:netrw_method <".b:netrw_method.">")
    7627 +"  call Decho("g:netrw_machine<".g:netrw_machine.">")
    7628 +"  call Decho("g:netrw_port   <".g:netrw_port.">")
    7629 +"  if exists("g:netrw_uid")            "Decho
    7630 +"   call Decho("g:netrw_uid    <".g:netrw_uid.">")
    7631 +"  endif                                       "Decho
    7632 +"  if exists("s:netrw_passwd")         "Decho
    7633 +"   call Decho("s:netrw_passwd <".s:netrw_passwd.">")
    7634 +"  endif                                       "Decho
    7635 +"  call Decho("b:netrw_fname  <".b:netrw_fname.">")
    7636 +"  call Dret("NetrwMethod : b:netrw_method=".b:netrw_method." g:netrw_port=".g:netrw_port)
    7637 +endfun
    7638 +
    7639 +" ------------------------------------------------------------------------
    7640 +" NetReadFixup: this sort of function is typically written by the user {{{2
    7641 +"               to handle extra junk that their system's ftp dumps
    7642 +"               into the transfer.  This function is provided as an
    7643 +"               example and as a fix for a Windows 95 problem: in my
    7644 +"               experience, win95's ftp always dumped four blank lines
    7645 +"               at the end of the transfer.
    7646 +if has("win95") && exists("g:netrw_win95ftp") && g:netrw_win95ftp
    7647 + fun! NetReadFixup(method, line1, line2)
    7648 +"   call Dfunc("NetReadFixup(method<".a:method."> line1=".a:line1." line2=".a:line2.")")
    7649 +
    7650 +   " sanity checks -- attempt to convert inputs to integers
    7651 +   let method = a:method + 0
    7652 +   let line1  = a:line1 + 0
    7653 +   let line2  = a:line2 + 0
    7654 +   if type(method) != 0 || type(line1) != 0 || type(line2) != 0 || method < 0 || line1 <= 0 || line2 <= 0
    7655 +"    call Dret("NetReadFixup")
    7656 +    return
    7657     endif
    7658 -   if g:netrw_dirhistmax > 0
    7659 -    let savefile= home."/.netrwhist"
    7660 -    if filereadable(savefile)
    7661 -"    call Decho("sourcing .netrwhist")
    7662 -     exe "keepalt keepj so ".savefile
    7663 +
    7664 +   if method == 3   " ftp (no <.netrc>)
    7665 +    let fourblanklines= line2 - 3
    7666 +    if fourblanklines >= line1
    7667 +     exe "sil keepj ".fourblanklines.",".line2."g/^\s*$/d"
    7668 +     call histdel("/",-1)
    7669      endif
    7670 -    let s:netrw_initbookhist= 1
    7671 -    au VimLeave * call s:NetrwBookHistSave()
    7672     endif
    7673 -  endif
    7674 -  let @@= ykeep
    7675 -"  call Dret("s:NetrwBookHistRead")
    7676 -endfun
    7677 +
    7678 +"   call Dret("NetReadFixup")
    7679 + endfun
    7680 +endif
    7681  
    7682  " ---------------------------------------------------------------------
    7683 -" s:NetrwBookHistSave: this function saves bookmarks and history {{{2
    7684 -"                      Sister function: s:NetrwBookHistRead()
    7685 -"                      I used to do this via viminfo but that appears to
    7686 -"                      be unreliable for long-term storage
    7687 -fun! s:NetrwBookHistSave()
    7688 -"  call Dfunc("s:NetrwBookHistSave() dirhistmax=".g:netrw_dirhistmax)
    7689 -  if !exists("g:netrw_dirhistmax") || g:netrw_dirhistmax <= 0
    7690 -"   call Dret("s:NetrwBookHistSave : dirhistmax=".g:netrw_dirhistmax)
    7691 -   return
    7692 -  endif
    7693 +" NetUserPass: set username and password for subsequent ftp transfer {{{2
    7694 +"   Usage:  :call NetUserPass()                               -- will prompt for userid and password
    7695 +"          :call NetUserPass("uid")                   -- will prompt for password
    7696 +"          :call NetUserPass("uid","password")        -- sets global userid and password
    7697 +"          :call NetUserPass("ftp:host")              -- looks up userid and password using hup dictionary
    7698 +"          :call NetUserPass("host","uid","password") -- sets hup dictionary with host, userid, password
    7699 +fun! NetUserPass(...)
    7700  
    7701 -  let savefile= s:NetrwHome()."/.netrwhist"
    7702 -  1split
    7703 -  call s:NetrwEnew()
    7704 -  setl cino= com= cpo-=a cpo-=A fo=nroql2 tw=0 report=10000 noswf
    7705 -  setl nocin noai noci magic nospell nohid wig= noaw
    7706 -  setl ma noro write
    7707 -  if exists("+acd") | setl noacd | endif
    7708 -  sil! keepj keepalt %d
    7709 +" call Dfunc("NetUserPass() a:0=".a:0)
    7710  
    7711 -  " save .netrwhist -- no attempt to merge
    7712 -  sil! keepalt file .netrwhist
    7713 -  call setline(1,"let g:netrw_dirhistmax  =".g:netrw_dirhistmax)
    7714 -  call setline(2,"let g:netrw_dirhist_cnt =".g:netrw_dirhist_cnt)
    7715 -  let lastline = line("$")
    7716 -  let cnt      = 1
    7717 -  while cnt <= g:netrw_dirhist_cnt
    7718 -   call setline((cnt+lastline),'let g:netrw_dirhist_'.cnt."='".g:netrw_dirhist_{cnt}."'")
    7719 -   let cnt= cnt + 1
    7720 -  endwhile
    7721 -  exe "sil! w! ".savefile
    7722 + if !exists('s:netrw_hup')
    7723 +  let s:netrw_hup= {}
    7724 + endif
    7725  
    7726 -  sil keepj %d
    7727 -  if exists("g:netrw_bookmarklist") && g:netrw_bookmarklist != []
    7728 -   " merge and write .netrwbook
    7729 -   let savefile= s:NetrwHome()."/.netrwbook"
    7730 + if a:0 == 0
    7731 +  " case: no input arguments
    7732  
    7733 -   if filereadable(savefile)
    7734 -    let booklist= deepcopy(g:netrw_bookmarklist)
    7735 -    exe "sil keepj keepalt so ".savefile
    7736 -    for bdm in booklist
    7737 -     if index(g:netrw_bookmarklist,bdm) == -1
    7738 -      call add(g:netrw_bookmarklist,bdm)
    7739 -     endif
    7740 -    endfor
    7741 -    call sort(g:netrw_bookmarklist)
    7742 -    exe "sil! w! ".savefile
    7743 -   endif
    7744 +  " change host and username if not previously entered; get new password
    7745 +  if !exists("g:netrw_machine")
    7746 +   let g:netrw_machine= input('Enter hostname: ')
    7747 +  endif
    7748 +  if !exists("g:netrw_uid") || g:netrw_uid == ""
    7749 +   " get username (user-id) via prompt
    7750 +   let g:netrw_uid= input('Enter username: ')
    7751 +  endif
    7752 +  " get password via prompting
    7753 +  let s:netrw_passwd= inputsecret("Enter Password: ")
    7754  
    7755 -   " construct and save .netrwbook
    7756 -   call setline(1,"let g:netrw_bookmarklist= ".string(g:netrw_bookmarklist))
    7757 -   exe "sil! w! ".savefile
    7758 +  " set up hup database
    7759 +  let host = substitute(g:netrw_machine,'\..*$','','')
    7760 +  if !exists('s:netrw_hup[host]')
    7761 +   let s:netrw_hup[host]= {}
    7762    endif
    7763 -  let bgone= bufnr("%")
    7764 -  q!
    7765 -  exe "keepalt ".bgone."bwipe!"
    7766 +  let s:netrw_hup[host].uid    = g:netrw_uid
    7767 +  let s:netrw_hup[host].passwd = s:netrw_passwd
    7768  
    7769 -"  call Dret("s:NetrwBookHistSave")
    7770 -endfun
    7771 + elseif a:0 == 1
    7772 +  " case: one input argument
    7773  
    7774 -" ---------------------------------------------------------------------
    7775 -" s:NetrwBrowse: This function uses the command in g:netrw_list_cmd to provide a {{{2
    7776 -"  list of the contents of a local or remote directory.  It is assumed that the
    7777 -"  g:netrw_list_cmd has a string, USEPORT HOSTNAME, that needs to be substituted
    7778 -"  with the requested remote hostname first.
    7779 -fun! s:NetrwBrowse(islocal,dirname)
    7780 -  if !exists("w:netrw_liststyle")|let w:netrw_liststyle= g:netrw_liststyle|endif
    7781 -"  call Dfunc("s:NetrwBrowse(islocal=".a:islocal." dirname<".a:dirname.">) liststyle=".w:netrw_liststyle." ".g:loaded_netrw." buf#".bufnr("%")."<".bufname("%")."> win#".winnr())
    7782 -"  call Decho("(NetrwBrowse) tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")." modified=".&modified." modifiable=".&modifiable." readonly=".&readonly)
    7783 -  " s:NetrwBrowse: initialize history {{{3
    7784 -  if !exists("s:netrw_initbookhist")
    7785 -   keepj call s:NetrwBookHistRead()
    7786 -  endif
    7787 +  if a:1 =~ '^ftp:'
    7788 +   " get host from ftp:... url
    7789 +   " access userid and password from hup (host-user-passwd) dictionary
    7790 +"   call Decho("case a:0=1: a:1<".a:1."> (get host from ftp:... url)")
    7791 +   let host = substitute(a:1,'^ftp:','','')
    7792 +   let host = substitute(host,'\..*','','')
    7793 +   if exists("s:netrw_hup[host]")
    7794 +    let g:netrw_uid    = s:netrw_hup[host].uid
    7795 +    let s:netrw_passwd = s:netrw_hup[host].passwd
    7796 +"    call Decho("get s:netrw_hup[".host."].uid   <".s:netrw_hup[host].uid.">")
    7797 +"    call Decho("get s:netrw_hup[".host."].passwd<".s:netrw_hup[host].passwd.">")
    7798 +   else
    7799 +    let g:netrw_uid    = input("Enter UserId: ")
    7800 +    let s:netrw_passwd = inputsecret("Enter Password: ")
    7801 +   endif
    7802  
    7803 -  " s:NetrwBrowse: simplify the dirname (especially for ".."s in dirnames) {{{3
    7804 -  if a:dirname !~ '^\a\+://'
    7805 -   let dirname= simplify(a:dirname)
    7806    else
    7807 -   let dirname= a:dirname
    7808 -  endif
    7809 -
    7810 -  if exists("s:netrw_skipbrowse")
    7811 -   unlet s:netrw_skipbrowse
    7812 -"   call Decho("(NetrwBrowse)  ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
    7813 -"   call Dret("s:NetrwBrowse : s:netrw_skipbrowse=".s:netrw_skipbrowse)
    7814 -   return
    7815 +   " case: one input argument, not an url.  Using it as a new user-id.
    7816 +"   call Decho("case a:0=1: a:1<".a:1."> (get host from input argument, not an url)")
    7817 +   if exists("g:netrw_machine")
    7818 +    if g:netrw_machine =~ '[0-9.]\+'
    7819 +     let host= g:netrw_machine
    7820 +    else
    7821 +     let host= substitute(g:netrw_machine,'\..*$','','')
    7822 +    endif
    7823 +   else
    7824 +    let g:netrw_machine= input('Enter hostname: ')
    7825 +   endif
    7826 +   let g:netrw_uid = a:1
    7827 +"   call Decho("set g:netrw_uid= <".g:netrw_uid.">")
    7828 +   if exists("g:netrw_passwd")
    7829 +    " ask for password if one not previously entered
    7830 +    let s:netrw_passwd= g:netrw_passwd
    7831 +   else
    7832 +    let s:netrw_passwd = inputsecret("Enter Password: ")
    7833 +   endif
    7834    endif
    7835  
    7836 -  " s:NetrwBrowse: sanity checks: {{{3
    7837 -  if !exists("*shellescape")
    7838 -   keepj call netrw#ErrorMsg(s:ERROR,"netrw can't run -- your vim is missing shellescape()",69)
    7839 -"   call Dret("s:NetrwBrowse : missing shellescape()")
    7840 -   return
    7841 -  endif
    7842 -  if !exists("*fnameescape")
    7843 -   keepj call netrw#ErrorMsg(s:ERROR,"netrw can't run -- your vim is missing fnameescape()",70)
    7844 -"   call Dret("s:NetrwBrowse : missing fnameescape()")
    7845 -   return
    7846 +"  call Decho("host<".host.">")
    7847 +  if exists("host")
    7848 +   if !exists('s:netrw_hup[host]')
    7849 +    let s:netrw_hup[host]= {}
    7850 +   endif
    7851 +   let s:netrw_hup[host].uid    = g:netrw_uid
    7852 +   let s:netrw_hup[host].passwd = s:netrw_passwd
    7853    endif
    7854  
    7855 -  " s:NetrwBrowse: save options: {{{3
    7856 -  call s:NetrwOptionSave("w:")                                                                                                           
    7857 + elseif a:0 == 2
    7858 +  let g:netrw_uid    = a:1
    7859 +  let s:netrw_passwd = a:2
    7860  
    7861 -  " s:NetrwBrowse: re-instate any marked files {{{3
    7862 -  if exists("s:netrwmarkfilelist_{bufnr('%')}")
    7863 -"   call Decho("(NetrwBrowse) clearing marked files")
    7864 -   exe "2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/"
    7865 + elseif a:0 == 3
    7866 +  " enter hostname, user-id, and password into the hup dictionary
    7867 +  let host = substitute(a:1,'^\a\+:','','')
    7868 +  let host = substitute(host,'\..*$','','')
    7869 +  if !exists('s:netrw_hup[host]')
    7870 +   let s:netrw_hup[host]= {}
    7871    endif
    7872 +  let s:netrw_hup[host].uid    = a:2
    7873 +  let s:netrw_hup[host].passwd = a:3
    7874 +  let g:netrw_uid              = s:netrw_hup[host].uid
    7875 +  let s:netrw_passwd           = s:netrw_hup[host].passwd
    7876 +"  call Decho("set s:netrw_hup[".host."].uid   <".s:netrw_hup[host].uid.">")
    7877 +"  call Decho("set s:netrw_hup[".host."].passwd<".s:netrw_hup[host].passwd.">")
    7878 + endif
    7879  
    7880 -  if a:islocal && exists("w:netrw_acdkeep") && w:netrw_acdkeep
    7881 -   " s:NetrwBrowse: set up "safe" options for local directory/file {{{3
    7882 -"   call Decho("(NetrwBrowse) handle w:netrw_acdkeep:")
    7883 -"   call Decho("(NetrwBrowse) keepjumps lcd ".fnameescape(dirname)." (due to w:netrw_acdkeep=".w:netrw_acdkeep." - acd=".&acd.")")
    7884 -   exe 'keepj lcd '.fnameescape(dirname)
    7885 -   call s:NetrwSafeOptions()
    7886 -"   call Decho("(NetrwBrowse) getcwd<".getcwd().">")
    7887 +" call Dret("NetUserPass : uid<".g:netrw_uid."> passwd<".s:netrw_passwd.">")
    7888 +endfun
    7889  
    7890 -  elseif !a:islocal && dirname !~ '[\/]$' && dirname !~ '^"'
    7891 -   " s:NetrwBrowse: looks like a remote regular file, attempt transfer {{{3
    7892 -"   call Decho("(NetrwBrowse) attempt transfer as regular file<".dirname.">")
    7893 +" ===========================================
    7894 +"  Shared Browsing Support:    {{{1
    7895 +" ===========================================
    7896  
    7897 -   " remove any filetype indicator from end of dirname, except for the
    7898 -   " "this is a directory" indicator (/).
    7899 -   " There shouldn't be one of those here, anyway.
    7900 -   let path= substitute(dirname,'[*=@|]\r\=$','','e')
    7901 -"   call Decho("(NetrwBrowse) new path<".path.">")
    7902 -   call s:RemotePathAnalysis(dirname)
    7903 -
    7904 -   " s:NetrwBrowse: remote-read the requested file into current buffer {{{3
    7905 -   keepj mark '
    7906 -   call s:NetrwEnew(dirname)
    7907 -   call s:NetrwSafeOptions()
    7908 -   setl ma noro
    7909 -"   call Decho("(NetrwBrowse) setl ma noro")
    7910 -   let b:netrw_curdir = dirname
    7911 -   let url            = s:method."://".s:user.s:machine.(s:port ? ":".s:port : "")."/".s:path
    7912 -"   call Decho("(NetrwBrowse) exe sil! keepalt file ".fnameescape(url)." (bt=".&bt.")")
    7913 -   exe "sil! keepj keepalt file ".fnameescape(url)
    7914 -   exe "sil! keepj keepalt doau BufReadPre ".fnameescape(s:fname)
    7915 -   sil call netrw#NetRead(2,url)
    7916 -   if s:path !~ '.tar.bz2$' && s:path !~ '.tar.gz' && s:path !~ '.tar.xz' && s:path !~ '.txz'
    7917 -    " netrw.vim and tar.vim have already handled decompression of the tarball; avoiding gzip.vim error
    7918 -    exe "sil keepj keepalt doau BufReadPost ".fnameescape(s:fname)
    7919 -   endif
    7920 -
    7921 -   " s:NetrwBrowse: save certain window-oriented variables into buffer-oriented variables {{{3
    7922 -   call s:SetBufWinVars()
    7923 -   call s:NetrwOptionRestore("w:")
    7924 -"   call Decho("(NetrwBrowse) setl ma nomod")
    7925 -   setl ma nomod
    7926 -"   call Decho("(NetrwBrowse)  ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
    7927 +" ---------------------------------------------------------------------
    7928 +" s:ExplorePatHls: converts an Explore pattern into a regular expression search pattern {{{2
    7929 +fun! s:ExplorePatHls(pattern)
    7930 +"  call Dfunc("s:ExplorePatHls(pattern<".a:pattern.">)")
    7931 +  let repat= substitute(a:pattern,'^**/\{1,2}','','')
    7932 +"  call Decho("repat<".repat.">")
    7933 +  let repat= escape(repat,'][.\')
    7934 +"  call Decho("repat<".repat.">")
    7935 +  let repat= '\<'.substitute(repat,'\*','\\(\\S\\+ \\)*\\S\\+','g').'\>'
    7936 +"  call Dret("s:ExplorePatHls repat<".repat.">")
    7937 +  return repat
    7938 +endfun
    7939  
    7940 -"   call Dret("s:NetrwBrowse : file<".s:fname.">")
    79415694+" ---------------------------------------------------------------------
    79425695+"  s:NetrwBookHistHandler: {{{2
     
    79525705+  if !exists("g:netrw_dirhistmax") || g:netrw_dirhistmax <= 0
    79535706+"   "  call Dret("s:NetrwBookHistHandler - suppressed due to g:netrw_dirhistmax")
     5707+   return
     5708   endif
     5709 
     5710   let ykeep= @@
     5711@@ -3338,13 +3266,13 @@
     5712 "    call Decho("changedir u#".g:netrw_dirhist_cnt."<".g:netrw_dirhist_{g:netrw_dirhist_cnt}.">")
     5713     if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir")
     5714      setl ma noro
     5715-"     call Decho("(NetrwBookHistHandler) setl ma noro")
     5716+"     call Decho("setl ma noro")
     5717      sil! keepj %d
     5718      setl nomod
     5719-"     call Decho("(NetrwBookHistHandler) setl nomod")
     5720-"     call Decho("(NetrwBookHistHandler)  ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
     5721+"     call Decho("setl nomod")
     5722+"     call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
     5723     endif
     5724-"    "    call Decho("exe e! ".fnameescape(g:netrw_dirhist_{g:netrw_dirhist_cnt}))
     5725+"    call Decho("exe e! ".fnameescape(g:netrw_dirhist_{g:netrw_dirhist_cnt}))
     5726     exe "keepj e! ".fnameescape(g:netrw_dirhist_{g:netrw_dirhist_cnt})
     5727    else
     5728     if g:netrw_dirhistmax > 0
     5729@@ -3363,11 +3291,11 @@
     5730     if exists("g:netrw_dirhist_{g:netrw_dirhist_cnt}")
     5731 "    call Decho("changedir U#".g:netrw_dirhist_cnt."<".g:netrw_dirhist_{g:netrw_dirhist_cnt}.">")
     5732      if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir")
     5733-"      call Decho("(NetrwBookHistHandler) setl ma noro")
     5734+"      call Decho("setl ma noro")
     5735       setl ma noro
     5736       sil! keepj %d
     5737 "      call Decho("removed all lines from buffer (%d)")
     5738-"      call Decho("(NetrwBookHistHandler) setl nomod")
     5739+"      call Decho("setl nomod")
     5740       setl nomod
     5741 "      call Decho("(set nomod)  ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
     5742      endif
     5743@@ -3505,7 +3433,9 @@
     5744 fun! s:NetrwBrowse(islocal,dirname)
     5745   if !exists("w:netrw_liststyle")|let w:netrw_liststyle= g:netrw_liststyle|endif
     5746 "  call Dfunc("s:NetrwBrowse(islocal=".a:islocal." dirname<".a:dirname.">) liststyle=".w:netrw_liststyle." ".g:loaded_netrw." buf#".bufnr("%")."<".bufname("%")."> win#".winnr())
     5747-"  call Decho("(NetrwBrowse) tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")." modified=".&modified." modifiable=".&modifiable." readonly=".&readonly)
     5748+"  call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")." modified=".&modified." modifiable=".&modifiable." readonly=".&readonly)
     5749+"  call Dredir("ls!")
     5750+
     5751   " s:NetrwBrowse: initialize history {{{3
     5752   if !exists("s:netrw_initbookhist")
     5753    keepj call s:NetrwBookHistRead()
     5754@@ -3520,8 +3450,8 @@
     5755 
     5756   if exists("s:netrw_skipbrowse")
     5757    unlet s:netrw_skipbrowse
     5758-"   call Decho("(NetrwBrowse)  ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
     5759-"   call Dret("s:NetrwBrowse : s:netrw_skipbrowse=".s:netrw_skipbrowse)
     5760+"   call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." filename<".expand("%")."> win#".winnr()." ft<".&ft.">")
     5761+"   call Dret("s:NetrwBrowse : s:netrw_skipbrowse existed")
    79545762    return
    79555763   endif
    79565764 
    7957 -  " use buffer-oriented WinVars if buffer variables exist but associated window variables don't {{{3
    7958 -  call s:UseBufWinVars()
    7959 -
    7960 -  " set up some variables {{{3
    7961 -  let b:netrw_browser_active = 1
    7962 -  let dirname                = dirname
    7963 -  let s:last_sort_by         = g:netrw_sort_by
    7964 -
    7965 -  " set up menu {{{3
    7966 -  keepj call s:NetrwMenu(1)
    7967 -
    7968 -  " get/set-up buffer {{{3
    7969 -  let reusing= s:NetrwGetBuffer(a:islocal,dirname)
    7970 -  " maintain markfile highlighting
    7971 -  if exists("s:netrwmarkfilemtch_{bufnr('%')}") && s:netrwmarkfilemtch_{bufnr("%")} != ""
     5765@@ -3542,27 +3472,27 @@
     5766 
     5767   " s:NetrwBrowse: re-instate any marked files {{{3
     5768   if exists("s:netrwmarkfilelist_{bufnr('%')}")
     5769-"   call Decho("(NetrwBrowse) clearing marked files")
     5770+"   call Decho("clearing marked files")
     5771    exe "2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/"
     5772   endif
     5773 
     5774   if a:islocal && exists("w:netrw_acdkeep") && w:netrw_acdkeep
     5775    " s:NetrwBrowse: set up "safe" options for local directory/file {{{3
     5776-"   call Decho("(NetrwBrowse) handle w:netrw_acdkeep:")
     5777-"   call Decho("(NetrwBrowse) keepjumps lcd ".fnameescape(dirname)." (due to w:netrw_acdkeep=".w:netrw_acdkeep." - acd=".&acd.")")
     5778-   exe 'keepj lcd '.fnameescape(dirname)
     5779+"   call Decho("handle w:netrw_acdkeep:")
     5780+"   call Decho("keepjumps lcd ".fnameescape(dirname)." (due to w:netrw_acdkeep=".w:netrw_acdkeep." - acd=".&acd.")")
     5781+   call s:NetrwLcd(dirname)
     5782    call s:NetrwSafeOptions()
     5783-"   call Decho("(NetrwBrowse) getcwd<".getcwd().">")
     5784+"   call Decho("getcwd<".getcwd().">")
     5785 
     5786   elseif !a:islocal && dirname !~ '[\/]$' && dirname !~ '^"'
     5787    " s:NetrwBrowse: looks like a remote regular file, attempt transfer {{{3
     5788-"   call Decho("(NetrwBrowse) attempt transfer as regular file<".dirname.">")
     5789+"   call Decho("attempt transfer as regular file<".dirname.">")
     5790 
     5791    " remove any filetype indicator from end of dirname, except for the
     5792    " "this is a directory" indicator (/).
     5793    " There shouldn't be one of those here, anyway.
     5794    let path= substitute(dirname,'[*=@|]\r\=$','','e')
     5795-"   call Decho("(NetrwBrowse) new path<".path.">")
     5796+"   call Decho("new path<".path.">")
     5797    call s:RemotePathAnalysis(dirname)
     5798 
     5799    " s:NetrwBrowse: remote-read the requested file into current buffer {{{3
     5800@@ -3570,24 +3500,33 @@
     5801    call s:NetrwEnew(dirname)
     5802    call s:NetrwSafeOptions()
     5803    setl ma noro
     5804-"   call Decho("(NetrwBrowse) setl ma noro")
     5805+"   call Decho("setl ma noro")
     5806    let b:netrw_curdir = dirname
     5807    let url            = s:method."://".s:user.s:machine.(s:port ? ":".s:port : "")."/".s:path
     5808-"   call Decho("(NetrwBrowse) exe sil! keepalt file ".fnameescape(url)." (bt=".&bt.")")
     5809+"   call Decho("exe sil! keepalt file ".fnameescape(url)." (bt=".&bt.")")
     5810    exe "sil! keepj keepalt file ".fnameescape(url)
     5811    exe "sil! keepj keepalt doau BufReadPre ".fnameescape(s:fname)
     5812    sil call netrw#NetRead(2,url)
     5813-   if s:path !~ '.tar.bz2$' && s:path !~ '.tar.gz' && s:path !~ '.tar.xz' && s:path !~ '.txz'
     5814-    " netrw.vim and tar.vim have already handled decompression of the tarball; avoiding gzip.vim error
     5815+   " netrw.vim and tar.vim have already handled decompression of the tarball; avoiding gzip.vim error
     5816+"   call Decho("url<".url.">")
     5817+"   call Decho("s:path<".s:path.">")
     5818+"   call Decho("s:fname<".s:fname.">")
     5819+   if s:path =~ '.bz2'
     5820+    exe "sil keepj keepalt doau BufReadPost ".fnameescape(substitute(s:fname,'\.bz2$','',''))
     5821+   elseif s:path =~ '.gz'
     5822+    exe "sil keepj keepalt doau BufReadPost ".fnameescape(substitute(s:fname,'\.gz$','',''))
     5823+   elseif s:path =~ '.gz'
     5824+    exe "sil keepj keepalt doau BufReadPost ".fnameescape(substitute(s:fname,'\.txz$','',''))
     5825+   else
     5826     exe "sil keepj keepalt doau BufReadPost ".fnameescape(s:fname)
     5827    endif
     5828 
     5829    " s:NetrwBrowse: save certain window-oriented variables into buffer-oriented variables {{{3
     5830    call s:SetBufWinVars()
     5831    call s:NetrwOptionRestore("w:")
     5832-"   call Decho("(NetrwBrowse) setl ma nomod")
     5833+"   call Decho("setl ma nomod")
     5834    setl ma nomod
     5835-"   call Decho("(NetrwBrowse)  ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
     5836+"   call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
     5837 
     5838 "   call Dret("s:NetrwBrowse : file<".s:fname.">")
     5839    return
     5840@@ -3608,28 +3547,31 @@
     5841   let reusing= s:NetrwGetBuffer(a:islocal,dirname)
     5842   " maintain markfile highlighting
     5843   if exists("s:netrwmarkfilemtch_{bufnr('%')}") && s:netrwmarkfilemtch_{bufnr("%")} != ""
    79725844-"   call Decho("(NetrwBrowse) bufnr(%)=".bufnr('%'))
    79735845-"   call Decho("(NetrwBrowse) exe 2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/")
    7974 -   exe "2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/"
    7975 -  else
     5846+"   call Decho("bufnr(%)=".bufnr('%'))
     5847+"   call Decho("exe 2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/")
     5848    exe "2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/"
     5849   else
    79765850-"   call Decho("(NetrwBrowse) 2match none")
    7977 -   2match none
    7978 -  endif
    7979 -  if reusing && line("$") > 1
    7980 -   call s:NetrwOptionRestore("w:")
     5851+"   call Decho("2match none")
     5852    2match none
     5853   endif
     5854   if reusing && line("$") > 1
     5855    call s:NetrwOptionRestore("w:")
    79815856-"   call Decho("(NetrwBrowse) setl noma nomod nowrap")
    7982 -   setl noma nomod nowrap
     5857+"   call Decho("setl noma nomod nowrap")
     5858    setl noma nomod nowrap
    79835859-"   call Decho("(NetrwBrowse) (set noma nomod nowrap)  ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
    7984 -"   call Dret("s:NetrwBrowse : re-using buffer")
    7985 -   return
    7986 -  endif
    7987 +  let ykeep= @@
    7988 +  if a:chg == 0
    7989 +   " bookmark the current directory
    7990 +"   call Decho("(user: <b>) bookmark the current directory")
    7991 +   if !exists("g:netrw_bookmarklist")
    7992 +    let g:netrw_bookmarklist= []
    7993 +   endif
    7994 +   if index(g:netrw_bookmarklist,a:curdir) == -1
    7995 +    " curdir not currently in g:netrw_bookmarklist, so include it
    7996 +    call add(g:netrw_bookmarklist,a:curdir)
    7997 +    call sort(g:netrw_bookmarklist)
    7998 +   endif
    7999 +   echo "bookmarked the current directory"
    8000  
    8001 -  " set b:netrw_curdir to the new directory name {{{3
     5860+"   call Decho("(set noma nomod nowrap)  ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
     5861 "   call Dret("s:NetrwBrowse : re-using buffer")
     5862    return
     5863   endif
     5864 
     5865   " set b:netrw_curdir to the new directory name {{{3
    80025866-"  call Decho("(NetrwBrowse) set b:netrw_curdir to the new directory name:  (buf#".bufnr("%").")")
    8003 -  let b:netrw_curdir= dirname
    8004 -  if b:netrw_curdir =~ '[/\\]$'
    8005 -   let b:netrw_curdir= substitute(b:netrw_curdir,'[/\\]$','','e')
    8006 -  endif
    8007 -  if b:netrw_curdir == ''
    8008 -   if has("amiga")
    8009 -    " On the Amiga, the empty string connotes the current directory
    8010 -    let b:netrw_curdir= getcwd()
    8011 +  elseif a:chg == 1
    8012 +   " change to the bookmarked directory
    8013 +"   call Decho("(user: <".v:count."gb>) change to the bookmarked directory")
    8014 +   if exists("g:netrw_bookmarklist[v:count-1]")
    8015 +"    call Decho("(user: <".v:count."gb>) bookmarklist=".string(g:netrw_bookmarklist))
    8016 +    exe "keepj e ".fnameescape(g:netrw_bookmarklist[v:count-1])
    8017     else
    8018 -    " under unix, when the root directory is encountered, the result
    8019 -    " from the preceding substitute is an empty string.
    8020 -    let b:netrw_curdir= '/'
    8021 +    echomsg "Sorry, bookmark#".v:count." doesn't exist!"
    8022     endif
    8023 -  endif
    8024 -  if !a:islocal && b:netrw_curdir !~ '/$'
    8025 -   let b:netrw_curdir= b:netrw_curdir.'/'
    8026 -  endif
     5867+"  call Decho("set b:netrw_curdir to the new directory name<".dirname."> (buf#".bufnr("%").")")
     5868   let b:netrw_curdir= dirname
     5869   if b:netrw_curdir =~ '[/\\]$'
     5870    let b:netrw_curdir= substitute(b:netrw_curdir,'[/\\]$','','e')
     5871   endif
     5872+  if b:netrw_curdir =~ '\a:$' && (has("win32") || has("win95") || has("win64") || has("win16"))
     5873+   let b:netrw_curdir= b:netrw_curdir."/"
     5874+  endif
     5875   if b:netrw_curdir == ''
     5876    if has("amiga")
     5877     " On the Amiga, the empty string connotes the current directory
     5878@@ -3643,39 +3585,23 @@
     5879   if !a:islocal && b:netrw_curdir !~ '/$'
     5880    let b:netrw_curdir= b:netrw_curdir.'/'
     5881   endif
    80275882-"  call Decho("(NetrwBrowse) b:netrw_curdir<".b:netrw_curdir.">")
    8028 -
    8029 -  " ------------
    8030 -  " (local only) {{{3
    8031 -  " ------------
    8032 -  if a:islocal
     5883+"  call Decho("b:netrw_curdir<".b:netrw_curdir.">")
     5884 
     5885   " ------------
     5886   " (local only) {{{3
     5887   " ------------
     5888   if a:islocal
    80335889-"   call Decho("(NetrwBrowse) local only:")
    8034 -
    8035 -   " Set up ShellCmdPost handling.  Append current buffer to browselist
    8036 -   call s:LocalFastBrowser()
    8037  
    8038 -  " handle g:netrw_keepdir: set vim's current directory to netrw's notion of the current directory {{{3
    8039 -   if !g:netrw_keepdir
     5890+"   call Decho("local only:")
     5891 
     5892    " Set up ShellCmdPost handling.  Append current buffer to browselist
     5893    call s:LocalFastBrowser()
     5894 
     5895   " handle g:netrw_keepdir: set vim's current directory to netrw's notion of the current directory {{{3
     5896    if !g:netrw_keepdir
    80405897-"    call Decho("(NetrwBrowse) handle g:netrw_keepdir=".g:netrw_keepdir.": getcwd<".getcwd()."> acd=".&acd)
    80415898-"    call Decho("(NetrwBrowse) l:acd".(exists("&l:acd")? "=".&l:acd : " doesn't exist"))
    8042 -    if !exists("&l:acd") || !&l:acd
     5899+"    call Decho("handle g:netrw_keepdir=".g:netrw_keepdir.": getcwd<".getcwd()."> acd=".&acd)
     5900+"    call Decho("l:acd".(exists("&l:acd")? "=".&l:acd : " doesn't exist"))
     5901     if !exists("&l:acd") || !&l:acd
    80435902-"     call Decho('exe keepjumps lcd '.fnameescape(b:netrw_curdir))
    80445903-     try
     
    80585917-      endif
    80595918-     endtry
    8060 -    endif
    8061 +  elseif a:chg == 2
    8062 +"   redraw!
    8063 +   let didwork= 0
    8064 +   " list user's bookmarks
    8065 +"   call Decho("(user: <q>) list user's bookmarks")
    8066 +   if exists("g:netrw_bookmarklist")
    8067 +"    call Decho('list '.len(g:netrw_bookmarklist).' bookmarks')
    8068 +    let cnt= 1
    8069 +    for bmd in g:netrw_bookmarklist
    8070 +"     call Decho("Netrw Bookmark#".cnt.": ".g:netrw_bookmarklist[cnt-1])
    8071 +     echo printf("Netrw Bookmark#%-2d: %s",cnt,g:netrw_bookmarklist[cnt-1])
    8072 +     let didwork = 1
    8073 +     let cnt     = cnt + 1
    8074 +    endfor
     5919+     call s:NetrwLcd(b:netrw_curdir)
     5920     endif
    80755921    endif
    80765922 
    8077 -  " --------------------------------
    8078 -  " remote handling: {{{3
    8079 -  " --------------------------------
    8080 -  else
     5923@@ -3683,23 +3609,23 @@
     5924   " remote handling: {{{3
     5925   " --------------------------------
     5926   else
    80815927-"   call Decho("(NetrwBrowse) remote only:")
    8082 -
    8083 -   " analyze dirname and g:netrw_list_cmd {{{3
     5928+"   call Decho("remote only:")
     5929 
     5930    " analyze dirname and g:netrw_list_cmd {{{3
    80845931-"   call Decho("(NetrwBrowse) b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : "doesn't exist")."> dirname<".dirname.">")
    8085 -   if dirname =~ "^NetrwTreeListing\>"
    8086 -    let dirname= b:netrw_curdir
     5932+"   call Decho("b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : "doesn't exist")."> dirname<".dirname.">")
     5933    if dirname =~ "^NetrwTreeListing\>"
     5934     let dirname= b:netrw_curdir
    80875935-"    call Decho("(NetrwBrowse) (dirname was <NetrwTreeListing>) dirname<".dirname.">")
    8088 -   elseif exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir")
    8089 -    let dirname= substitute(b:netrw_curdir,'\\','/','g')
    8090 -    if dirname !~ '/$'
    8091 -     let dirname= dirname.'/'
    8092 -    endif
    8093 -    let b:netrw_curdir = dirname
     5936+"    call Decho("(dirname was <NetrwTreeListing>) dirname<".dirname.">")
     5937    elseif exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir")
     5938     let dirname= substitute(b:netrw_curdir,'\\','/','g')
     5939     if dirname !~ '/$'
     5940      let dirname= dirname.'/'
     5941     endif
     5942     let b:netrw_curdir = dirname
    80945943-"    call Decho("(NetrwBrowse) (liststyle is TREELIST) dirname<".dirname.">")
    8095 +   " list directory history
    8096 +   let cnt     = g:netrw_dirhist_cnt
    8097 +   let first   = 1
    8098 +   let histcnt = 0
    8099 +   if g:netrw_dirhistmax > 0
    8100 +    while ( first || cnt != g:netrw_dirhist_cnt )
    8101 +"    call Decho("first=".first." cnt=".cnt." dirhist_cnt=".g:netrw_dirhist_cnt)
    8102 +     if exists("g:netrw_dirhist_{cnt}")
    8103 +"     call Decho("Netrw  History#".histcnt.": ".g:netrw_dirhist_{cnt})
    8104 +      echo printf("Netrw  History#%-2d: %s",histcnt,g:netrw_dirhist_{cnt})
    8105 +      let didwork= 1
    8106 +     endif
    8107 +     let histcnt = histcnt + 1
    8108 +     let first   = 0
    8109 +     let cnt     = ( cnt - 1 ) % g:netrw_dirhistmax
    8110 +     if cnt < 0
    8111 +      let cnt= cnt + g:netrw_dirhistmax
    8112 +     endif
    8113 +    endwhile
     5944+"    call Decho("(liststyle is TREELIST) dirname<".dirname.">")
    81145945    else
    8115 -    let dirname = substitute(dirname,'\\','/','g')
     5946     let dirname = substitute(dirname,'\\','/','g')
    81165947-"    call Decho("(NetrwBrowse) (normal) dirname<".dirname.">")
    8117 +    let g:netrw_dirhist_cnt= 0
    8118 +   endif
    8119 +   if didwork
    8120 +    call inputsave()|call input("Press <cr> to continue")|call inputrestore()
     5948+"    call Decho("(normal) dirname<".dirname.">")
    81215949    endif
    81225950 
    8123 -   let dirpat  = '^\(\w\{-}\)://\(\w\+@\)\=\([^/]\+\)/\(.*\)$'
    8124 -   if dirname !~ dirpat
    8125 -    if !exists("g:netrw_quiet")
    8126 -     keepj call netrw#ErrorMsg(s:ERROR,"netrw doesn't understand your dirname<".dirname.">",20)
    8127 +  elseif a:chg == 3
    8128 +   " saves most recently visited directories (when they differ)
    8129 +"   call Decho("(browsing) record curdir history")
    8130 +   if !exists("g:netrw_dirhist_cnt") || !exists("g:netrw_dirhist_{g:netrw_dirhist_cnt}") || g:netrw_dirhist_{g:netrw_dirhist_cnt} != a:curdir
    8131 +    if g:netrw_dirhistmax > 0
    8132 +     let g:netrw_dirhist_cnt                   = ( g:netrw_dirhist_cnt + 1 ) % g:netrw_dirhistmax
    8133 +     let g:netrw_dirhist_{g:netrw_dirhist_cnt} = a:curdir
     5951    let dirpat  = '^\(\w\{-}\)://\(\w\+@\)\=\([^/]\+\)/\(.*\)$'
     5952@@ -3708,37 +3634,34 @@
     5953      keepj call netrw#ErrorMsg(s:ERROR,"netrw doesn't understand your dirname<".dirname.">",20)
    81345954     endif
    8135 -    keepj call s:NetrwOptionRestore("w:")
     5955     keepj call s:NetrwOptionRestore("w:")
    81365956-"    call Decho("(NetrwBrowse) setl noma nomod nowrap")
    8137 -    setl noma nomod nowrap
     5957+"    call Decho("setl noma nomod nowrap")
     5958     setl noma nomod nowrap
    81385959-"    call Decho("(NetrwBrowse)  ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
    8139 -"    call Dret("s:NetrwBrowse : badly formatted dirname<".dirname.">")
    8140 -    return
    8141 +"    call Decho("save dirhist#".g:netrw_dirhist_cnt."<".g:netrw_dirhist_{g:netrw_dirhist_cnt}.">")
     5960+"    call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
     5961 "    call Dret("s:NetrwBrowse : badly formatted dirname<".dirname.">")
     5962     return
    81425963    endif
    8143 -   let b:netrw_curdir= dirname
     5964    let b:netrw_curdir= dirname
    81445965-"   call Decho("(NetrwBrowse) b:netrw_curdir<".b:netrw_curdir."> (remote)")
    8145 -  endif  " (additional remote handling)
    8146 -
    8147 -  " -----------------------
    8148 -  " Directory Listing: {{{3
    8149 -  " -----------------------
    8150 -  keepj call s:NetrwMaps(a:islocal)
    8151 -  keepj call s:PerformListing(a:islocal)
    8152 -  if v:version >= 700 && has("balloon_eval") && &beval == 0 && &l:bexpr == "" && !exists("g:netrw_nobeval")
     5966+"   call Decho("b:netrw_curdir<".b:netrw_curdir."> (remote)")
     5967   endif  " (additional remote handling)
     5968 
     5969   " -----------------------
     5970   " Directory Listing: {{{3
     5971   " -----------------------
     5972   keepj call s:NetrwMaps(a:islocal)
     5973+  keepj call s:NetrwCommands(a:islocal)
     5974   keepj call s:PerformListing(a:islocal)
     5975   if v:version >= 700 && has("balloon_eval") && &beval == 0 && &l:bexpr == "" && !exists("g:netrw_nobeval")
    81535976-   let &l:bexpr= "netrw#NetrwBalloonHelp()"
    81545977-"   call Decho("(NetrwBrowse) set up balloon help: l:bexpr=".&l:bexpr)
    81555978-   set beval
    8156 -  endif
    8157 -  call s:NetrwOptionRestore("w:")
    8158 -
     5979+   let &l:bexpr= "netrw#BalloonHelp()"
     5980+"   call Decho("set up balloon help: l:bexpr=".&l:bexpr)
     5981+   setl beval
     5982   endif
     5983   call s:NetrwOptionRestore("w:")
     5984 
    81595985-  " The s:LocalBrowseShellCmdRefresh() function is called by an autocmd
    8160 -  " installed by s:LocalFastBrowser() when g:netrw_fastbrowse <= 1 (ie. slow, medium speed).
     5986+  " The s:LocalBrowseRefresh() function is called by an autocmd
     5987   " installed by s:LocalFastBrowser() when g:netrw_fastbrowse <= 1 (ie. slow, medium speed).
    81615988-  " However, s:NetrwBrowse() causes the ShellCmdPost event itself to fire once; setting
    81625989-  " the variable below avoids that second refresh of the screen.  The s:LocalBrowseShellCmdRefresh()
     
    81645991-  " and skips the refresh and sets s:locbrowseshellcmd to zero. Oct 13, 2008
    81655992-  let s:locbrowseshellcmd= 1
    8166 -
     5993+  " However, s:NetrwBrowse() causes the FocusGained event to fire the firstt time.
     5994 
    81675995-"  call Decho("(NetrwBrowse) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
    8168 -"  call Dret("s:NetrwBrowse : did PerformListing  ft<".&ft.">")
    8169 -  return
    8170 -endfun
    8171  
    8172 -" ---------------------------------------------------------------------
    8173 -" s:NetrwFileInfo: supports qf (query for file information) {{{2
    8174 -fun! s:NetrwFileInfo(islocal,fname)
     5996+"  call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
     5997 "  call Dret("s:NetrwBrowse : did PerformListing  ft<".&ft.">")
     5998   return
     5999 endfun
     6000@@ -3746,20 +3669,33 @@
     6001 " ---------------------------------------------------------------------
     6002 " s:NetrwFileInfo: supports qf (query for file information) {{{2
     6003 fun! s:NetrwFileInfo(islocal,fname)
    81756004-"  call Dfunc("s:NetrwFileInfo(islocal=".a:islocal." fname<".a:fname.">)")
    8176 -  let ykeep= @@
    8177 -  if a:islocal
    8178 -   if (has("unix") || has("macunix")) && executable("/bin/ls")
     6005+"  call Dfunc("s:NetrwFileInfo(islocal=".a:islocal." fname<".a:fname.">) b:netrw_curdir<".b:netrw_curdir.">")
     6006   let ykeep= @@
     6007   if a:islocal
     6008    if (has("unix") || has("macunix")) && executable("/bin/ls")
    81796009-    if exists("b:netrw_curdir")
    81806010-"     call Decho('using ls with b:netrw_curdir<'.b:netrw_curdir.'>')
    8181 -     if b:netrw_curdir =~ '/$'
    8182 -      echo system("/bin/ls -lsad ".shellescape(b:netrw_curdir.a:fname))
    8183 -     else
    8184 -      echo system("/bin/ls -lsad ".shellescape(b:netrw_curdir."/".a:fname))
    8185 -     endif
    8186 -    else
    8187 -"     call Decho('using ls '.a:fname." using cwd<".getcwd().">")
    8188 -     echo system("/bin/ls -lsad ".shellescape(a:fname))
    8189 +  elseif a:chg == 4
    8190 +   " u: change to the previous directory stored on the history list
    8191 +"   call Decho("(user: <u>) chg to prev dir from history")
    8192 +   if g:netrw_dirhistmax > 0
    8193 +    let g:netrw_dirhist_cnt= ( g:netrw_dirhist_cnt - v:count1 ) % g:netrw_dirhistmax
    8194 +    if g:netrw_dirhist_cnt < 0
    8195 +     let g:netrw_dirhist_cnt= g:netrw_dirhist_cnt + g:netrw_dirhistmax
     6011+
     6012+    if getline(".") == "../"
     6013+     echo system("/bin/ls -lsad ".shellescape(".."))
     6014+"     call Decho("#1: echo system(/bin/ls -lsad ".shellescape(..).")")
     6015+
     6016+    elseif w:netrw_liststyle == s:TREELIST && getline(".") !~ '^'.s:treedepthstring
     6017+     echo system("/bin/ls -lsad ".shellescape(b:netrw_curdir))
     6018+"     call Decho("#2: echo system(/bin/ls -lsad ".shellescape(b:netrw_curdir).")")
     6019+
     6020+    elseif exists("b:netrw_curdir")
     6021      if b:netrw_curdir =~ '/$'
     6022       echo system("/bin/ls -lsad ".shellescape(b:netrw_curdir.a:fname))
     6023+"      call Decho("#3: echo system(/bin/ls -lsad ".shellescape(b:netrw_curdir.a:fname).")")
     6024+
     6025      else
     6026       echo system("/bin/ls -lsad ".shellescape(b:netrw_curdir."/".a:fname))
     6027+"      call Decho("#4: echo system(/bin/ls -lsad ".shellescape(b:netrw_curdir."/".a:fname).")")
     6028      endif
     6029+
     6030     else
     6031 "     call Decho('using ls '.a:fname." using cwd<".getcwd().">")
     6032      echo system("/bin/ls -lsad ".shellescape(a:fname))
     6033+"     call Decho("#5: echo system(/bin/ls -lsad ".shellescape(a:fname).")")
    81966034     endif
    81976035    else
    8198 -    " use vim functions to return information about file below cursor
    8199 -"    call Decho("using vim functions to query for file info")
    8200 -    if !isdirectory(a:fname) && !filereadable(a:fname) && a:fname =~ '[*@/]'
    8201 -     let fname= substitute(a:fname,".$","","")
    8202 +    let g:netrw_dirhist_cnt= 0
    8203 +   endif
    8204 +   if exists("g:netrw_dirhist_{g:netrw_dirhist_cnt}")
    8205 +"    call Decho("changedir u#".g:netrw_dirhist_cnt."<".g:netrw_dirhist_{g:netrw_dirhist_cnt}.">")
    8206 +    if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir")
    8207 +     setl ma noro
    8208 +"     call Decho("setl ma noro")
    8209 +     sil! keepj %d
    8210 +     setl nomod
    8211 +"     call Decho("setl nomod")
    8212 +"     call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
    8213 +    endif
    8214 +"    call Decho("exe e! ".fnameescape(g:netrw_dirhist_{g:netrw_dirhist_cnt}))
    8215 +    exe "keepj e! ".fnameescape(g:netrw_dirhist_{g:netrw_dirhist_cnt})
    8216 +   else
    8217 +    if g:netrw_dirhistmax > 0
    8218 +     let g:netrw_dirhist_cnt= ( g:netrw_dirhist_cnt + v:count1 ) % g:netrw_dirhistmax
    8219      else
    8220 -     let fname= a:fname
    8221 -    endif
    8222 -    let t  = getftime(fname)
    8223 -    let sz = getfsize(fname)
    8224 -    echo a:fname.":  ".sz."  ".strftime(g:netrw_timefmt,getftime(fname))
     6036     " use vim functions to return information about file below cursor
     6037@@ -3772,7 +3708,7 @@
     6038     let t  = getftime(fname)
     6039     let sz = getfsize(fname)
     6040     echo a:fname.":  ".sz."  ".strftime(g:netrw_timefmt,getftime(fname))
    82256041-"    call Decho(fname.":  ".sz."  ".strftime(g:netrw_timefmt,getftime(fname)))
    8226 -   endif
    8227 -  else
    8228 -   echo "sorry, \"qf\" not supported yet for remote files"
    8229 -  endif
    8230 -  let @@= ykeep
    8231 -"  call Dret("s:NetrwFileInfo")
    8232 -endfun
    8233 -
    8234 -" ---------------------------------------------------------------------
    8235 -" s:NetrwGetBuffer: {{{2
    8236 -"   returns 0=cleared buffer
    8237 -"           1=re-used buffer
    8238 -fun! s:NetrwGetBuffer(islocal,dirname)
    8239 -"  call Dfunc("s:NetrwGetBuffer(islocal=".a:islocal." dirname<".a:dirname.">) liststyle=".g:netrw_liststyle)
     6042+"    call Decho("fname.":  ".sz."  ".strftime(g:netrw_timefmt,getftime(fname)))
     6043    endif
     6044   else
     6045    echo "sorry, \"qf\" not supported yet for remote files"
     6046@@ -3787,40 +3723,42 @@
     6047 "           1=re-used buffer
     6048 fun! s:NetrwGetBuffer(islocal,dirname)
     6049 "  call Dfunc("s:NetrwGetBuffer(islocal=".a:islocal." dirname<".a:dirname.">) liststyle=".g:netrw_liststyle)
    82406050-"  call Decho("(NetrwGetBuffer) modiable=".&mod." modifiable=".&ma." readonly=".&ro)
    8241 -  let dirname= a:dirname
    8242 -
    8243 -  " re-use buffer if possible {{{3
     6051+"  call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo)
     6052   let dirname= a:dirname
     6053 
     6054   " re-use buffer if possible {{{3
    82446055-"  call Decho("(NetrwGetBuffer) --re-use a buffer if possible--")
    8245 -  if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST
    8246 -   " find NetrwTreeList buffer if there is one
     6056+"  call Decho("--re-use a buffer if possible--")
     6057   if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST
     6058    " find NetrwTreeList buffer if there is one
    82476059-"   call Decho("(NetrwGetBuffer) case liststyle=treelist: find NetrwTreeList buffer if there is one")
    8248 -   if exists("w:netrw_treebufnr") && w:netrw_treebufnr > 0
     6060+"   call Decho("case liststyle=treelist: find NetrwTreeList buffer if there is one")
     6061    if exists("w:netrw_treebufnr") && w:netrw_treebufnr > 0
    82496062-"    call Decho("(NetrwGetBuffer)   re-using w:netrw_treebufnr=".w:netrw_treebufnr)
    82506063-    setl mod
    82516064-    sil! keepj %d
    8252 -    let eikeep= &ei
     6065+"    call Decho("  re-using w:netrw_treebufnr=".w:netrw_treebufnr)
     6066     let eikeep= &ei
    82536067-    set ei=all
    82546068-    exe "sil! keepalt b ".w:netrw_treebufnr
    8255 -    let &ei= eikeep
    8256 -"    call Dret("s:NetrwGetBuffer 0<buffer cleared> : bufnum#".w:netrw_treebufnr."<NetrwTreeListing>")
    8257 -    return 0
    8258 -   endif
    8259 -   let bufnum= -1
     6069+    setl ei=all
     6070+    exe "sil! noswapfile keepalt b ".w:netrw_treebufnr
     6071     let &ei= eikeep
     6072+    setl ma
     6073+    sil! keepj %d
     6074+"    call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo)
     6075 "    call Dret("s:NetrwGetBuffer 0<buffer cleared> : bufnum#".w:netrw_treebufnr."<NetrwTreeListing>")
     6076     return 0
     6077    endif
     6078    let bufnum= -1
    82606079-"   call Decho("(NetrwGetBuffer)   liststyle=TREE but w:netrw_treebufnr doesn't exist")
    8261 -
    8262 -  else
    8263 -   " find buffer number of buffer named precisely the same as dirname {{{3
     6080+"   call Decho("  liststyle=TREE but w:netrw_treebufnr doesn't exist")
     6081 
     6082   else
     6083    " find buffer number of buffer named precisely the same as dirname {{{3
    82646084-"   call Decho("(NetrwGetBuffer) case listtyle not treelist: find buffer numnber of buffer named precisely the same as dirname--")
    8265 -
    8266 -   " get dirname and associated buffer number
    8267 -   let bufnum  = bufnr(escape(dirname,'\'))
     6085+"   call Decho("case listtyle not treelist: find buffer numnber of buffer named precisely the same as dirname--")
     6086+"   call Dredir("(NetrwGetBuffer) ls!","ls!")
     6087 
     6088    " get dirname and associated buffer number
     6089    let bufnum  = bufnr(escape(dirname,'\'))
    82686090-"   call Decho("(NetrwGetBuffer)   find buffer<".dirname.">'s number ")
    82696091-"   call Decho("(NetrwGetBuffer)   bufnr(dirname<".escape(dirname,'\').">)=".bufnum)
    8270 -
    8271 -   if bufnum < 0 && dirname !~ '/$'
    8272 -    " try appending a trailing /
     6092+"   call Decho("  find buffer<".dirname.">'s number ")
     6093+"   call Decho("  bufnr(dirname<".escape(dirname,'\').">)=".bufnum)
     6094 
     6095    if bufnum < 0 && dirname !~ '/$'
     6096     " try appending a trailing /
    82736097-"    call Decho("(NetrwGetBuffer)   try appending a trailing / to dirname<".dirname.">")
    8274 -    let bufnum= bufnr(escape(dirname.'/','\'))
    8275 -    if bufnum > 0
    8276 -     let dirname= dirname.'/'
    8277 -    endif
    8278 -   endif
    8279 -
    8280 -   if bufnum < 0 && dirname =~ '/$'
    8281 -    " try removing a trailing /
     6098+"    call Decho("  try appending a trailing / to dirname<".dirname.">")
     6099     let bufnum= bufnr(escape(dirname.'/','\'))
     6100     if bufnum > 0
     6101      let dirname= dirname.'/'
     6102@@ -3829,30 +3767,30 @@
     6103 
     6104    if bufnum < 0 && dirname =~ '/$'
     6105     " try removing a trailing /
    82826106-"    call Decho("(NetrwGetBuffer)   try removing a trailing / from dirname<".dirname.">")
    8283 -    let bufnum= bufnr(escape(substitute(dirname,'/$','',''),'\'))
    8284 -    if bufnum > 0
    8285 -     let dirname= substitute(dirname,'/$','','')
    8286 +     let g:netrw_dirhist_cnt= 0
     6107+"    call Decho("  try removing a trailing / from dirname<".dirname.">")
     6108     let bufnum= bufnr(escape(substitute(dirname,'/$','',''),'\'))
     6109     if bufnum > 0
     6110      let dirname= substitute(dirname,'/$','','')
    82876111     endif
    8288 +    echo "Sorry, no predecessor directory exists yet"
    82896112    endif
    82906113 
    82916114-"   call Decho("(NetrwGetBuffer)   findbuf1: bufnum=bufnr('".dirname."')=".bufnum." bufname(".bufnum.")<".bufname(bufnum)."> (initial)")
    8292 -   " note: !~ was used just below, but that means using ../ to go back would match (ie. abc/def/  and abc/ matches)
    8293 -   if bufnum > 0 && bufname(bufnum) != dirname && bufname(bufnum) != '.'
    8294 -    " handle approximate matches
     6115+"   call Decho("  findbuf1: bufnum=bufnr('".dirname."')=".bufnum." bufname(".bufnum.")<".bufname(bufnum)."> (initial)")
     6116    " note: !~ was used just below, but that means using ../ to go back would match (ie. abc/def/  and abc/ matches)
     6117    if bufnum > 0 && bufname(bufnum) != dirname && bufname(bufnum) != '.'
     6118     " handle approximate matches
    82956119-"    call Decho("(NetrwGetBuffer)   handling approx match: bufnum#".bufnum.">0 AND bufname<".bufname(bufnum).">!=dirname<".dirname."> AND bufname(".bufnum.")!='.'")
    8296 -    let ibuf    = 1
    8297 -    let buflast = bufnr("$")
     6120+"    call Decho("  handling approx match: bufnum#".bufnum.">0 AND bufname<".bufname(bufnum).">!=dirname<".dirname."> AND bufname(".bufnum.")!='.'")
     6121     let ibuf    = 1
     6122     let buflast = bufnr("$")
    82986123-"    call Decho("(NetrwGetBuffer)   findbuf2: buflast=bufnr($)=".buflast)
    8299 -    while ibuf <= buflast
    8300 -     let bname= substitute(bufname(ibuf),'\\','/','g')
    8301 -     let bname= substitute(bname,'.\zs/$','','')
     6124+"    call Decho("  findbuf2: buflast=bufnr($)=".buflast)
     6125     while ibuf <= buflast
     6126      let bname= substitute(bufname(ibuf),'\\','/','g')
     6127      let bname= substitute(bname,'.\zs/$','','')
    83026128-"     call Decho("(NetrwGetBuffer)   findbuf3: while [ibuf=",ibuf."]<=[buflast=".buflast."]: dirname<".dirname."> bname=bufname(".ibuf.")<".bname.">")
    8303 -     if bname != '' && dirname =~ '/'.bname.'/\=$' && dirname !~ '^/'
    8304 -      " bname is not empty
    8305 -      " dirname ends with bname,
    8306 -      " dirname doesn't start with /, so its not a absolute path
     6129+"     call Decho("  findbuf3: while [ibuf=",ibuf."]<=[buflast=".buflast."]: dirname<".dirname."> bname=bufname(".ibuf.")<".bname.">")
     6130      if bname != '' && dirname =~ '/'.bname.'/\=$' && dirname !~ '^/'
     6131       " bname is not empty
     6132       " dirname ends with bname,
     6133       " dirname doesn't start with /, so its not a absolute path
    83076134-"      call Decho("(NetrwGetBuffer)   findbuf3a: passes test 1 : dirname<".dirname.'> =~ /'.bname.'/\=$ && dirname !~ ^/')
    8308 -      break
    8309 -     endif
    8310 -     if bname =~ '^'.dirname.'/\=$'
    8311 -      " bname begins with dirname
    8312 -"      call Decho('  findbuf3b: passes test 2 : bname<'.bname.'>=~^'.dirname.'/\=$')
    8313 -      break
    8314 -     endif
    8315 -     if dirname =~ '^'.bname.'/$'
    8316 -"      call Decho('  findbuf3c: passes test 3 : dirname<'.dirname.'>=~^'.bname.'/$')
    8317 -      break
    8318 -     endif
    8319 -     if bname != '' && dirname =~ '/'.bname.'$' && bname == bufname("%") && line("$") == 1
    8320 -"      call Decho('  findbuf3d: passes test 4 : dirname<'.dirname.'>=~ /'.bname.'$')
    8321 -      break
    8322 +  elseif a:chg == 5
    8323 +   " U: change to the subsequent directory stored on the history list
    8324 +"   call Decho("(user: <U>) chg to next dir from history")
    8325 +   if g:netrw_dirhistmax > 0
    8326 +    let g:netrw_dirhist_cnt= ( g:netrw_dirhist_cnt + 1 ) % g:netrw_dirhistmax
    8327 +    if exists("g:netrw_dirhist_{g:netrw_dirhist_cnt}")
    8328 +"    call Decho("changedir U#".g:netrw_dirhist_cnt."<".g:netrw_dirhist_{g:netrw_dirhist_cnt}.">")
    8329 +     if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir")
    8330 +"      call Decho("setl ma noro")
    8331 +      setl ma noro
    8332 +      sil! keepj %d
    8333 +"      call Decho("removed all lines from buffer (%d)")
    8334 +"      call Decho("setl nomod")
    8335 +      setl nomod
    8336 +"      call Decho("(set nomod)  ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
     6135+"      call Decho("  findbuf3a: passes test 1 : dirname<".dirname.'> =~ /'.bname.'/\=$ && dirname !~ ^/')
     6136       break
    83376137      endif
    8338 -     let ibuf= ibuf + 1
    8339 -    endwhile
    8340 -    if ibuf > buflast
    8341 -     let bufnum= -1
    8342 -    else
    8343 -     let bufnum= ibuf
    8344 -    endif
     6138      if bname =~ '^'.dirname.'/\=$'
     6139@@ -3875,79 +3813,83 @@
     6140     else
     6141      let bufnum= ibuf
     6142     endif
    83456143-"    call Decho("(NetrwGetBuffer)   findbuf4: bufnum=".bufnum." (ibuf=".ibuf." buflast=".buflast.")")
    8346 -   endif
    8347 -  endif
    8348 -
    8349 -  " get enew buffer and name it -or- re-use buffer {{{3
     6144+"    call Decho("  findbuf4: bufnum=".bufnum." (ibuf=".ibuf." buflast=".buflast.")")
     6145    endif
     6146   endif
     6147 
     6148   " get enew buffer and name it -or- re-use buffer {{{3
    83506149-"  call Decho("(NetrwGetBuffer)   get enew buffer and name it OR re-use buffer")
    8351 -  sil! keepj keepalt mark '
    8352 -  if bufnum < 0 || !bufexists(bufnum)
     6150+"  call Decho("  get enew buffer and name it OR re-use buffer")
     6151   sil! keepj keepalt mark '
     6152   if bufnum < 0 || !bufexists(bufnum)
    83536153-"   call Decho("(NetrwGetBuffer) --get enew buffer and name it  (bufnum#".bufnum."<0 OR bufexists(".bufnum.")=".bufexists(bufnum)."==0)")
    8354 -   call s:NetrwEnew(dirname)
     6154+"   call Decho("--get enew buffer and name it  (bufnum#".bufnum."<0 OR bufexists(".bufnum.")=".bufexists(bufnum)."==0)")
     6155    call s:NetrwEnew(dirname)
    83556156-"   call Decho("(NetrwGetBuffer)   got enew buffer#".bufnr("%")." (altbuf<".expand("#").">)")
    8356 -   " name the buffer
    8357 -   if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST
    8358 -    " Got enew buffer; transform into a NetrwTreeListing
     6157+"   call Decho("  got enew buffer#".bufnr("%")." (altbuf<".expand("#").">)")
     6158    " name the buffer
     6159    if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST
     6160     " Got enew buffer; transform into a NetrwTreeListing
    83596161-"    call Decho("(NetrwGetBuffer) --transform enew buffer#".bufnr("%")." into a NetrwTreeListing --")
    8360 -    if !exists("s:netrw_treelistnum")
    8361 -     let s:netrw_treelistnum= 1
    8362 +"    call Decho("exe e! ".fnameescape(g:netrw_dirhist_{g:netrw_dirhist_cnt}))
    8363 +     exe "keepj e! ".fnameescape(g:netrw_dirhist_{g:netrw_dirhist_cnt})
     6162+"    call Decho("--transform enew buffer#".bufnr("%")." into a NetrwTreeListing --")
     6163     if !exists("s:netrw_treelistnum")
     6164      let s:netrw_treelistnum= 1
    83646165     else
    8365 -     let s:netrw_treelistnum= s:netrw_treelistnum + 1
    8366 +     let g:netrw_dirhist_cnt= ( g:netrw_dirhist_cnt - 1 ) % g:netrw_dirhistmax
    8367 +     if g:netrw_dirhist_cnt < 0
    8368 +      let g:netrw_dirhist_cnt= g:netrw_dirhist_cnt + g:netrw_dirhistmax
    8369 +     endif
    8370 +     echo "Sorry, no successor directory exists yet"
     6166      let s:netrw_treelistnum= s:netrw_treelistnum + 1
    83716167     endif
    8372 -    let w:netrw_treebufnr= bufnr("%")
     6168     let w:netrw_treebufnr= bufnr("%")
    83736169-"    call Decho("(NetrwGetBuffer)   exe sil! keepalt file NetrwTreeListing ".fnameescape(s:netrw_treelistnum))
    8374 -    exe 'sil! keepalt file NetrwTreeListing\ '.fnameescape(s:netrw_treelistnum)
     6170+"    call Decho("  exe sil! keepalt file NetrwTreeListing ".fnameescape(s:netrw_treelistnum))
     6171     exe 'sil! keepalt file NetrwTreeListing\ '.fnameescape(s:netrw_treelistnum)
    83756172-    set bt=nofile noswf
    8376 -    nnoremap <silent> <buffer> [       :sil call <SID>TreeListMove('[')<cr>
    8377 -    nnoremap <silent> <buffer> ]       :sil call <SID>TreeListMove(']')<cr>
    8378 -    nnoremap <silent> <buffer> [[       :sil call <SID>TreeListMove('[')<cr>
    8379 -    nnoremap <silent> <buffer> ]]       :sil call <SID>TreeListMove(']')<cr>
     6173+    setl bt=nofile noswf
     6174     nnoremap <silent> <buffer> [       :sil call <SID>TreeListMove('[')<cr>
     6175     nnoremap <silent> <buffer> ]       :sil call <SID>TreeListMove(']')<cr>
     6176     nnoremap <silent> <buffer> [[       :sil call <SID>TreeListMove('[')<cr>
     6177     nnoremap <silent> <buffer> ]]       :sil call <SID>TreeListMove(']')<cr>
    83806178-"    call Decho("(NetrwGetBuffer)   tree listing#".s:netrw_treelistnum." bufnr=".w:netrw_treebufnr)
     6179+"    call Decho("  tree listing#".s:netrw_treelistnum." bufnr=".w:netrw_treebufnr)
    83816180    else
    8382 -"    let v:errmsg= "" " Decho
    8383 -    let escdirname= fnameescape(dirname)
     6181 "    let v:errmsg= "" " Decho
     6182     let escdirname= fnameescape(dirname)
    83846183-"    call Decho("(NetrwGetBuffer)   errmsg<".v:errmsg."> bufnr(escdirname<".escdirname.">)=".bufnr(escdirname)." bufname()<".bufname(bufnr(escdirname)).">")
    8385 -"    call Decho('  exe sil! keepalt file '.escdirname)
    8386 -"    let v:errmsg= "" " Decho
    8387 -    exe 'sil! keepalt file '.escdirname
     6184+"    call Decho("  errmsg<".v:errmsg."> bufnr(escdirname<".escdirname.">)=".bufnr(escdirname)." bufname()<".bufname(bufnr(escdirname)).">")
     6185 "    call Decho('  exe sil! keepalt file '.escdirname)
     6186 "    let v:errmsg= "" " Decho
     6187     exe 'sil! keepalt file '.escdirname
    83886188-"    call Decho("(NetrwGetBuffer)   errmsg<".v:errmsg."> bufnr(".escdirname.")=".bufnr(escdirname)."<".bufname(bufnr(escdirname)).">")
    8389 +    let g:netrw_dirhist_cnt= 0
    8390 +    echo "Sorry, no successor directory exists yet (g:netrw_dirhistmax is ".g:netrw_dirhistmax.")"
     6189+"    call Decho("  errmsg<".v:errmsg."> bufnr(".escdirname.")=".bufnr(escdirname)."<".bufname(bufnr(escdirname)).">")
    83916190    endif
    83926191-"   call Decho("(NetrwGetBuffer)   named enew buffer#".bufnr("%")."<".bufname("%").">")
    8393  
    8394 -  else " Re-use the buffer
     6192+"   call Decho("  named enew buffer#".bufnr("%")."<".bufname("%").">")
     6193 
     6194   else " Re-use the buffer
    83956195-"   call Decho("(NetrwGetBuffer) --re-use buffer#".bufnum." (bufnum#".bufnum.">=0 AND bufexists(".bufnum.")=".bufexists(bufnum)."!=0)")
    8396 -   let eikeep= &ei
     6196+"   call Decho("--re-use buffer#".bufnum." (bufnum#".bufnum.">=0 AND bufexists(".bufnum.")=".bufexists(bufnum)."!=0)")
     6197    let eikeep= &ei
    83976198-   set ei=all
    8398 -   if getline(2) =~ '^" Netrw Directory Listing'
     6199+   setl ei=all
     6200    if getline(2) =~ '^" Netrw Directory Listing'
    83996201-"    call Decho("(NetrwGetBuffer)   getline(2)<".getline(2).'> matches "Netrw Directory Listing" : using keepalt b '.bufnum)
    84006202-    exe "sil! keepalt b ".bufnum
    8401 -   else
     6203+"    call Decho("  getline(2)<".getline(2).'> matches "Netrw Directory Listing" : using keepalt b '.bufnum)
     6204+    exe "sil! noswapfile keepalt b ".bufnum
     6205    else
    84026206-"    call Decho("(NetrwGetBuffer)   getline(2)<".getline(2).'> does not match "Netrw Directory Listing" : using b '.bufnum)
    84036207-    exe "sil! keepalt b ".bufnum
    8404 -   endif
    8405 -   if bufname("%") == '.'
     6208+"    call Decho("  getline(2)<".getline(2).'> does not match "Netrw Directory Listing" : using b '.bufnum)
     6209+    exe "sil! noswapfile keepalt b ".bufnum
     6210    endif
     6211    if bufname("%") == '.'
    84066212-"    call Decho("(NetrwGetBuffer) exe sil! keepalt file ".fnameescape(getcwd()))
    8407 -    exe "sil! keepalt file ".fnameescape(getcwd())
    8408 -   endif
    8409 -   let &ei= eikeep
    8410 -   if line("$") <= 1
    8411 -    keepj call s:NetrwListSettings(a:islocal)
    8412 -"    call Dret("s:NetrwGetBuffer 0<buffer empty> : re-using buffer#".bufnr("%").", but its empty, so refresh it")
    8413 -    return 0
    8414 -   elseif g:netrw_fastbrowse == 0 || (a:islocal && g:netrw_fastbrowse == 1)
    8415 -    keepj call s:NetrwListSettings(a:islocal)
    8416 -    sil keepj %d
    8417 -"    call Dret("s:NetrwGetBuffer 0<cleared buffer> : re-using buffer#".bufnr("%").", but refreshing due to g:netrw_fastbrowse=".g:netrw_fastbrowse)
    8418 -    return 0
    8419 -   elseif exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST
     6213+"    call Decho("exe sil! keepalt file ".fnameescape(getcwd()))
     6214     exe "sil! keepalt file ".fnameescape(getcwd())
     6215    endif
     6216    let &ei= eikeep
     6217    if line("$") <= 1
     6218     keepj call s:NetrwListSettings(a:islocal)
     6219+"    call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo)
     6220 "    call Dret("s:NetrwGetBuffer 0<buffer empty> : re-using buffer#".bufnr("%").", but its empty, so refresh it")
     6221     return 0
     6222    elseif g:netrw_fastbrowse == 0 || (a:islocal && g:netrw_fastbrowse == 1)
     6223     keepj call s:NetrwListSettings(a:islocal)
     6224     sil keepj %d
     6225+"    call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo)
     6226 "    call Dret("s:NetrwGetBuffer 0<cleared buffer> : re-using buffer#".bufnr("%").", but refreshing due to g:netrw_fastbrowse=".g:netrw_fastbrowse)
     6227     return 0
     6228    elseif exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST
    84206229-"    call Decho("(NetrwGetBuffer) --re-use tree listing--")
    84216230-"    call Decho("(NetrwGetBuffer)   clear buffer<".expand("%")."> with :%d")
    8422 -    sil keepj %d
    8423 -    keepj call s:NetrwListSettings(a:islocal)
    8424 -"    call Dret("s:NetrwGetBuffer 0<cleared buffer> : re-using buffer#".bufnr("%").", but treelist mode always needs a refresh")
    8425 -    return 0
    8426 -   else
    8427 -"    call Dret("s:NetrwGetBuffer 1<buffer not cleared> : buf#".bufnr("%"))
    8428 -    return 1
    8429 +  elseif a:chg == 6
    8430 +   " delete the v:count'th bookmark
    8431 +"   call Decho("delete bookmark#".v:count."<".g:netrw_bookmarklist[v:count-1].">")
    8432 +   let savefile= s:NetrwHome()."/.netrwbook"
    8433 +   if filereadable(savefile)
    8434 +"    call Decho("merge bookmarks (active and file)")
    8435 +    keepj call s:NetrwBookHistSave() " done here to merge bookmarks first
    8436 +"    call Decho("bookmark delete savefile<".savefile.">")
    8437 +    keepj call delete(savefile)
     6231+"    call Decho("--re-use tree listing--")
     6232+"    call Decho("  clear buffer<".expand("%")."> with :%d")
     6233     sil keepj %d
     6234     keepj call s:NetrwListSettings(a:islocal)
     6235+"    call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo)
     6236 "    call Dret("s:NetrwGetBuffer 0<cleared buffer> : re-using buffer#".bufnr("%").", but treelist mode always needs a refresh")
     6237     return 0
     6238    else
     6239+"    call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo)
     6240 "    call Dret("s:NetrwGetBuffer 1<buffer not cleared> : buf#".bufnr("%"))
     6241     return 1
    84386242    endif
    8439 +"   call Decho("remove g:netrw_bookmarklist[".(v:count-1)."]")
    8440 +   keepj call remove(g:netrw_bookmarklist,v:count-1)
    8441 +"   call Decho("resulting g:netrw_bookmarklist=".string(g:netrw_bookmarklist))
    8442    endif
    8443 -
    8444 -  " do netrw settings: make this buffer not-a-file, modifiable, not line-numbered, etc {{{3
    8445 -  "     fastbrowse  Local  Remote   Hiding a buffer implies it may be re-used (fast)
    8446 -  "  slow   0         D      D      Deleting a buffer implies it will not be re-used (slow)
    8447 -  "  med    1         D      H
    8448 -  "  fast   2         H      H
     6243@@ -3958,18 +3900,19 @@
     6244   "  slow   0         D      D      Deleting a buffer implies it will not be re-used (slow)
     6245   "  med    1         D      H
     6246   "  fast   2         H      H
    84496247-"  call Decho("(NetrwGetBuffer) --do netrw settings: make this buffer#".bufnr("%")." not-a-file, modifiable, not line-numbered, etc--")
    8450 -  let fname= expand("%")
    8451 -  keepj call s:NetrwListSettings(a:islocal)
     6248+"  call Decho("--do netrw settings: make this buffer#".bufnr("%")." not-a-file, modifiable, not line-numbered, etc--")
     6249   let fname= expand("%")
     6250   keepj call s:NetrwListSettings(a:islocal)
    84526251-"  call Decho("(NetrwGetBuffer) exe sil! keepalt file ".fnameescape(fname))
    8453 -  exe "sil! keepj keepalt file ".fnameescape(fname)
    8454 -
    8455 -  " delete all lines from buffer {{{3
     6252+"  call Decho("exe sil! keepalt file ".fnameescape(fname))
     6253   exe "sil! keepj keepalt file ".fnameescape(fname)
     6254 
     6255   " delete all lines from buffer {{{3
    84566256-"  call Decho("(NetrwGetBuffer) --delete all lines from buffer--")
    84576257-"  call Decho("(NetrwGetBuffer)   clear buffer<".expand("%")."> with :%d")
    8458 -  sil! keepalt keepj %d
    8459 -
     6258+"  call Decho("--delete all lines from buffer--")
     6259+"  call Decho("  clear buffer<".expand("%")."> with :%d")
     6260   sil! keepalt keepj %d
     6261 
    84606262-"  call Dret("s:NetrwGetBuffer 0<cleared buffer> : tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> modified=".&modified." modifiable=".&modifiable." readonly=".&readonly)
    8461 -  return 0
    8462 +  call s:NetrwBookmarkMenu()
    8463 +  call s:NetrwTgtMenu()
    8464 +  let @@= ykeep
    8465 +"  call Dret("s:NetrwBookHistHandler")
     6263+"  call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo)
     6264+"  call Dret("s:NetrwGetBuffer 0<cleared buffer> : tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%"))
     6265   return 0
    84666266 endfun
    84676267 
    8468  " ---------------------------------------------------------------------
    8469 -" s:NetrwGetcwd: get the current directory. {{{2
    8470 -"   Change backslashes to forward slashes, if any.
    8471 -"   If doesc is true, escape certain troublesome characters
    8472 -fun! s:NetrwGetcwd(doesc)
    8473 -"  call Dfunc("NetrwGetcwd(doesc=".a:doesc.")")
    8474 -  let curdir= substitute(getcwd(),'\\','/','ge')
    8475 -  if curdir !~ '[\/]$'
    8476 -   let curdir= curdir.'/'
    8477 +" s:NetrwBookHistRead: this function reads bookmarks and history {{{2
    8478 +"                      Sister function: s:NetrwBookHistSave()
    8479 +fun! s:NetrwBookHistRead()
    8480 +"  call Dfunc("s:NetrwBookHistRead()")
    8481 +  if !exists("g:netrw_dirhistmax") || g:netrw_dirhistmax <= 0
    8482 +"   "  call Dret("s:NetrwBookHistRead - suppressed due to g:netrw_dirhistmax")
    8483 +   return
    8484    endif
    8485 -  if a:doesc
    8486 -   let curdir= fnameescape(curdir)
    8487 +  let ykeep= @@
    8488 +  if !exists("s:netrw_initbookhist")
    8489 +   let home    = s:NetrwHome()
    8490 +   let savefile= home."/.netrwbook"
    8491 +   if filereadable(savefile)
    8492 +"    call Decho("sourcing .netrwbook")
    8493 +    exe "keepalt keepj so ".savefile
    8494 +   endif
    8495 +   if g:netrw_dirhistmax > 0
    8496 +    let savefile= home."/.netrwhist"
    8497 +    if filereadable(savefile)
    8498 +"    call Decho("sourcing .netrwhist")
    8499 +     exe "keepalt keepj so ".savefile
    8500 +    endif
    8501 +    let s:netrw_initbookhist= 1
    8502 +    au VimLeave * call s:NetrwBookHistSave()
    8503 +   endif
    8504    endif
    8505 -"  call Dret("NetrwGetcwd <".curdir.">")
    8506 -  return curdir
    8507 +  let @@= ykeep
    8508 +"  call Dret("s:NetrwBookHistRead")
    8509  endfun
    8510  
    8511  " ---------------------------------------------------------------------
    8512 -"  s:NetrwGetWord: it gets the directory/file named under the cursor {{{2
    8513 -fun! s:NetrwGetWord()
    8514 -"  call Dfunc("s:NetrwGetWord() line#".line(".")." liststyle=".g:netrw_liststyle." virtcol=".virtcol("."))
    8515 -  call s:UseBufWinVars()
    8516 -
    8517 -  " insure that w:netrw_liststyle is set up
    8518 -  if !exists("w:netrw_liststyle")
    8519 -   if exists("g:netrw_liststyle")
    8520 -    let w:netrw_liststyle= g:netrw_liststyle
    8521 -   else
    8522 -    let w:netrw_liststyle= s:THINLIST
    8523 -   endif
    8524 -"   call Decho("w:netrw_liststyle=".w:netrw_liststyle)
    8525 +" s:NetrwBookHistSave: this function saves bookmarks and history {{{2
    8526 +"                      Sister function: s:NetrwBookHistRead()
    8527 +"                      I used to do this via viminfo but that appears to
    8528 +"                      be unreliable for long-term storage
    8529 +fun! s:NetrwBookHistSave()
    8530 +"  call Dfunc("s:NetrwBookHistSave() dirhistmax=".g:netrw_dirhistmax)
    8531 +  if !exists("g:netrw_dirhistmax") || g:netrw_dirhistmax <= 0
    8532 +"   call Dret("s:NetrwBookHistSave : dirhistmax=".g:netrw_dirhistmax)
    8533 +   return
    8534    endif
    8535  
    8536 -  if exists("w:netrw_bannercnt") && line(".") < w:netrw_bannercnt
    8537 -   " Active Banner support
    8538 -"   call Decho("active banner handling")
    8539 -   keepj norm! 0
    8540 -   let dirname= "./"
    8541 -   let curline= getline('.')
    8542 -
    8543 -   if curline =~ '"\s*Sorted by\s'
    8544 -    keepj norm s
    8545 -    let s:netrw_skipbrowse= 1
    8546 -    echo 'Pressing "s" also works'
    8547 -
    8548 -   elseif curline =~ '"\s*Sort sequence:'
    8549 -    let s:netrw_skipbrowse= 1
    8550 -    echo 'Press "S" to edit sorting sequence'
    8551 +  let savefile= s:NetrwHome()."/.netrwhist"
    8552 +  1split
    8553 +  call s:NetrwEnew()
    8554 +  setl cino= com= cpo-=a cpo-=A fo=nroql2 tw=0 report=10000 noswf
    8555 +  setl nocin noai noci magic nospell nohid wig= noaw
    8556 +  setl ma noro write
    8557 +  if exists("+acd") | setl noacd | endif
    8558 +  sil! keepj keepalt %d
    8559  
    8560 -   elseif curline =~ '"\s*Quick Help:'
    8561 -    keepj norm ?
    8562 -    let s:netrw_skipbrowse= 1
    8563 -    echo 'Pressing "?" also works'
    8564 +  " save .netrwhist -- no attempt to merge
    8565 +  sil! keepalt file .netrwhist
    8566 +  call setline(1,"let g:netrw_dirhistmax  =".g:netrw_dirhistmax)
    8567 +  call setline(2,"let g:netrw_dirhist_cnt =".g:netrw_dirhist_cnt)
    8568 +  let lastline = line("$")
    8569 +  let cnt      = 1
    8570 +  while cnt <= g:netrw_dirhist_cnt
    8571 +   call setline((cnt+lastline),'let g:netrw_dirhist_'.cnt."='".g:netrw_dirhist_{cnt}."'")
    8572 +   let cnt= cnt + 1
    8573 +  endwhile
    8574 +  exe "sil! w! ".savefile
    8575  
    8576 -   elseif curline =~ '"\s*\%(Hiding\|Showing\):'
    8577 -    keepj norm a
    8578 -    let s:netrw_skipbrowse= 1
    8579 -    echo 'Pressing "a" also works'
    8580 +  sil keepj %d
    8581 +  if exists("g:netrw_bookmarklist") && g:netrw_bookmarklist != []
    8582 +   " merge and write .netrwbook
    8583 +   let savefile= s:NetrwHome()."/.netrwbook"
    8584  
    8585 -   elseif line("$") > w:netrw_bannercnt
    8586 -    exe 'sil keepj '.w:netrw_bannercnt
    8587 +   if filereadable(savefile)
    8588 +    let booklist= deepcopy(g:netrw_bookmarklist)
    8589 +    exe "sil keepj keepalt so ".savefile
    8590 +    for bdm in booklist
    8591 +     if index(g:netrw_bookmarklist,bdm) == -1
    8592 +      call add(g:netrw_bookmarklist,bdm)
    8593 +     endif
    8594 +    endfor
    8595 +    call sort(g:netrw_bookmarklist)
    8596 +    exe "sil! w! ".savefile
    8597     endif
    8598  
    8599 -  elseif w:netrw_liststyle == s:THINLIST
    8600 -"   call Decho("thin column handling")
    8601 -   keepj norm! 0
    8602 -   let dirname= getline('.')
    8603 -
    8604 -  elseif w:netrw_liststyle == s:LONGLIST
    8605 -"   call Decho("long column handling")
    8606 -   keepj norm! 0
    8607 -   let dirname= substitute(getline('.'),'^\(\%(\S\+ \)*\S\+\).\{-}$','\1','e')
    8608 +   " construct and save .netrwbook
    8609 +   call setline(1,"let g:netrw_bookmarklist= ".string(g:netrw_bookmarklist))
    8610 +   exe "sil! w! ".savefile
    8611 +  endif
    8612 +  let bgone= bufnr("%")
    8613 +  q!
    8614 +  exe "keepalt ".bgone."bwipe!"
    8615  
    8616 -  elseif w:netrw_liststyle == s:TREELIST
    8617 -"   call Decho("treelist handling")
     6268@@ -4048,7 +3991,7 @@
     6269 
     6270   elseif w:netrw_liststyle == s:TREELIST
     6271 "   call Decho("treelist handling")
    86186272-   let dirname= substitute(getline('.'),'^\(| \)*','','e')
    8619 +"  call Dret("s:NetrwBookHistSave")
    8620 +endfun
    8621  
    8622 -  else
    8623 -"   call Decho("obtain word from wide listing")
    8624 -   let dirname= getline('.')
    8625 +" ---------------------------------------------------------------------
    8626 +" s:NetrwBrowse: This function uses the command in g:netrw_list_cmd to provide a {{{2
    8627 +"  list of the contents of a local or remote directory.  It is assumed that the
    8628 +"  g:netrw_list_cmd has a string, USEPORT HOSTNAME, that needs to be substituted
    8629 +"  with the requested remote hostname first.
    8630 +fun! s:NetrwBrowse(islocal,dirname)
    8631 +  if !exists("w:netrw_liststyle")|let w:netrw_liststyle= g:netrw_liststyle|endif
    8632 +"  call Dfunc("s:NetrwBrowse(islocal=".a:islocal." dirname<".a:dirname.">) liststyle=".w:netrw_liststyle." ".g:loaded_netrw." buf#".bufnr("%")."<".bufname("%")."> win#".winnr())
    8633 +"  call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")." modified=".&modified." modifiable=".&modifiable." readonly=".&readonly)
    8634 +"  call Dredir("ls!")
    8635  
    8636 -   if !exists("b:netrw_cpf")
    8637 -    let b:netrw_cpf= 0
    8638 -    exe 'sil keepj '.w:netrw_bannercnt.',$g/^./if virtcol("$") > b:netrw_cpf|let b:netrw_cpf= virtcol("$")|endif'
    8639 -    call histdel("/",-1)
    8640 -"   call Decho("computed cpf=".b:netrw_cpf)
    8641 -   endif
    8642 +  " s:NetrwBrowse: initialize history {{{3
    8643 +  if !exists("s:netrw_initbookhist")
    8644 +   keepj call s:NetrwBookHistRead()
    8645 +  endif
    8646  
    8647 -"   call Decho("buf#".bufnr("%")."<".bufname("%").">")
    8648 -   let filestart = (virtcol(".")/b:netrw_cpf)*b:netrw_cpf
    8649 -"   call Decho("filestart= ([virtcol=".virtcol(".")."]/[b:netrw_cpf=".b:netrw_cpf."])*b:netrw_cpf=".filestart."  bannercnt=".w:netrw_bannercnt)
    8650 -"   call Decho("1: dirname<".dirname.">")
    8651 -   if filestart == 0
    8652 -    keepj norm! 0ma
    8653 -   else
    8654 -    call cursor(line("."),filestart+1)
    8655 -    keepj norm! ma
    8656 -   endif
    8657 -   let rega= @a
    8658 -   let eofname= filestart + b:netrw_cpf + 1
    8659 -   if eofname <= col("$")
    8660 -    call cursor(line("."),filestart+b:netrw_cpf+1)
    8661 -    keepj norm! "ay`a
    8662 -   else
    8663 -    keepj norm! "ay$
    8664 -   endif
    8665 -   let dirname = @a
    8666 -   let @a      = rega
    8667 -"   call Decho("2: dirname<".dirname.">")
    8668 -   let dirname= substitute(dirname,'\s\+$','','e')
    8669 -"   call Decho("3: dirname<".dirname.">")
    8670 +  " s:NetrwBrowse: simplify the dirname (especially for ".."s in dirnames) {{{3
    8671 +  if a:dirname !~ '^\a\+://'
    8672 +   let dirname= simplify(a:dirname)
    8673 +  else
    8674 +   let dirname= a:dirname
    8675    endif
    8676  
    8677 -  " symlinks are indicated by a trailing "@".  Remove it before further processing.
    8678 -  let dirname= substitute(dirname,"@$","","")
    8679 +  if exists("s:netrw_skipbrowse")
    8680 +   unlet s:netrw_skipbrowse
    8681 +"   call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." filename<".expand("%")."> win#".winnr()." ft<".&ft.">")
    8682 +"   call Dret("s:NetrwBrowse : s:netrw_skipbrowse existed")
    8683 +   return
    8684 +  endif
    8685  
    8686 -  " executables are indicated by a trailing "*".  Remove it before further processing.
    8687 -  let dirname= substitute(dirname,"\*$","","")
    8688 +  " s:NetrwBrowse: sanity checks: {{{3
    8689 +  if !exists("*shellescape")
    8690 +   keepj call netrw#ErrorMsg(s:ERROR,"netrw can't run -- your vim is missing shellescape()",69)
    8691 +"   call Dret("s:NetrwBrowse : missing shellescape()")
    8692 +   return
    8693 +  endif
    8694 +  if !exists("*fnameescape")
    8695 +   keepj call netrw#ErrorMsg(s:ERROR,"netrw can't run -- your vim is missing fnameescape()",70)
    8696 +"   call Dret("s:NetrwBrowse : missing fnameescape()")
    8697 +   return
    8698 +  endif
    8699  
    8700 -"  call Dret("s:NetrwGetWord <".dirname.">")
    8701 -  return dirname
    8702 -endfun
    8703 +  " s:NetrwBrowse: save options: {{{3
    8704 +  call s:NetrwOptionSave("w:")                                                                                                           
    8705  
    8706 -" ---------------------------------------------------------------------
    8707 -" s:NetrwListSettings: make standard settings for a netrw listing {{{2
    8708 -fun! s:NetrwListSettings(islocal)
    8709 -"  call Dfunc("s:NetrwListSettings(islocal=".a:islocal.")")
    8710 -  let fname= bufname("%")
     6273+   let dirname= substitute(getline('.'),'^\('.s:treedepthstring.'\)*','','e')
     6274 
     6275   else
     6276 "   call Decho("obtain word from wide listing")
     6277@@ -4100,14 +4043,16 @@
     6278 " s:NetrwListSettings: make standard settings for a netrw listing {{{2
     6279 fun! s:NetrwListSettings(islocal)
     6280 "  call Dfunc("s:NetrwListSettings(islocal=".a:islocal.")")
     6281+"  call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo)
     6282   let fname= bufname("%")
    87116283-"  call Decho("(NetrwListSettings) setl bt=nofile nobl ma nonu nowrap noro")
    87126284-  setl bt=nofile nobl ma nonu nowrap noro
    8713 -"  call Decho("(NetrwListSettings) exe sil! keepalt file ".fnameescape(fname))
    8714 -  exe "sil! keepalt file ".fnameescape(fname)
    8715 -  if g:netrw_use_noswf
    8716 -   setl noswf
    8717 -  endif
    8718 -"  call Decho("(NetrwListSettings) exe setl ts=".(g:netrw_maxfilenamelen+1))
    8719 -  exe "setl ts=".(g:netrw_maxfilenamelen+1)
    8720 -  setl isk+=.,~,-
    8721 -  if g:netrw_fastbrowse > a:islocal
    8722 -   setl bh=hide
    8723 -  else
    8724 -   setl bh=delete
    8725 +  " s:NetrwBrowse: re-instate any marked files {{{3
    8726 +  if exists("s:netrwmarkfilelist_{bufnr('%')}")
    8727 +"   call Decho("clearing marked files")
    8728 +   exe "2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/"
     6285+"  "  call Decho("(NetrwListSettings) setl bt=nofile nobl ma nonu nowrap noro nornu")
     6286+  setl bt=nofile nobl ma nonu nowrap noro nornu
     6287 "  call Decho("(NetrwListSettings) exe sil! keepalt file ".fnameescape(fname))
     6288   exe "sil! keepalt file ".fnameescape(fname)
     6289   if g:netrw_use_noswf
     6290    setl noswf
    87296291   endif
    8730 -"  call Dret("s:NetrwListSettings")
    8731 -endfun
    8732  
    8733 -" ---------------------------------------------------------------------
    8734 -"  s:NetrwListStyle: {{{2
    8735 -"  islocal=0: remote browsing
    8736 -"         =1: local browsing
    8737 -fun! s:NetrwListStyle(islocal)
    8738 -"  call Dfunc("NetrwListStyle(islocal=".a:islocal.") w:netrw_liststyle=".w:netrw_liststyle)
    8739 -  let ykeep             = @@
    8740 -  let fname             = s:NetrwGetWord()
    8741 -  if !exists("w:netrw_liststyle")|let w:netrw_liststyle= g:netrw_liststyle|endif
    8742 -  let w:netrw_liststyle = (w:netrw_liststyle + 1) % s:MAXLIST
    8743 -"  call Decho("fname<".fname.">")
    8744 -"  call Decho("chgd w:netrw_liststyle to ".w:netrw_liststyle)
    8745 -"  call Decho("b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : "doesn't exist").">")
    8746 +  if a:islocal && exists("w:netrw_acdkeep") && w:netrw_acdkeep
    8747 +   " s:NetrwBrowse: set up "safe" options for local directory/file {{{3
    8748 +"   call Decho("handle w:netrw_acdkeep:")
    8749 +"   call Decho("keepjumps lcd ".fnameescape(dirname)." (due to w:netrw_acdkeep=".w:netrw_acdkeep." - acd=".&acd.")")
    8750 +   call s:NetrwLcd(dirname)
    8751 +   call s:NetrwSafeOptions()
    8752 +"   call Decho("getcwd<".getcwd().">")
    8753  
    8754 -  if w:netrw_liststyle == s:THINLIST
    8755 -   " use one column listing
    8756 -"   call Decho("use one column list")
    8757 -   let g:netrw_list_cmd = substitute(g:netrw_list_cmd,' -l','','ge')
    8758 +  elseif !a:islocal && dirname !~ '[\/]$' && dirname !~ '^"'
    8759 +   " s:NetrwBrowse: looks like a remote regular file, attempt transfer {{{3
    8760 +"   call Decho("attempt transfer as regular file<".dirname.">")
    8761  
    8762 -  elseif w:netrw_liststyle == s:LONGLIST
    8763 -   " use long list
    8764 -"   call Decho("use long list")
    8765 -   let g:netrw_list_cmd = g:netrw_list_cmd." -l"
    8766 +   " remove any filetype indicator from end of dirname, except for the
    8767 +   " "this is a directory" indicator (/).
    8768 +   " There shouldn't be one of those here, anyway.
    8769 +   let path= substitute(dirname,'[*=@|]\r\=$','','e')
    8770 +"   call Decho("new path<".path.">")
    8771 +   call s:RemotePathAnalysis(dirname)
    8772  
    8773 -  elseif w:netrw_liststyle == s:WIDELIST
    8774 -   " give wide list
    8775 -"   call Decho("use wide list")
    8776 -   let g:netrw_list_cmd = substitute(g:netrw_list_cmd,' -l','','ge')
    8777 +   " s:NetrwBrowse: remote-read the requested file into current buffer {{{3
    8778 +   keepj mark '
    8779 +   call s:NetrwEnew(dirname)
    8780 +   call s:NetrwSafeOptions()
    8781 +   setl ma noro
    8782 +"   call Decho("setl ma noro")
    8783 +   let b:netrw_curdir = dirname
    8784 +   let url            = s:method."://".s:user.s:machine.(s:port ? ":".s:port : "")."/".s:path
    8785 +"   call Decho("exe sil! keepalt file ".fnameescape(url)." (bt=".&bt.")")
    8786 +   exe "sil! keepj keepalt file ".fnameescape(url)
    8787 +   exe "sil! keepj keepalt doau BufReadPre ".fnameescape(s:fname)
    8788 +   sil call netrw#NetRead(2,url)
    8789 +   " netrw.vim and tar.vim have already handled decompression of the tarball; avoiding gzip.vim error
    8790 +"   call Decho("url<".url.">")
    8791 +"   call Decho("s:path<".s:path.">")
    8792 +"   call Decho("s:fname<".s:fname.">")
    8793 +   if s:path =~ '.bz2'
    8794 +    exe "sil keepj keepalt doau BufReadPost ".fnameescape(substitute(s:fname,'\.bz2$','',''))
    8795 +   elseif s:path =~ '.gz'
    8796 +    exe "sil keepj keepalt doau BufReadPost ".fnameescape(substitute(s:fname,'\.gz$','',''))
    8797 +   elseif s:path =~ '.gz'
    8798 +    exe "sil keepj keepalt doau BufReadPost ".fnameescape(substitute(s:fname,'\.txz$','',''))
    8799 +   else
    8800 +    exe "sil keepj keepalt doau BufReadPost ".fnameescape(s:fname)
    8801 +   endif
    8802  
    8803 -  elseif w:netrw_liststyle == s:TREELIST
    8804 -"   call Decho("use tree list")
    8805 -   let g:netrw_list_cmd = substitute(g:netrw_list_cmd,' -l','','ge')
    8806 +   " s:NetrwBrowse: save certain window-oriented variables into buffer-oriented variables {{{3
    8807 +   call s:SetBufWinVars()
    8808 +   call s:NetrwOptionRestore("w:")
    8809 +"   call Decho("setl ma nomod")
    8810 +   setl ma nomod
    8811 +"   call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
    8812  
    8813 -  else
    8814 -   keepj call netrw#ErrorMsg(s:WARNING,"bad value for g:netrw_liststyle (=".w:netrw_liststyle.")",46)
    8815 -   let g:netrw_liststyle = s:THINLIST
    8816 -   let w:netrw_liststyle = g:netrw_liststyle
    8817 -   let g:netrw_list_cmd  = substitute(g:netrw_list_cmd,' -l','','ge')
    8818 +"   call Dret("s:NetrwBrowse : file<".s:fname.">")
    8819 +   return
     6292+"  call Dredir("ls!")
     6293 "  call Decho("(NetrwListSettings) exe setl ts=".(g:netrw_maxfilenamelen+1))
     6294   exe "setl ts=".(g:netrw_maxfilenamelen+1)
     6295   setl isk+=.,~,-
     6296@@ -4116,6 +4061,7 @@
     6297   else
     6298    setl bh=delete
    88206299   endif
    8821 -  setl ma noro
    8822 -"  call Decho("setl ma noro")
    8823 -
    8824 -  " clear buffer - this will cause NetrwBrowse/LocalBrowseCheck to do a refresh
    8825 -"  call Decho("clear buffer<".expand("%")."> with :%d")
    8826 -  sil! keepj %d
    8827 -  " following prevents tree listing buffer from being marked "modified"
     6300+"  call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo)
     6301 "  call Dret("s:NetrwListSettings")
     6302 endfun
     6303 
     6304@@ -4125,9 +4071,11 @@
     6305 "         =1: local browsing
     6306 fun! s:NetrwListStyle(islocal)
     6307 "  call Dfunc("NetrwListStyle(islocal=".a:islocal.") w:netrw_liststyle=".w:netrw_liststyle)
     6308+
     6309   let ykeep             = @@
     6310   let fname             = s:NetrwGetWord()
     6311   if !exists("w:netrw_liststyle")|let w:netrw_liststyle= g:netrw_liststyle|endif
     6312+  let svpos            = netrw#SavePosn()
     6313   let w:netrw_liststyle = (w:netrw_liststyle + 1) % s:MAXLIST
     6314 "  call Decho("fname<".fname.">")
     6315 "  call Decho("chgd w:netrw_liststyle to ".w:netrw_liststyle)
     6316@@ -4165,24 +4113,17 @@
     6317 "  call Decho("clear buffer<".expand("%")."> with :%d")
     6318   sil! keepj %d
     6319   " following prevents tree listing buffer from being marked "modified"
    88286320-"  call Decho("(NetrwListStyle) setl nomod")
    8829 -  setl nomod
     6321+"  call Decho("setl nomod")
     6322   setl nomod
    88306323-"  call Decho("(NetrwListStyle) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
    8831  
    8832 -  " refresh the listing
     6324+"  call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
     6325 
     6326   " refresh the listing
    88336327-"  call Decho("(NetrwListStyle) refresh the listing")
    88346328-  let svpos= netrw#NetrwSavePosn()
    8835 -  keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
     6329+"  call Decho("refresh the listing")
     6330   keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
    88366331-  keepj call netrw#NetrwRestorePosn(svpos)
    8837 -  keepj call s:NetrwCursor()
    8838 +  " use buffer-oriented WinVars if buffer variables exist but associated window variables don't {{{3
    8839 +  call s:UseBufWinVars()
     6332   keepj call s:NetrwCursor()
    88406333 
    88416334-  " keep cursor on the filename
     
    88466339-   exe "sil! keepj ".w:netrw_bannercnt
    88476340-  endif
    8848 -  let @@= ykeep
    8849 +  " set up some variables {{{3
    8850 +  let b:netrw_browser_active = 1
    8851 +  let dirname                = dirname
    8852 +  let s:last_sort_by         = g:netrw_sort_by
    8853  
    8854 -"  call Dret("NetrwListStyle".(exists("w:netrw_liststyle")? ' : w:netrw_liststyle='.w:netrw_liststyle : ""))
    8855 -endfun
    8856 +  " set up menu {{{3
    8857 +  keepj call s:NetrwMenu(1)
    8858  
    8859 -" ---------------------------------------------------------------------
    8860 -" s:NetrwBannerCtrl: toggles the display of the banner {{{2
    8861 -fun! s:NetrwBannerCtrl(islocal)
    8862 -"  call Dfunc("s:NetrwBannerCtrl(islocal=".a:islocal.") g:netrw_banner=".g:netrw_banner)
    8863 -
    8864 -  let ykeep= @@
    8865 -  " toggle the banner (enable/suppress)
    8866 -  let g:netrw_banner= !g:netrw_banner
    8867 -
    8868 -  " refresh the listing
     6341+  " restore position; keep cursor on the filename
     6342+  keepj call netrw#RestorePosn(svpos)
     6343   let @@= ykeep
     6344 
     6345 "  call Dret("NetrwListStyle".(exists("w:netrw_liststyle")? ' : w:netrw_liststyle='.w:netrw_liststyle : ""))
     6346@@ -4198,7 +4139,7 @@
     6347   let g:netrw_banner= !g:netrw_banner
     6348 
     6349   " refresh the listing
    88696350-  let svpos= netrw#NetrwSavePosn()
    8870 -  call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
    8871 -
    8872 -  " keep cursor on the filename
    8873 -  let fname= s:NetrwGetWord()
    8874 -  sil keepj $
    8875 -  let result= search('\%(^\%(|\+\s\)\=\|\s\{2,}\)\zs'.escape(fname,'.\[]*$^').'\%(\s\{2,}\|$\)','bc')
    8876 -"  call Decho("search result=".result." w:netrw_bannercnt=".(exists("w:netrw_bannercnt")? w:netrw_bannercnt : 'N/A'))
    8877 -  if result <= 0 && exists("w:netrw_bannercnt")
    8878 -   exe "keepj ".w:netrw_bannercnt
    8879 +  " get/set-up buffer {{{3
    8880 +  let reusing= s:NetrwGetBuffer(a:islocal,dirname)
    8881 +  " maintain markfile highlighting
    8882 +  if exists("s:netrwmarkfilemtch_{bufnr('%')}") && s:netrwmarkfilemtch_{bufnr("%")} != ""
    8883 +"   call Decho("bufnr(%)=".bufnr('%'))
    8884 +"   call Decho("exe 2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/")
    8885 +   exe "2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/"
    8886 +  else
    8887 +"   call Decho("2match none")
    8888 +   2match none
    8889    endif
    8890 -  let @@= ykeep
    8891 -"  call Dret("s:NetrwBannerCtrl : g:netrw_banner=".g:netrw_banner)
    8892 -endfun
    8893 -
    8894 -" ---------------------------------------------------------------------
    8895 -" s:NetrwBookmarkMenu: Uses menu priorities {{{2
    8896 -"                      .2.[cnt] for bookmarks, and
    8897 -"                      .3.[cnt] for history
    8898 -"                      (see s:NetrwMenu())
    8899 -fun! s:NetrwBookmarkMenu()
    8900 -  if !exists("s:netrw_menucnt")
    8901 +  if reusing && line("$") > 1
    8902 +   call s:NetrwOptionRestore("w:")
    8903 +"   call Decho("setl noma nomod nowrap")
    8904 +   setl noma nomod nowrap
    8905 +"   call Decho("(set noma nomod nowrap)  ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
    8906 +"   call Dret("s:NetrwBrowse : re-using buffer")
    8907     return
    8908    endif
    8909 -"  call Dfunc("NetrwBookmarkMenu()  histcnt=".g:netrw_dirhist_cnt." menucnt=".s:netrw_menucnt)
    8910  
    8911 -  " the following test assures that gvim is running, has menus available, and has menus enabled.
    8912 -  if has("gui") && has("menu") && has("gui_running") && &go =~# 'm' && g:netrw_menu
    8913 -   if exists("g:NetrwTopLvlMenu")
    8914 -"    call Decho("removing ".g:NetrwTopLvlMenu."Bookmarks menu item(s)")
    8915 -    exe 'sil! unmenu '.g:NetrwTopLvlMenu.'Bookmarks'
    8916 -    exe 'sil! unmenu '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Bookmark\ Delete'
    8917 -   endif
    8918 -   if !exists("s:netrw_initbookhist")
    8919 -    call s:NetrwBookHistRead()
    8920 +  " set b:netrw_curdir to the new directory name {{{3
    8921 +"  call Decho("set b:netrw_curdir to the new directory name<".dirname."> (buf#".bufnr("%").")")
    8922 +  let b:netrw_curdir= dirname
    8923 +  if b:netrw_curdir =~ '[/\\]$'
    8924 +   let b:netrw_curdir= substitute(b:netrw_curdir,'[/\\]$','','e')
    8925 +  endif
    8926 +  if b:netrw_curdir =~ '\a:$' && (has("win32") || has("win95") || has("win64") || has("win16"))
    8927 +   let b:netrw_curdir= b:netrw_curdir."/"
    8928 +  endif
    8929 +  if b:netrw_curdir == ''
    8930 +   if has("amiga")
    8931 +    " On the Amiga, the empty string connotes the current directory
    8932 +    let b:netrw_curdir= getcwd()
    8933 +   else
    8934 +    " under unix, when the root directory is encountered, the result
    8935 +    " from the preceding substitute is an empty string.
    8936 +    let b:netrw_curdir= '/'
    8937     endif
    8938 +  endif
    8939 +  if !a:islocal && b:netrw_curdir !~ '/$'
    8940 +   let b:netrw_curdir= b:netrw_curdir.'/'
    8941 +  endif
    8942 +"  call Decho("b:netrw_curdir<".b:netrw_curdir.">")
    8943  
    8944 -   " show bookmarked places
    8945 -   if exists("g:netrw_bookmarklist") && g:netrw_bookmarklist != [] && g:netrw_dirhistmax > 0
    8946 -    let cnt= 1
    8947 -    for bmd in g:netrw_bookmarklist
     6351+  let svpos= netrw#SavePosn()
     6352   call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
     6353 
     6354   " keep cursor on the filename
     6355@@ -4239,14 +4180,14 @@
     6356    if exists("g:netrw_bookmarklist") && g:netrw_bookmarklist != [] && g:netrw_dirhistmax > 0
     6357     let cnt= 1
     6358     for bmd in g:netrw_bookmarklist
    89486359-     let ebmd= escape(bmd,g:netrw_menu_escape)
    89496360-"     call Decho('sil! menu '.g:NetrwMenuPriority.".2.".cnt." ".g:NetrwTopLvlMenu.'Bookmark.'.ebmd.'   :e '.bmd)
    8950 +  " ------------
    8951 +  " (local only) {{{3
    8952 +  " ------------
    8953 +  if a:islocal
    8954 +"   call Decho("local only:")
    8955  
    8956 -     " show bookmarks for goto menu
     6361+"     call Decho('sil! menu '.g:NetrwMenuPriority.".2.".cnt." ".g:NetrwTopLvlMenu.'Bookmark.'.bmd.'    :e '.bmd)
     6362+     let bmd= escape(bmd,g:netrw_menu_escape)
     6363 
     6364      " show bookmarks for goto menu
    89576365-     exe 'sil! menu '.g:NetrwMenuPriority.".2.".cnt." ".g:NetrwTopLvlMenu.'Bookmarks.'.ebmd.'  :e '.bmd."\<cr>"
    8958 +   " Set up ShellCmdPost handling.  Append current buffer to browselist
    8959 +   call s:LocalFastBrowser()
    8960  
    8961 -     " show bookmarks for deletion menu
     6366+     exe 'sil! menu '.g:NetrwMenuPriority.".2.".cnt." ".g:NetrwTopLvlMenu.'Bookmarks.'.bmd.'   :e '.bmd."\<cr>"
     6367 
     6368      " show bookmarks for deletion menu
    89626369-     exe 'sil! menu '.g:NetrwMenuPriority.".8.2.".cnt." ".g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Bookmark\ Delete.'.ebmd.' '.cnt."mB"
    8963 -     let cnt= cnt + 1
    8964 -    endfor
    8965 +  " handle g:netrw_keepdir: set vim's current directory to netrw's notion of the current directory {{{3
    8966 +   if !g:netrw_keepdir
    8967 +"    call Decho("handle g:netrw_keepdir=".g:netrw_keepdir.": getcwd<".getcwd()."> acd=".&acd)
    8968 +"    call Decho("l:acd".(exists("&l:acd")? "=".&l:acd : " doesn't exist"))
    8969 +    if !exists("&l:acd") || !&l:acd
    8970 +     call s:NetrwLcd(b:netrw_curdir)
    8971 +    endif
    8972 +   endif
    8973 +
    8974 +  " --------------------------------
    8975 +  " remote handling: {{{3
    8976 +  " --------------------------------
    8977 +  else
    8978 +"   call Decho("remote only:")
    8979  
    8980 +   " analyze dirname and g:netrw_list_cmd {{{3
    8981 +"   call Decho("b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : "doesn't exist")."> dirname<".dirname.">")
    8982 +   if dirname =~ "^NetrwTreeListing\>"
    8983 +    let dirname= b:netrw_curdir
    8984 +"    call Decho("(dirname was <NetrwTreeListing>) dirname<".dirname.">")
    8985 +   elseif exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir")
    8986 +    let dirname= substitute(b:netrw_curdir,'\\','/','g')
    8987 +    if dirname !~ '/$'
    8988 +     let dirname= dirname.'/'
    8989 +    endif
    8990 +    let b:netrw_curdir = dirname
    8991 +"    call Decho("(liststyle is TREELIST) dirname<".dirname.">")
    8992 +   else
    8993 +    let dirname = substitute(dirname,'\\','/','g')
    8994 +"    call Decho("(normal) dirname<".dirname.">")
    8995     endif
    8996  
    8997 -   " show directory browsing history
    8998 -   if g:netrw_dirhistmax > 0
    8999 -    let cnt     = g:netrw_dirhist_cnt
    9000 -    let first   = 1
    9001 -    let histcnt = 0
    9002 -    while ( first || cnt != g:netrw_dirhist_cnt )
    9003 -     let histcnt  = histcnt + 1
    9004 -     let priority = g:netrw_dirhist_cnt + histcnt
    9005 -     if exists("g:netrw_dirhist_{cnt}")
    9006 -      let histdir= escape(g:netrw_dirhist_{cnt},g:netrw_menu_escape)
    9007 -"     call Decho('sil! menu '.g:NetrwMenuPriority.".3.".priority." ".g:NetrwTopLvlMenu.'History.'.histdir.'    :e '.histdir)
    9008 -      exe 'sil! menu '.g:NetrwMenuPriority.".3.".priority." ".g:NetrwTopLvlMenu.'History.'.histdir.'   :e '.histdir."\<cr>"
    9009 -     endif
    9010 -     let first = 0
    9011 -     let cnt   = ( cnt - 1 ) % g:netrw_dirhistmax
    9012 -     if cnt < 0
    9013 -      let cnt= cnt + g:netrw_dirhistmax
    9014 -     endif
    9015 -    endwhile
    9016 +   let dirpat  = '^\(\w\{-}\)://\(\w\+@\)\=\([^/]\+\)/\(.*\)$'
    9017 +   if dirname !~ dirpat
    9018 +    if !exists("g:netrw_quiet")
    9019 +     keepj call netrw#ErrorMsg(s:ERROR,"netrw doesn't understand your dirname<".dirname.">",20)
    9020 +    endif
    9021 +    keepj call s:NetrwOptionRestore("w:")
    9022 +"    call Decho("setl noma nomod nowrap")
    9023 +    setl noma nomod nowrap
    9024 +"    call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
    9025 +"    call Dret("s:NetrwBrowse : badly formatted dirname<".dirname.">")
    9026 +    return
    9027     endif
    9028 +   let b:netrw_curdir= dirname
    9029 +"   call Decho("b:netrw_curdir<".b:netrw_curdir."> (remote)")
    9030 +  endif  " (additional remote handling)
    9031  
    9032 +  " -----------------------
    9033 +  " Directory Listing: {{{3
    9034 +  " -----------------------
    9035 +  keepj call s:NetrwMaps(a:islocal)
    9036 +  keepj call s:NetrwCommands(a:islocal)
    9037 +  keepj call s:PerformListing(a:islocal)
    9038 +  if v:version >= 700 && has("balloon_eval") && &beval == 0 && &l:bexpr == "" && !exists("g:netrw_nobeval")
    9039 +   let &l:bexpr= "netrw#BalloonHelp()"
    9040 +"   call Decho("set up balloon help: l:bexpr=".&l:bexpr)
    9041 +   setl beval
    9042    endif
    9043 -"  call Dret("NetrwBookmarkMenu")
    9044 +  call s:NetrwOptionRestore("w:")
    9045 +
    9046 +  " The s:LocalBrowseRefresh() function is called by an autocmd
    9047 +  " installed by s:LocalFastBrowser() when g:netrw_fastbrowse <= 1 (ie. slow, medium speed).
    9048 +  " However, s:NetrwBrowse() causes the FocusGained event to fire the firstt time.
    9049 +
    9050 +"  call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
    9051 +"  call Dret("s:NetrwBrowse : did PerformListing  ft<".&ft.">")
    9052 +  return
    9053  endfun
    9054  
    9055  " ---------------------------------------------------------------------
    9056 -"  s:NetrwBrowseChgDir: constructs a new directory based on the current {{{2
    9057 -"                       directory and a new directory name.  Also, if the
    9058 -"                       "new directory name" is actually a file,
    9059 -"                       NetrwBrowseChgDir() edits the file.
    9060 -fun! s:NetrwBrowseChgDir(islocal,newdir,...)
    9061 -"  call Dfunc("s:NetrwBrowseChgDir(islocal=".a:islocal."> newdir<".a:newdir.">) a:0=".a:0." curpos<".string(getpos("."))."> b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : "").">")
    9062 -
    9063 +" s:NetrwFileInfo: supports qf (query for file information) {{{2
    9064 +fun! s:NetrwFileInfo(islocal,fname)
    9065 +"  call Dfunc("s:NetrwFileInfo(islocal=".a:islocal." fname<".a:fname.">) b:netrw_curdir<".b:netrw_curdir.">")
     6370+     exe 'sil! menu '.g:NetrwMenuPriority.".8.2.".cnt." ".g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Bookmark\ Delete.'.bmd.'  '.cnt."mB"
     6371      let cnt= cnt + 1
     6372     endfor
     6373 
     6374@@ -4284,78 +4225,109 @@
     6375 "                       NetrwBrowseChgDir() edits the file.
     6376 fun! s:NetrwBrowseChgDir(islocal,newdir,...)
     6377 "  call Dfunc("s:NetrwBrowseChgDir(islocal=".a:islocal."> newdir<".a:newdir.">) a:0=".a:0." curpos<".string(getpos("."))."> b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : "").">")
     6378+"  call Decho("win#".winnr())
     6379 
    90666380   let ykeep= @@
    9067 -  if !exists("b:netrw_curdir")
    9068 -   " Don't try to change-directory: this can happen, for example, when netrw#ErrorMsg has been called
    9069 -   " and the current window is the NetrwMessage window.
    9070 -   let @@= ykeep
     6381   if !exists("b:netrw_curdir")
     6382    " Don't try to change-directory: this can happen, for example, when netrw#ErrorMsg has been called
     6383    " and the current window is the NetrwMessage window.
     6384    let @@= ykeep
    90716385-"   call Decho("(NetrwBrowseChgDir) b:netrw_curdir doesn't exist!")
    90726386-"   call Decho("(NetrwBrowseChgDir) getcwd<".getcwd().">")
    9073 -"   call Dret("s:NetrwBrowseChgDir")
    9074 -   return
    9075 -  endif
    9076 +  if a:islocal
    9077 +   if (has("unix") || has("macunix")) && executable("/bin/ls")
    9078  
    9079 -  " NetrwBrowseChgDir: save options and initialize {{{3
    9080 -  keepj call s:NetrwOptionSave("s:")
    9081 -  keepj call s:NetrwSafeOptions()
    9082 -  let nbcd_curpos                = netrw#NetrwSavePosn()
    9083 -  let s:nbcd_curpos_{bufnr('%')} = nbcd_curpos
    9084 -"  call Decho("(NetrwBrowseChgDir) setting s:nbcd_curpos_".bufnr('%')." to SavePosn")
    9085 -  if (has("win32") || has("win95") || has("win64") || has("win16"))
    9086 -   let dirname                   = substitute(b:netrw_curdir,'\\','/','ge')
    9087 -  else
    9088 -   let dirname= b:netrw_curdir
    9089 -  endif
    9090 -  let newdir    = a:newdir
    9091 -  let dolockout = 0
    9092 +    if getline(".") == "../"
    9093 +     echo system("/bin/ls -lsad ".shellescape(".."))
    9094 +"     call Decho("#1: echo system(/bin/ls -lsad ".shellescape(..).")")
    9095 +
    9096 +    elseif w:netrw_liststyle == s:TREELIST && getline(".") !~ '^'.s:treedepthstring
    9097 +     echo system("/bin/ls -lsad ".shellescape(b:netrw_curdir))
    9098 +"     call Decho("#2: echo system(/bin/ls -lsad ".shellescape(b:netrw_curdir).")")
    9099  
    9100 -  " set up o/s-dependent directory recognition pattern
    9101 -  if has("amiga")
    9102 -   let dirpat= '[\/:]$'
    9103 +    elseif exists("b:netrw_curdir")
    9104 +     if b:netrw_curdir =~ '/$'
    9105 +      echo system("/bin/ls -lsad ".shellescape(b:netrw_curdir.a:fname))
    9106 +"      call Decho("#3: echo system(/bin/ls -lsad ".shellescape(b:netrw_curdir.a:fname).")")
    9107 +
    9108 +     else
    9109 +      echo system("/bin/ls -lsad ".shellescape(b:netrw_curdir."/".a:fname))
    9110 +"      call Decho("#4: echo system(/bin/ls -lsad ".shellescape(b:netrw_curdir."/".a:fname).")")
    9111 +     endif
    9112 +
    9113 +    else
    9114 +"     call Decho('using ls '.a:fname." using cwd<".getcwd().">")
    9115 +     echo system("/bin/ls -lsad ".shellescape(a:fname))
    9116 +"     call Decho("#5: echo system(/bin/ls -lsad ".shellescape(a:fname).")")
    9117 +    endif
    9118 +   else
    9119 +    " use vim functions to return information about file below cursor
    9120 +"    call Decho("using vim functions to query for file info")
    9121 +    if !isdirectory(a:fname) && !filereadable(a:fname) && a:fname =~ '[*@/]'
    9122 +     let fname= substitute(a:fname,".$","","")
    9123 +    else
    9124 +     let fname= a:fname
    9125 +    endif
    9126 +    let t  = getftime(fname)
    9127 +    let sz = getfsize(fname)
    9128 +    echo a:fname.":  ".sz."  ".strftime(g:netrw_timefmt,getftime(fname))
    9129 +"    call Decho("fname.":  ".sz."  ".strftime(g:netrw_timefmt,getftime(fname)))
    9130 +   endif
    9131    else
    9132 -   let dirpat= '[\/]$'
    9133 +   echo "sorry, \"qf\" not supported yet for remote files"
    9134    endif
    9135 -"  call Decho("(NetrwBrowseChgDir) dirname<".dirname.">  dirpat<".dirpat.">")
    9136 +  let @@= ykeep
    9137 +"  call Dret("s:NetrwFileInfo")
    9138 +endfun
    9139  
    9140 -  if dirname !~ dirpat
    9141 -   " apparently vim is "recognizing" that it is in a directory and
    9142 -   " is removing the trailing "/".  Bad idea, so let's put it back.
    9143 -   let dirname= dirname.'/'
    9144 -"   call Decho("(NetrwBrowseChgDir) adjusting dirname<".dirname.">")
    9145 -  endif
    9146 +" ---------------------------------------------------------------------
    9147 +" s:NetrwGetBuffer: {{{2
    9148 +"   returns 0=cleared buffer
    9149 +"           1=re-used buffer
    9150 +fun! s:NetrwGetBuffer(islocal,dirname)
    9151 +"  call Dfunc("s:NetrwGetBuffer(islocal=".a:islocal." dirname<".a:dirname.">) liststyle=".g:netrw_liststyle)
    9152 +"  call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo)
    9153 +  let dirname= a:dirname
    9154  
    9155 -  if newdir !~ dirpat
    9156 -   " ------------------------------
    9157 -   " NetrwBrowseChgDir: edit a file {{{3
    9158 -   " ------------------------------
    9159 -"   call Decho('(NetrwBrowseChgDir:edit-a-file) case "handling a file": newdir<'.newdir.'> !~ dirpat<'.dirpat.">")
    9160 +  " re-use buffer if possible {{{3
    9161 +"  call Decho("--re-use a buffer if possible--")
    9162 +  if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST
    9163 +   " find NetrwTreeList buffer if there is one
    9164 +"   call Decho("case liststyle=treelist: find NetrwTreeList buffer if there is one")
    9165 +   if exists("w:netrw_treebufnr") && w:netrw_treebufnr > 0
    9166 +"    call Decho("  re-using w:netrw_treebufnr=".w:netrw_treebufnr)
    9167 +    let eikeep= &ei
    9168 +    setl ei=all
    9169 +    exe "sil! keepalt b ".w:netrw_treebufnr
    9170 +    let &ei= eikeep
    9171 +    setl ma
    9172 +    sil! keepj %d
    9173 +"    call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo)
    9174 +"    call Dret("s:NetrwGetBuffer 0<buffer cleared> : bufnum#".w:netrw_treebufnr."<NetrwTreeListing>")
    9175 +    return 0
    9176 +   endif
    9177 +   let bufnum= -1
    9178 +"   call Decho("  liststyle=TREE but w:netrw_treebufnr doesn't exist")
    9179  
    9180 -   " save position for benefit of Rexplore
    9181 -   let s:rexposn_{bufnr("%")}= netrw#NetrwSavePosn()
    9182 +  else
    9183 +   " find buffer number of buffer named precisely the same as dirname {{{3
    9184 +"   call Decho("case listtyle not treelist: find buffer numnber of buffer named precisely the same as dirname--")
    9185 +"   call Dredir("(NetrwGetBuffer) ls!","ls!")
    9186  
    9187 -"   call Decho("(NetrwBrowseChgDir:edit-a-file) setting s:rexposn_".bufnr("%")." to SavePosn")
    9188 -   if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict") && newdir !~ '^\(/\|\a:\)'
    9189 -    let dirname= s:NetrwTreeDir()
    9190 -    if dirname =~ '/$'
    9191 -     let dirname= dirname.newdir
    9192 -    else
    9193 -     let dirname= s:NetrwTreeDir()."/".newdir
    9194 +   " get dirname and associated buffer number
    9195 +   let bufnum  = bufnr(escape(dirname,'\'))
    9196 +"   call Decho("  find buffer<".dirname.">'s number ")
    9197 +"   call Decho("  bufnr(dirname<".escape(dirname,'\').">)=".bufnum)
    9198 +
    9199 +   if bufnum < 0 && dirname !~ '/$'
    9200 +    " try appending a trailing /
    9201 +"    call Decho("  try appending a trailing / to dirname<".dirname.">")
    9202 +    let bufnum= bufnr(escape(dirname.'/','\'))
    9203 +    if bufnum > 0
    9204 +     let dirname= dirname.'/'
    9205      endif
    9206 -"    call Decho("(NetrwBrowseChgDir:edit-a-file) dirname<".dirname.">")
    9207 -"    call Decho("(NetrwBrowseChgDir:edit-a-file) tree listing")
    9208 -   elseif newdir =~ '^\(/\|\a:\)'
    9209 -    let dirname= newdir
    9210 -   else
    9211 -    let dirname= s:ComposePath(dirname,newdir)
    9212     endif
    9213 -"   call Decho("(NetrwBrowseChgDir:edit-a-file) handling a file: dirname<".dirname."> (a:0=".a:0.")")
    9214 -   " this lets NetrwBrowseX avoid the edit
    9215 -   if a:0 < 1
    9216 -"    call Decho("(NetrwBrowseChgDir:edit-a-file) set up windows for editing<".fnameescape(dirname).">  didsplit=".(exists("s:didsplit")? s:didsplit : "doesn't exist"))
    9217 -    keepj call s:NetrwOptionRestore("s:")
    9218 -    if !exists("s:didsplit")
    9219 -"     call Decho("(NetrwBrowseChgDir:edit-a-file) s:didsplit does not exist; g:netrw_browse_split=".g:netrw_browse_split." win#".winnr())
    9220 -     if     g:netrw_browse_split == 1
    9221 -      " horizontally splitting the window first
    9222 -      keepalt new
    9223 -      if !&ea
    9224 -       keepalt wincmd _
    9225 -      endif
    9226 -     elseif g:netrw_browse_split == 2
    9227 -      " vertically splitting the window first
    9228 -      keepalt rightb vert new
    9229 -      if !&ea
    9230 -       keepalt wincmd |
    9231 -      endif
    9232 -     elseif g:netrw_browse_split == 3
    9233 -      " open file in new tab
    9234 -      keepalt tabnew
    9235 -     elseif g:netrw_browse_split == 4
    9236 -      " act like "P" (ie. open previous window)
    9237 -      if s:NetrwPrevWinOpen(2) == 3
    9238 -       let @@= ykeep
    9239 -"       call Dret("s:NetrwBrowseChgDir")
    9240 -       return
    9241 -      endif
    9242 -     else
    9243 -      " handling a file, didn't split, so remove menu
    9244 -"      call Decho("(NetrwBrowseChgDir:edit-a-file) handling a file+didn't split, so remove menu")
    9245 -      call s:NetrwMenu(0)
    9246 -      " optional change to window
    9247 -      if g:netrw_chgwin >= 1
    9248 -       exe "keepj keepalt ".g:netrw_chgwin."wincmd w"
    9249 -      endif
    9250 -     endif
    9251 -    endif
    9252  
    9253 -    " the point where netrw actually edits the (local) file
    9254 -    " if its local only: LocalBrowseCheck() doesn't edit a file, but NetrwBrowse() will
    9255 -    if a:islocal
    9256 -"     call Decho("(NetrwBrowseChgDir:edit-a-file) edit local file: exe e! ".fnameescape(dirname))
    9257 -     exe "keepj keepalt e! ".fnameescape(dirname)
    9258 -     call s:NetrwCursor()
    9259 -    else
    9260 -"     call Decho("(NetrwBrowseChgDir:edit-a-file) remote file: NetrwBrowse will edit it")
    9261 +   if bufnum < 0 && dirname =~ '/$'
    9262 +    " try removing a trailing /
    9263 +"    call Decho("  try removing a trailing / from dirname<".dirname.">")
    9264 +    let bufnum= bufnr(escape(substitute(dirname,'/$','',''),'\'))
    9265 +    if bufnum > 0
    9266 +     let dirname= substitute(dirname,'/$','','')
    9267      endif
    9268 -    let dolockout= 1
    9269 +   endif
    9270  
    9271 -    " handle g:Netrw_funcref -- call external-to-netrw functions
    9272 -    "   This code will handle g:Netrw_funcref as an individual function reference
    9273 -    "   or as a list of function references.  It will ignore anything that's not
    9274 -    "   a function reference.  See  :help Funcref  for information about function references.
    9275 -    if exists("g:Netrw_funcref")
    9276 -"     call Decho("(NetrwBrowseChgDir:edit-a-file) handle optional Funcrefs")
    9277 -     if type(g:Netrw_funcref) == 2
    9278 -"      call Decho("(NetrwBrowseChgDir:edit-a-file) handling a g:Netrw_funcref")
    9279 -      keepj call g:Netrw_funcref()
    9280 -     elseif type(g:Netrw_funcref) == 3
    9281 -"      call Decho("(NetrwBrowseChgDir:edit-a-file) handling a list of g:Netrw_funcrefs")
    9282 -      for Fncref in g:Netrw_funcref
    9283 -       if type(FncRef) == 2
    9284 -        keepj call FncRef()
    9285 -       endif
    9286 -      endfor
    9287 +"   call Decho("  findbuf1: bufnum=bufnr('".dirname."')=".bufnum." bufname(".bufnum.")<".bufname(bufnum)."> (initial)")
    9288 +   " note: !~ was used just below, but that means using ../ to go back would match (ie. abc/def/  and abc/ matches)
    9289 +   if bufnum > 0 && bufname(bufnum) != dirname && bufname(bufnum) != '.'
    9290 +    " handle approximate matches
    9291 +"    call Decho("  handling approx match: bufnum#".bufnum.">0 AND bufname<".bufname(bufnum).">!=dirname<".dirname."> AND bufname(".bufnum.")!='.'")
    9292 +    let ibuf    = 1
    9293 +    let buflast = bufnr("$")
    9294 +"    call Decho("  findbuf2: buflast=bufnr($)=".buflast)
    9295 +    while ibuf <= buflast
    9296 +     let bname= substitute(bufname(ibuf),'\\','/','g')
    9297 +     let bname= substitute(bname,'.\zs/$','','')
    9298 +"     call Decho("  findbuf3: while [ibuf=",ibuf."]<=[buflast=".buflast."]: dirname<".dirname."> bname=bufname(".ibuf.")<".bname.">")
    9299 +     if bname != '' && dirname =~ '/'.bname.'/\=$' && dirname !~ '^/'
    9300 +      " bname is not empty
    9301 +      " dirname ends with bname,
    9302 +      " dirname doesn't start with /, so its not a absolute path
    9303 +"      call Decho("  findbuf3a: passes test 1 : dirname<".dirname.'> =~ /'.bname.'/\=$ && dirname !~ ^/')
    9304 +      break
    9305 +     endif
    9306 +     if bname =~ '^'.dirname.'/\=$'
    9307 +      " bname begins with dirname
    9308 +"      call Decho('  findbuf3b: passes test 2 : bname<'.bname.'>=~^'.dirname.'/\=$')
    9309 +      break
    9310 +     endif
    9311 +     if dirname =~ '^'.bname.'/$'
    9312 +"      call Decho('  findbuf3c: passes test 3 : dirname<'.dirname.'>=~^'.bname.'/$')
    9313 +      break
    9314 +     endif
    9315 +     if bname != '' && dirname =~ '/'.bname.'$' && bname == bufname("%") && line("$") == 1
    9316 +"      call Decho('  findbuf3d: passes test 4 : dirname<'.dirname.'>=~ /'.bname.'$')
    9317 +      break
    9318       endif
    9319 +     let ibuf= ibuf + 1
    9320 +    endwhile
    9321 +    if ibuf > buflast
    9322 +     let bufnum= -1
    9323 +    else
    9324 +     let bufnum= ibuf
    9325      endif
    9326 +"    call Decho("  findbuf4: bufnum=".bufnum." (ibuf=".ibuf." buflast=".buflast.")")
    9327     endif
    9328 +  endif
    9329  
    9330 -  elseif newdir =~ '^/'
    9331 -   " ----------------------------------------------------
    9332 -   " NetrwBrowseChgDir: just go to the new directory spec {{{3
    9333 -   " ----------------------------------------------------
    9334 -"   call Decho('(NetrwBrowseChgDir:goto-newdir) case "just go to new directory spec": newdir<'.newdir.'>')
    9335 -   let dirname    = newdir
    9336 -   keepj call s:SetRexDir(a:islocal,dirname)
    9337 -   keepj call s:NetrwOptionRestore("s:")
    9338 -
    9339 -  elseif newdir == './'
    9340 -   " ---------------------------------------------
    9341 -   " NetrwBrowseChgDir: refresh the directory list {{{3
    9342 -   " ---------------------------------------------
    9343 -"   call Decho('(NetrwBrowseChgDir:refresh-dirlist) case "refresh directory listing": newdir == "./"')
    9344 -   keepj call s:SetRexDir(a:islocal,dirname)
    9345 -
    9346 -  elseif newdir == '../'
    9347 -   " --------------------------------------
    9348 -   " NetrwBrowseChgDir: go up one directory {{{3
    9349 -   " --------------------------------------
    9350 -"   call Decho('(NetrwBrowseChgDir:go-up) case "go up one directory": newdir == "../"')
    9351 -
    9352 -   if w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict")
    9353 -    " force a refresh
    9354 -"    call Decho("(NetrwBrowseChgDir:go-up) clear buffer<".expand("%")."> with :%d")
    9355 -"    call Decho("(NetrwBrowseChgDir:go-up) setl noro ma")
    9356 -    setl noro ma
    9357 -    keepj %d
    9358 -   endif
    9359 -
    9360 -   if has("amiga")
    9361 -    " amiga
    9362 -"    call Decho('(NetrwBrowseChgDir:go-up) case "go up one directory": newdir == "../" and amiga')
    9363 -    if a:islocal
    9364 -     let dirname= substitute(dirname,'^\(.*[/:]\)\([^/]\+$\)','\1','')
    9365 -     let dirname= substitute(dirname,'/$','','')
    9366 +  " get enew buffer and name it -or- re-use buffer {{{3
    9367 +"  call Decho("  get enew buffer and name it OR re-use buffer")
    9368 +  sil! keepj keepalt mark '
    9369 +  if bufnum < 0 || !bufexists(bufnum)
    9370 +"   call Decho("--get enew buffer and name it  (bufnum#".bufnum."<0 OR bufexists(".bufnum.")=".bufexists(bufnum)."==0)")
    9371 +   call s:NetrwEnew(dirname)
    9372 +"   call Decho("  got enew buffer#".bufnr("%")." (altbuf<".expand("#").">)")
    9373 +   " name the buffer
    9374 +   if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST
    9375 +    " Got enew buffer; transform into a NetrwTreeListing
    9376 +"    call Decho("--transform enew buffer#".bufnr("%")." into a NetrwTreeListing --")
    9377 +    if !exists("s:netrw_treelistnum")
    9378 +     let s:netrw_treelistnum= 1
    9379      else
    9380 -     let dirname= substitute(dirname,'^\(.*[/:]\)\([^/]\+/$\)','\1','')
    9381 +     let s:netrw_treelistnum= s:netrw_treelistnum + 1
    9382      endif
    9383 -"    call Decho("(NetrwBrowseChgDir:go-up) amiga: dirname<".dirname."> (go up one dir)")
    9384 -
    9385 +    let w:netrw_treebufnr= bufnr("%")
    9386 +"    call Decho("  exe sil! keepalt file NetrwTreeListing ".fnameescape(s:netrw_treelistnum))
    9387 +    exe 'sil! keepalt file NetrwTreeListing\ '.fnameescape(s:netrw_treelistnum)
    9388 +    setl bt=nofile noswf
    9389 +    nnoremap <silent> <buffer> [       :sil call <SID>TreeListMove('[')<cr>
    9390 +    nnoremap <silent> <buffer> ]       :sil call <SID>TreeListMove(']')<cr>
    9391 +    nnoremap <silent> <buffer> [[       :sil call <SID>TreeListMove('[')<cr>
    9392 +    nnoremap <silent> <buffer> ]]       :sil call <SID>TreeListMove(']')<cr>
    9393 +"    call Decho("  tree listing#".s:netrw_treelistnum." bufnr=".w:netrw_treebufnr)
    9394     else
    9395 -    " unix or cygwin
    9396 -"    call Decho('(NetrwBrowseChgDir:go-up) case "go up one directory": newdir == "../" and unix or cygwin')
    9397 -    if a:islocal
    9398 -     let dirname= substitute(dirname,'^\(.*\)/\([^/]\+\)/$','\1','')
    9399 -     if dirname == ""
    9400 -      let dirname= '/'
    9401 -     endif
    9402 -    else
    9403 -     let dirname= substitute(dirname,'^\(\a\+://.\{-}/\{1,2}\)\(.\{-}\)\([^/]\+\)/$','\1\2','')
    9404 -    endif
    9405 -"    call Decho("(NetrwBrowseChgDir:go-up) unix: dirname<".dirname."> (go up one dir)")
    9406 -   endif
    9407 -   keepj call s:SetRexDir(a:islocal,dirname)
    9408 -
    9409 -  elseif exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict")
    9410 -   " --------------------------------------
    9411 -   " NetrwBrowseChgDir: Handle Tree Listing {{{3
    9412 -   " --------------------------------------
    9413 -"   call Decho('(NetrwBrowseChgDir:tree-list) case liststyle is TREELIST and w:netrw_treedict exists')
    9414 -   " force a refresh (for TREELIST, wait for NetrwTreeDir() to force the refresh)
    9415 -"   call Decho("(NetrwBrowseChgDir) (treelist) setl noro ma")
    9416 -   setl noro ma
    9417 -   if !(exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir"))
    9418 -"    call Decho("(NetrwBrowseChgDir) clear buffer<".expand("%")."> with :%d")
    9419 -    keepj %d
    9420 +"    let v:errmsg= "" " Decho
    9421 +    let escdirname= fnameescape(dirname)
    9422 +"    call Decho("  errmsg<".v:errmsg."> bufnr(escdirname<".escdirname.">)=".bufnr(escdirname)." bufname()<".bufname(bufnr(escdirname)).">")
    9423 +"    call Decho('  exe sil! keepalt file '.escdirname)
    9424 +"    let v:errmsg= "" " Decho
    9425 +    exe 'sil! keepalt file '.escdirname
    9426 +"    call Decho("  errmsg<".v:errmsg."> bufnr(".escdirname.")=".bufnr(escdirname)."<".bufname(bufnr(escdirname)).">")
    9427     endif
    9428 -   let treedir      = s:NetrwTreeDir()
    9429 -   let s:treecurpos = nbcd_curpos
    9430 -   let haskey= 0
    9431 -"   call Decho("(NetrwBrowseChgDir:tree-list) w:netrw_treedict<".string(w:netrw_treedict).">")
    9432 +"   call Decho("  named enew buffer#".bufnr("%")."<".bufname("%").">")
    9433  
    9434 -   " search treedict for tree dir as-is
    9435 -   if has_key(w:netrw_treedict,treedir)
    9436 -"    call Decho('(NetrwBrowseChgDir:tree-list) ....searched for treedir<'.treedir.'> : found it!')
    9437 -    let haskey= 1
    9438 +  else " Re-use the buffer
    9439 +"   call Decho("--re-use buffer#".bufnum." (bufnum#".bufnum.">=0 AND bufexists(".bufnum.")=".bufexists(bufnum)."!=0)")
    9440 +   let eikeep= &ei
    9441 +   setl ei=all
    9442 +   if getline(2) =~ '^" Netrw Directory Listing'
    9443 +"    call Decho("  getline(2)<".getline(2).'> matches "Netrw Directory Listing" : using keepalt b '.bufnum)
    9444 +    exe "sil! keepalt b ".bufnum
    9445     else
    9446 -"    call Decho('(NetrwBrowseChgDir:tree-list) ....searched for treedir<'.treedir.'> : not found')
    9447 -   endif
    9448 -
    9449 -   " search treedict for treedir with a / appended
    9450 -   if !haskey && treedir !~ '/$'
    9451 -    if has_key(w:netrw_treedict,treedir."/")
    9452 -     let treedir= treedir."/"
    9453 -"     call Decho('(NetrwBrowseChgDir:tree-list) ....searched.for treedir<'.treedir.'> found it!')
    9454 -     let haskey = 1
    9455 -    else
    9456 -"     call Decho('(NetrwBrowseChgDir:tree-list) ....searched for treedir<'.treedir.'/> : not found')
    9457 -    endif
    9458 +"    call Decho("  getline(2)<".getline(2).'> does not match "Netrw Directory Listing" : using b '.bufnum)
    9459 +    exe "sil! keepalt b ".bufnum
    9460     endif
    9461 -
    9462 -   " search treedict for treedir with any trailing / elided
    9463 -   if !haskey && treedir =~ '/$'
    9464 -    let treedir= substitute(treedir,'/$','','')
    9465 -    if has_key(w:netrw_treedict,treedir)
    9466 -"     call Decho('(NetrwBrowseChgDir:tree-list) ....searched.for treedir<'.treedir.'> found it!')
    9467 -     let haskey = 1
    9468 -    else
    9469 -"     call Decho('(NetrwBrowseChgDir:tree-list) ....searched for treedir<'.treedir.'> : not found')
    9470 -    endif
    9471 +   if bufname("%") == '.'
    9472 +"    call Decho("exe sil! keepalt file ".fnameescape(getcwd()))
    9473 +    exe "sil! keepalt file ".fnameescape(getcwd())
    9474     endif
    9475 -
    9476 -   if haskey
    9477 -    " close tree listing for selected subdirectory
    9478 -"    call Decho("(NetrwBrowseChgDir:tree-list) closing selected subdirectory<".dirname.">")
    9479 -    call remove(w:netrw_treedict,treedir)
    9480 -"    call Decho("(NetrwBrowseChgDir) removed     entry<".treedir."> from treedict")
    9481 -"    call Decho("(NetrwBrowseChgDir) yielding treedict<".string(w:netrw_treedict).">")
    9482 -    let dirname= w:netrw_treetop
    9483 +   let &ei= eikeep
    9484 +   if line("$") <= 1
    9485 +    keepj call s:NetrwListSettings(a:islocal)
    9486 +"    call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo)
    9487 +"    call Dret("s:NetrwGetBuffer 0<buffer empty> : re-using buffer#".bufnr("%").", but its empty, so refresh it")
    9488 +    return 0
    9489 +   elseif g:netrw_fastbrowse == 0 || (a:islocal && g:netrw_fastbrowse == 1)
    9490 +    keepj call s:NetrwListSettings(a:islocal)
    9491 +    sil keepj %d
    9492 +"    call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo)
    9493 +"    call Dret("s:NetrwGetBuffer 0<cleared buffer> : re-using buffer#".bufnr("%").", but refreshing due to g:netrw_fastbrowse=".g:netrw_fastbrowse)
    9494 +    return 0
    9495 +   elseif exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST
    9496 +"    call Decho("--re-use tree listing--")
    9497 +"    call Decho("  clear buffer<".expand("%")."> with :%d")
    9498 +    sil keepj %d
    9499 +    keepj call s:NetrwListSettings(a:islocal)
    9500 +"    call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo)
    9501 +"    call Dret("s:NetrwGetBuffer 0<cleared buffer> : re-using buffer#".bufnr("%").", but treelist mode always needs a refresh")
    9502 +    return 0
    9503     else
    9504 -    " go down one directory
    9505 -    let dirname= substitute(treedir,'/*$','/','')
    9506 -"    call Decho("(NetrwBrowseChgDir:tree-list) go down one dir: treedir<".treedir.">")
    9507 +"    call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo)
    9508 +"    call Dret("s:NetrwGetBuffer 1<buffer not cleared> : buf#".bufnr("%"))
    9509 +    return 1
    9510     endif
    9511 -   keepj call s:SetRexDir(a:islocal,dirname)
    9512 -   let s:treeforceredraw = 1
    9513 -
    9514 -  else
    9515 -   " ----------------------------------------
    9516 -   " NetrwBrowseChgDir: Go down one directory {{{3
    9517 -   " ----------------------------------------
    9518 -   let dirname    = s:ComposePath(dirname,newdir)
    9519 -"   call Decho("(NetrwBrowseChgDir:go-down) go down one dir: dirname<".dirname."> newdir<".newdir.">")
    9520 -   keepj call s:SetRexDir(a:islocal,dirname)
    9521    endif
    9522  
    9523 - " --------------------------------------
    9524 - " NetrwBrowseChgDir: Restore and Cleanup {{{3
    9525 - " --------------------------------------
    9526 -  keepj call s:NetrwOptionRestore("s:")
    9527 -  if dolockout
    9528 -"   call Decho("(NetrwBrowseChgDir:restore) filewritable(dirname<".dirname.">)=".filewritable(dirname))
    9529 -   if filewritable(dirname)
    9530 -"    call Decho("(NetrwBrowseChgDir:restore) doing modification lockout settings: ma nomod noro")
    9531 -"    call Decho("(NetrwBrowseChgDir:restore) setl ma nomod noro")
    9532 -    setl ma nomod noro
    9533 -"    call Decho("(NetrwBrowseChgDir:restore) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
    9534 -   else
    9535 -"    call Decho("(NetrwBrowseChgDir:restore) doing modification lockout settings: ma nomod ro")
    9536 -"    call Decho("(NetrwBrowseChgDir:restore) setl ma nomod noro")
    9537 -    setl ma nomod ro
    9538 -"    call Decho("(NetrwBrowseChgDir:restore) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
    9539 -   endif
    9540 -  endif
    9541 -  let @@= ykeep
    9542 +  " do netrw settings: make this buffer not-a-file, modifiable, not line-numbered, etc {{{3
    9543 +  "     fastbrowse  Local  Remote   Hiding a buffer implies it may be re-used (fast)
    9544 +  "  slow   0         D      D      Deleting a buffer implies it will not be re-used (slow)
    9545 +  "  med    1         D      H
    9546 +  "  fast   2         H      H
    9547 +"  call Decho("--do netrw settings: make this buffer#".bufnr("%")." not-a-file, modifiable, not line-numbered, etc--")
    9548 +  let fname= expand("%")
    9549 +  keepj call s:NetrwListSettings(a:islocal)
    9550 +"  call Decho("exe sil! keepalt file ".fnameescape(fname))
    9551 +  exe "sil! keepj keepalt file ".fnameescape(fname)
    9552  
    9553 -"  call Dret("s:NetrwBrowseChgDir <".dirname."> : curpos<".string(getpos(".")).">")
    9554 -  return dirname
    9555 +  " delete all lines from buffer {{{3
    9556 +"  call Decho("--delete all lines from buffer--")
    9557 +"  call Decho("  clear buffer<".expand("%")."> with :%d")
    9558 +  sil! keepalt keepj %d
    9559 +
    9560 +"  call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo)
    9561 +"  call Dret("s:NetrwGetBuffer 0<cleared buffer> : tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%"))
    9562 +  return 0
    9563  endfun
    9564  
    9565  " ---------------------------------------------------------------------
    9566 -" s:NetrwBrowseX:  (implements "x") executes a special "viewer" script or program for the {{{2
    9567 -"              given filename; typically this means given their extension.
    9568 -"              0=local, 1=remote
    9569 -fun! netrw#NetrwBrowseX(fname,remote)
    9570 -"  call Dfunc("NetrwBrowseX(fname<".a:fname."> remote=".a:remote.")")
    9571 -
    9572 -  let ykeep      = @@
    9573 -  let screenposn = netrw#NetrwSavePosn()
    9574 -
    9575 -  " special core dump handler
    9576 -  if a:fname =~ '/core\(\.\d\+\)\=$'
    9577 -   if exists("g:Netrw_corehandler")
    9578 -    if type(g:Netrw_corehandler) == 2
    9579 -     " g:Netrw_corehandler is a function reference (see :help Funcref)
    9580 -"     call Decho("g:Netrw_corehandler is a funcref")
    9581 -     call g:Netrw_corehandler(a:fname)
    9582 -    elseif type(g:Netrw_corehandler) == 3
    9583 -     " g:Netrw_corehandler is a List of function references (see :help Funcref)
    9584 -"     call Decho("g:Netrw_corehandler is a List")
    9585 -     for Fncref in g:Netrw_corehandler
    9586 -      if type(FncRef) == 2
    9587 -       call FncRef(a:fname)
    9588 -      endif
    9589 -     endfor
    9590 -    endif
    9591 -    call netrw#NetrwRestorePosn(screenposn)
    9592 -    let @@= ykeep
    9593 -"    call Dret("NetrwBrowseX : coredump handler invoked")
    9594 -    return
    9595 -   endif
    9596 +" s:NetrwGetcwd: get the current directory. {{{2
    9597 +"   Change backslashes to forward slashes, if any.
    9598 +"   If doesc is true, escape certain troublesome characters
    9599 +fun! s:NetrwGetcwd(doesc)
    9600 +"  call Dfunc("NetrwGetcwd(doesc=".a:doesc.")")
    9601 +  let curdir= substitute(getcwd(),'\\','/','ge')
    9602 +  if curdir !~ '[\/]$'
    9603 +   let curdir= curdir.'/'
    9604    endif
    9605 -
    9606 -  " set up the filename
    9607 -  " (lower case the extension, make a local copy of a remote file)
    9608 -  let exten= substitute(a:fname,'.*\.\(.\{-}\)','\1','e')
    9609 -  if has("win32") || has("win95") || has("win64") || has("win16")
    9610 -   let exten= substitute(exten,'^.*$','\L&\E','')
    9611 +  if a:doesc
    9612 +   let curdir= fnameescape(curdir)
    9613    endif
    9614 -"  call Decho("exten<".exten.">")
    9615 +"  call Dret("NetrwGetcwd <".curdir.">")
    9616 +  return curdir
    9617 +endfun
    9618  
    9619 -  " seems kde systems often have gnome-open due to dependencies, even though
    9620 -  " gnome-open's subsidiary display tools are largely absent.  Kde systems
    9621 -  " usually have "kdeinit" running, though...  (tnx Mikolaj Machowski)
    9622 -  if !exists("s:haskdeinit")
    9623 -   if has("unix") && executable("ps") && !has("win32unix")
    9624 -    let s:haskdeinit= system("ps -e") =~ 'kdeinit'
    9625 -    if v:shell_error
    9626 -     let s:haskdeinit = 0
    9627 -    endif
    9628 -   else
    9629 -    let s:haskdeinit= 0
    9630 -   endif
    9631 -"   call Decho("setting s:haskdeinit=".s:haskdeinit)
    9632 -  endif
    9633 +" ---------------------------------------------------------------------
    9634 +"  s:NetrwGetWord: it gets the directory/file named under the cursor {{{2
    9635 +fun! s:NetrwGetWord()
    9636 +"  call Dfunc("s:NetrwGetWord() line#".line(".")." liststyle=".g:netrw_liststyle." virtcol=".virtcol("."))
    9637 +  call s:UseBufWinVars()
    9638  
    9639 -  if a:remote == 1
    9640 -   " create a local copy
    9641 -"   call Decho("(remote) a:remote=".a:remote.": create a local copy of <".a:fname.">")
    9642 -   setl bh=delete
    9643 -   call netrw#NetRead(3,a:fname)
    9644 -   " attempt to rename tempfile
    9645 -   let basename= substitute(a:fname,'^\(.*\)/\(.*\)\.\([^.]*\)$','\2','')
    9646 -   let newname = substitute(s:netrw_tmpfile,'^\(.*\)/\(.*\)\.\([^.]*\)$','\1/'.basename.'.\3','')
    9647 -"   call Decho("basename<".basename.">")
    9648 -"   call Decho("newname <".newname.">")
    9649 -   if rename(s:netrw_tmpfile,newname) == 0
    9650 -    " renaming succeeded
    9651 -    let fname= newname
    9652 +  " insure that w:netrw_liststyle is set up
    9653 +  if !exists("w:netrw_liststyle")
    9654 +   if exists("g:netrw_liststyle")
    9655 +    let w:netrw_liststyle= g:netrw_liststyle
    9656     else
    9657 -    " renaming failed
    9658 -    let fname= s:netrw_tmpfile
    9659 -   endif
    9660 -  else
    9661 -"   call Decho("(local) a:remote=".a:remote.": handling local copy of <".a:fname.">")
    9662 -   let fname= a:fname
    9663 -   " special ~ handler for local
    9664 -   if fname =~ '^\~' && expand("$HOME") != ""
    9665 -"    call Decho('invoking special ~ handler')
    9666 -    let fname= substitute(fname,'^\~',expand("$HOME"),'')
    9667 +    let w:netrw_liststyle= s:THINLIST
    9668     endif
    9669 +"   call Decho("w:netrw_liststyle=".w:netrw_liststyle)
    9670    endif
    9671 -"  call Decho("fname<".fname.">")
    9672 -"  call Decho("exten<".exten."> "."netrwFileHandlers#NFH_".exten."():exists=".exists("*netrwFileHandlers#NFH_".exten))
    9673  
    9674 -  " set up redirection
    9675 -  if &srr =~ "%s"
    9676 -   if (has("win32") || has("win95") || has("win64") || has("win16"))
    9677 -    let redir= substitute(&srr,"%s","nul","")
    9678 -   else
    9679 -    let redir= substitute(&srr,"%s","/dev/null","")
    9680 -   endif
    9681 -  elseif (has("win32") || has("win95") || has("win64") || has("win16"))
    9682 -   let redir= &srr . "nul"
    9683 -  else
    9684 -   let redir= &srr . "/dev/null"
    9685 -  endif
    9686 -"  call Decho("set up redirection: redir{".redir."} srr{".&srr."}")
    9687 +  if exists("w:netrw_bannercnt") && line(".") < w:netrw_bannercnt
    9688 +   " Active Banner support
    9689 +"   call Decho("active banner handling")
    9690 +   keepj norm! 0
    9691 +   let dirname= "./"
    9692 +   let curline= getline('.')
    9693  
    9694 -  " extract any viewing options.  Assumes that they're set apart by quotes.
    9695 -"  call Decho("extract any viewing options")
    9696 -  if exists("g:netrw_browsex_viewer")
    9697 -"   call Decho("g:netrw_browsex_viewer<".g:netrw_browsex_viewer.">")
    9698 -   if g:netrw_browsex_viewer =~ '\s'
    9699 -    let viewer  = substitute(g:netrw_browsex_viewer,'\s.*$','','')
    9700 -    let viewopt = substitute(g:netrw_browsex_viewer,'^\S\+\s*','','')." "
    9701 -    let oviewer = ''
    9702 -    let cnt     = 1
    9703 -    while !executable(viewer) && viewer != oviewer
    9704 -     let viewer  = substitute(g:netrw_browsex_viewer,'^\(\(^\S\+\s\+\)\{'.cnt.'}\S\+\)\(.*\)$','\1','')
    9705 -     let viewopt = substitute(g:netrw_browsex_viewer,'^\(\(^\S\+\s\+\)\{'.cnt.'}\S\+\)\(.*\)$','\3','')." "
    9706 -     let cnt     = cnt + 1
    9707 -     let oviewer = viewer
    9708 -"     call Decho("!exe: viewer<".viewer.">  viewopt<".viewopt.">")
    9709 -    endwhile
    9710 -   else
    9711 -    let viewer  = g:netrw_browsex_viewer
    9712 -    let viewopt = ""
    9713 -   endif
    9714 -"   call Decho("viewer<".viewer.">  viewopt<".viewopt.">")
    9715 -  endif
    9716 +   if curline =~ '"\s*Sorted by\s'
    9717 +    keepj norm s
    9718 +    let s:netrw_skipbrowse= 1
    9719 +    echo 'Pressing "s" also works'
    9720  
    9721 -  " execute the file handler
    9722 -"  call Decho("execute the file handler (if any)")
    9723 -  if exists("g:netrw_browsex_viewer") && g:netrw_browsex_viewer == '-'
    9724 -"   call Decho("g:netrw_browsex_viewer<".g:netrw_browsex_viewer.">")
    9725 -   let ret= netrwFileHandlers#Invoke(exten,fname)
    9726 +   elseif curline =~ '"\s*Sort sequence:'
    9727 +    let s:netrw_skipbrowse= 1
    9728 +    echo 'Press "S" to edit sorting sequence'
    9729  
    9730 -  elseif exists("g:netrw_browsex_viewer") && executable(viewer)
    9731 -"   call Decho("g:netrw_browsex_viewer<".g:netrw_browsex_viewer.">")
    9732 -"   call Decho("exe sil !".viewer." ".viewopt.shellescape(fname,1).redir)
    9733 -   exe "sil !".viewer." ".viewopt.shellescape(fname,1).redir
    9734 -   let ret= v:shell_error
    9735 +   elseif curline =~ '"\s*Quick Help:'
    9736 +    keepj norm ?
    9737 +    let s:netrw_skipbrowse= 1
    9738 +    echo 'Pressing "?" also works'
    9739  
    9740 -  elseif has("win32") || has("win64")
    9741 -"   call Decho("windows")
    9742 -   if executable("start")
    9743 -"    call Decho('exe sil !start rundll32 url.dll,FileProtocolHandler '.shellescape(fname,1))
    9744 -    exe 'sil !start rundll32 url.dll,FileProtocolHandler '.shellescape(fname,1)
    9745 -   elseif executable("rundll32")
    9746 -"    call Decho('exe sil !rundll32 url.dll,FileProtocolHandler '.shellescape(fname,1))
    9747 -    exe 'sil !rundll32 url.dll,FileProtocolHandler '.shellescape(fname,1)
    9748 -   else
    9749 -    call netrw#ErrorMsg(s:WARNING,"rundll32 not on path",74)
    9750 -   endif
    9751 -   call inputsave()|call input("Press <cr> to continue")|call inputrestore()
    9752 -   let ret= v:shell_error
    9753 +   elseif curline =~ '"\s*\%(Hiding\|Showing\):'
    9754 +    keepj norm a
    9755 +    let s:netrw_skipbrowse= 1
    9756 +    echo 'Pressing "a" also works'
    9757  
    9758 -  elseif has("win32unix")
    9759 -   let winfname= 'c:\cygwin'.substitute(fname,'/','\\','g')
    9760 -"   call Decho("cygwin: winfname<".shellescape(winfname,1).">")
    9761 -   if executable("start")
    9762 -"    call Decho('exe sil !start rundll32 url.dll,FileProtocolHandler '.shellescape(winfname,1))
    9763 -    exe 'sil !start rundll32 url.dll,FileProtocolHandler '.shellescape(winfname,1)
    9764 -   elseif executable("rundll32")
    9765 -"    call Decho('exe sil !rundll32 url.dll,FileProtocolHandler '.shellescape(winfname,1))
    9766 -    exe 'sil !rundll32 url.dll,FileProtocolHandler '.shellescape(winfname,1)
    9767 -   else
    9768 -    call netrw#ErrorMsg(s:WARNING,"rundll32 not on path",74)
    9769 +   elseif line("$") > w:netrw_bannercnt
    9770 +    exe 'sil keepj '.w:netrw_bannercnt
    9771     endif
    9772 -   call inputsave()|call input("Press <cr> to continue")|call inputrestore()
    9773 -   let ret= v:shell_error
    9774  
    9775 -  elseif has("unix") && executable("xdg-open") && !s:haskdeinit
    9776 -"   call Decho("unix and xdg-open")
    9777 -"   call Decho("exe sil !xdg-open ".shellescape(fname,1)." ".redir)
    9778 -   exe "sil !xdg-open ".shellescape(fname,1).redir
    9779 -   let ret= v:shell_error
    9780 +  elseif w:netrw_liststyle == s:THINLIST
    9781 +"   call Decho("thin column handling")
    9782 +   keepj norm! 0
    9783 +   let dirname= getline('.')
    9784  
    9785 -  elseif has("unix") && executable("kfmclient") && s:haskdeinit
    9786 -"   call Decho("unix and kfmclient")
    9787 -"   call Decho("exe sil !kfmclient exec ".shellescape(fname,1)." ".redir)
    9788 -   exe "sil !kfmclient exec ".shellescape(fname,1)." ".redir
    9789 -   let ret= v:shell_error
    9790 +  elseif w:netrw_liststyle == s:LONGLIST
    9791 +"   call Decho("long column handling")
    9792 +   keepj norm! 0
    9793 +   let dirname= substitute(getline('.'),'^\(\%(\S\+ \)*\S\+\).\{-}$','\1','e')
    9794  
    9795 -  elseif has("macunix") && executable("open")
    9796 -"   call Decho("macunix and open")
    9797 -"   call Decho("exe sil !open ".shellescape(fname,1)." ".redir)
    9798 -   exe "sil !open ".shellescape(fname,1)." ".redir
    9799 -   let ret= v:shell_error
    9800 +  elseif w:netrw_liststyle == s:TREELIST
    9801 +"   call Decho("treelist handling")
    9802 +   let dirname= substitute(getline('.'),'^\('.s:treedepthstring.'\)*','','e')
    9803  
    9804    else
    9805 -   " netrwFileHandlers#Invoke() always returns 0
    9806 -   let ret= netrwFileHandlers#Invoke(exten,fname)
    9807 -  endif
    9808 +"   call Decho("obtain word from wide listing")
    9809 +   let dirname= getline('.')
    9810  
    9811 -  " if unsuccessful, attempt netrwFileHandlers#Invoke()
    9812 -  if ret
    9813 -   let ret= netrwFileHandlers#Invoke(exten,fname)
    9814 +   if !exists("b:netrw_cpf")
    9815 +    let b:netrw_cpf= 0
    9816 +    exe 'sil keepj '.w:netrw_bannercnt.',$g/^./if virtcol("$") > b:netrw_cpf|let b:netrw_cpf= virtcol("$")|endif'
    9817 +    call histdel("/",-1)
    9818 +"   call Decho("computed cpf=".b:netrw_cpf)
    9819 +   endif
    9820 +
    9821 +"   call Decho("buf#".bufnr("%")."<".bufname("%").">")
    9822 +   let filestart = (virtcol(".")/b:netrw_cpf)*b:netrw_cpf
    9823 +"   call Decho("filestart= ([virtcol=".virtcol(".")."]/[b:netrw_cpf=".b:netrw_cpf."])*b:netrw_cpf=".filestart."  bannercnt=".w:netrw_bannercnt)
    9824 +"   call Decho("1: dirname<".dirname.">")
    9825 +   if filestart == 0
    9826 +    keepj norm! 0ma
    9827 +   else
    9828 +    call cursor(line("."),filestart+1)
    9829 +    keepj norm! ma
    9830 +   endif
    9831 +   let rega= @a
    9832 +   let eofname= filestart + b:netrw_cpf + 1
    9833 +   if eofname <= col("$")
    9834 +    call cursor(line("."),filestart+b:netrw_cpf+1)
    9835 +    keepj norm! "ay`a
    9836 +   else
    9837 +    keepj norm! "ay$
    9838 +   endif
    9839 +   let dirname = @a
    9840 +   let @a      = rega
    9841 +"   call Decho("2: dirname<".dirname.">")
    9842 +   let dirname= substitute(dirname,'\s\+$','','e')
    9843 +"   call Decho("3: dirname<".dirname.">")
    9844    endif
    9845  
    9846 -  " restoring redraw! after external file handlers
    9847 -  redraw!
    9848 +  " symlinks are indicated by a trailing "@".  Remove it before further processing.
    9849 +  let dirname= substitute(dirname,"@$","","")
    9850  
    9851 -  " cleanup: remove temporary file,
    9852 -  "          delete current buffer if success with handler,
    9853 -  "          return to prior buffer (directory listing)
    9854 -  "          Feb 12, 2008: had to de-activiate removal of
    9855 -  "          temporary file because it wasn't getting seen.
    9856 -"  if a:remote == 1 && fname != a:fname
    9857 -""   call Decho("deleting temporary file<".fname.">")
    9858 -"   call s:NetrwDelete(fname)
    9859 -"  endif
    9860 -
    9861 -  if a:remote == 1
    9862 -   setl bh=delete bt=nofile
    9863 -   if g:netrw_use_noswf
    9864 -    setl noswf
    9865 -   endif
    9866 -   exe "sil! keepj norm! \<c-o>"
    9867 -"   redraw!
    9868 -  endif
    9869 -  call netrw#NetrwRestorePosn(screenposn)
    9870 -  let @@= ykeep
    9871 +  " executables are indicated by a trailing "*".  Remove it before further processing.
    9872 +  let dirname= substitute(dirname,"\*$","","")
    9873  
    9874 -"  call Dret("NetrwBrowseX")
    9875 +"  call Dret("s:NetrwGetWord <".dirname.">")
    9876 +  return dirname
    9877  endfun
    9878  
    9879  " ---------------------------------------------------------------------
    9880 -" s:NetrwChgPerm: (implements "gp") change file permission {{{2
    9881 -fun! s:NetrwChgPerm(islocal,curdir)
    9882 -"  call Dfunc("s:NetrwChgPerm(islocal=".a:islocal." curdir<".a:curdir.">)")
    9883 -  let ykeep  = @@
    9884 -  call inputsave()
    9885 -  let newperm= input("Enter new permission: ")
    9886 -  call inputrestore()
    9887 -  let chgperm= substitute(g:netrw_chgperm,'\<FILENAME\>',shellescape(expand("<cfile>")),'')
    9888 -  let chgperm= substitute(chgperm,'\<PERM\>',shellescape(newperm),'')
    9889 -"  call Decho("chgperm<".chgperm.">")
    9890 -  call system(chgperm)
    9891 -  if v:shell_error != 0
    9892 -   keepj call netrw#ErrorMsg(1,"changing permission on file<".expand("<cfile>")."> seems to have failed",75)
    9893 +" s:NetrwListSettings: make standard settings for a netrw listing {{{2
    9894 +fun! s:NetrwListSettings(islocal)
    9895 +"  call Dfunc("s:NetrwListSettings(islocal=".a:islocal.")")
    9896 +"  call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo)
    9897 +  let fname= bufname("%")
    9898 +"  call Decho("(NetrwListSettings) setl bt=nofile nobl ma nonu nowrap noro")
    9899 +  setl bt=nofile nobl ma nonu nowrap noro
    9900 +"  call Decho("(NetrwListSettings) exe sil! keepalt file ".fnameescape(fname))
    9901 +  exe "sil! keepalt file ".fnameescape(fname)
    9902 +  if g:netrw_use_noswf
    9903 +   setl noswf
    9904    endif
    9905 -  if a:islocal
    9906 -   keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
    9907 +"  call Dredir("ls!")
    9908 +"  call Decho("(NetrwListSettings) exe setl ts=".(g:netrw_maxfilenamelen+1))
    9909 +  exe "setl ts=".(g:netrw_maxfilenamelen+1)
    9910 +  setl isk+=.,~,-
    9911 +  if g:netrw_fastbrowse > a:islocal
    9912 +   setl bh=hide
    9913 +  else
    9914 +   setl bh=delete
    9915    endif
    9916 -  let @@= ykeep
    9917 -"  call Dret("s:NetrwChgPerm")
    9918 +"  call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo)
    9919 +"  call Dret("s:NetrwListSettings")
    9920  endfun
    9921  
    9922  " ---------------------------------------------------------------------
    9923 -" s:NetrwClearExplore: clear explore variables (if any) {{{2
    9924 -fun! s:NetrwClearExplore()
    9925 -"  call Dfunc("s:NetrwClearExplore()")
    9926 -  2match none
    9927 -  if exists("s:explore_match")        |unlet s:explore_match        |endif
    9928 -  if exists("s:explore_indx")         |unlet s:explore_indx         |endif
    9929 -  if exists("s:netrw_explore_prvdir") |unlet s:netrw_explore_prvdir |endif
    9930 -  if exists("s:dirstarstar")          |unlet s:dirstarstar          |endif
    9931 -  if exists("s:explore_prvdir")       |unlet s:explore_prvdir       |endif
    9932 -  if exists("w:netrw_explore_indx")   |unlet w:netrw_explore_indx   |endif
    9933 -  if exists("w:netrw_explore_listlen")|unlet w:netrw_explore_listlen|endif
    9934 -  if exists("w:netrw_explore_list")   |unlet w:netrw_explore_list   |endif
    9935 -  if exists("w:netrw_explore_bufnr")  |unlet w:netrw_explore_bufnr  |endif
    9936 -"   redraw!
    9937 -  echo " "
    9938 -  echo " "
    9939 -"  call Dret("s:NetrwClearExplore")
    9940 -endfun
    9941 +"  s:NetrwListStyle: {{{2
    9942 +"  islocal=0: remote browsing
    9943 +"         =1: local browsing
    9944 +fun! s:NetrwListStyle(islocal)
    9945 +"  call Dfunc("NetrwListStyle(islocal=".a:islocal.") w:netrw_liststyle=".w:netrw_liststyle)
    9946 +  let ykeep             = @@
    9947 +  let fname             = s:NetrwGetWord()
    9948 +  if !exists("w:netrw_liststyle")|let w:netrw_liststyle= g:netrw_liststyle|endif
    9949 +  let w:netrw_liststyle = (w:netrw_liststyle + 1) % s:MAXLIST
    9950 +"  call Decho("fname<".fname.">")
    9951 +"  call Decho("chgd w:netrw_liststyle to ".w:netrw_liststyle)
    9952 +"  call Decho("b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : "doesn't exist").">")
    9953  
    9954 -" ---------------------------------------------------------------------
    9955 -" s:NetrwExploreListUniq: {{{2
    9956 -fun! s:NetrwExploreListUniq(explist)
    9957 -"  call Dfunc("s:NetrwExploreListUniq(explist<".string(a:explist).">)")
    9958 +  if w:netrw_liststyle == s:THINLIST
    9959 +   " use one column listing
    9960 +"   call Decho("use one column list")
    9961 +   let g:netrw_list_cmd = substitute(g:netrw_list_cmd,' -l','','ge')
    9962  
    9963 -  " this assumes that the list is already sorted
    9964 -  let newexplist= []
    9965 -  for member in a:explist
    9966 -   if !exists("uniqmember") || member != uniqmember
    9967 -    let uniqmember = member
    9968 -    let newexplist = newexplist + [ member ]
    9969 -   endif
    9970 -  endfor
    9971 +  elseif w:netrw_liststyle == s:LONGLIST
    9972 +   " use long list
    9973 +"   call Decho("use long list")
    9974 +   let g:netrw_list_cmd = g:netrw_list_cmd." -l"
    9975  
    9976 -"  call Dret("s:NetrwExploreListUniq newexplist<".string(newexplist).">")
    9977 -  return newexplist
    9978 -endfun
    9979 +  elseif w:netrw_liststyle == s:WIDELIST
    9980 +   " give wide list
    9981 +"   call Decho("use wide list")
    9982 +   let g:netrw_list_cmd = substitute(g:netrw_list_cmd,' -l','','ge')
    9983  
    9984 -" ---------------------------------------------------------------------
    9985 -" s:NetrwForceChgDir: (gd support) Force treatment as a directory {{{2
    9986 -fun! s:NetrwForceChgDir(islocal,newdir)
    9987 -"  call Dfunc("s:NetrwForceChgDir(islocal=".a:islocal." newdir<".a:newdir.">)")
    9988 -  let ykeep= @@
    9989 -  if a:newdir !~ '/$'
    9990 -   " ok, looks like force is needed to get directory-style treatment
    9991 -   if a:newdir =~ '@$'
    9992 -    let newdir= substitute(a:newdir,'@$','/','')
    9993 -   elseif a:newdir =~ '[*=|\\]$'
    9994 -    let newdir= substitute(a:newdir,'.$','/','')
    9995 -   else
    9996 -    let newdir= a:newdir.'/'
    9997 -   endif
    9998 -"   call Decho("adjusting newdir<".newdir."> due to gd")
    9999 -  else
    10000 -   " should already be getting treatment as a directory
    10001 -   let newdir= a:newdir
    10002 -  endif
    10003 -  let newdir= s:NetrwBrowseChgDir(a:islocal,newdir)
    10004 -  call s:NetrwBrowse(a:islocal,newdir)
    10005 -  let @@= ykeep
    10006 -"  call Dret("s:NetrwForceChgDir")
    10007 -endfun
    10008 +  elseif w:netrw_liststyle == s:TREELIST
    10009 +"   call Decho("use tree list")
    10010 +   let g:netrw_list_cmd = substitute(g:netrw_list_cmd,' -l','','ge')
    10011  
    10012 -" ---------------------------------------------------------------------
    10013 -" s:NetrwForceFile: (gf support) Force treatment as a file {{{2
    10014 -fun! s:NetrwForceFile(islocal,newfile)
    10015 -"  call Dfunc("s:NetrwForceFile(islocal=".a:islocal." newdir<".a:newfile.">)")
    10016 -  if a:newfile =~ '[/@*=|\\]$'
    10017 -   let newfile= substitute(a:newfile,'.$','','')
    10018    else
    10019 -   let newfile= a:newfile
    10020 +   keepj call netrw#ErrorMsg(s:WARNING,"bad value for g:netrw_liststyle (=".w:netrw_liststyle.")",46)
    10021 +   let g:netrw_liststyle = s:THINLIST
    10022 +   let w:netrw_liststyle = g:netrw_liststyle
    10023 +   let g:netrw_list_cmd  = substitute(g:netrw_list_cmd,' -l','','ge')
    10024    endif
    10025 -  if a:islocal
    10026 -   call s:NetrwBrowseChgDir(a:islocal,newfile)
    10027 -  else
    10028 -   call s:NetrwBrowse(a:islocal,s:NetrwBrowseChgDir(a:islocal,newfile))
    10029 +  setl ma noro
    10030 +"  call Decho("setl ma noro")
    10031 +
    10032 +  " clear buffer - this will cause NetrwBrowse/LocalBrowseCheck to do a refresh
    10033 +"  call Decho("clear buffer<".expand("%")."> with :%d")
    10034 +  sil! keepj %d
    10035 +  " following prevents tree listing buffer from being marked "modified"
    10036 +"  call Decho("setl nomod")
    10037 +  setl nomod
    10038 +"  call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
    10039 +
    10040 +  " refresh the listing
    10041 +"  call Decho("refresh the listing")
    10042 +  let svpos= netrw#SavePosn()
    10043 +  keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
    10044 +  keepj call netrw#RestorePosn(svpos)
    10045 +  keepj call s:NetrwCursor()
    10046 +
    10047 +  " keep cursor on the filename
    10048 +  sil! keepj $
    10049 +  let result= search('\%(^\%(|\+\s\)\=\|\s\{2,}\)\zs'.escape(fname,'.\[]*$^').'\%(\s\{2,}\|$\)','bc')
    10050 +"  call Decho("search result=".result." w:netrw_bannercnt=".(exists("w:netrw_bannercnt")? w:netrw_bannercnt : 'N/A'))
    10051 +  if result <= 0 && exists("w:netrw_bannercnt")
    10052 +   exe "sil! keepj ".w:netrw_bannercnt
    10053    endif
    10054 -"  call Dret("s:NetrwForceFile")
    10055 +  let @@= ykeep
    10056 +
    10057 +"  call Dret("NetrwListStyle".(exists("w:netrw_liststyle")? ' : w:netrw_liststyle='.w:netrw_liststyle : ""))
    10058  endfun
    10059  
    10060  " ---------------------------------------------------------------------
    10061 -" s:NetrwHide: this function is invoked by the "a" map for browsing {{{2
    10062 -"          and switches the hiding mode.  The actual hiding is done by
    10063 -"          s:NetrwListHide().
    10064 -"             g:netrw_hide= 0: show all
    10065 -"                           1: show not-hidden files
    10066 -"                           2: show hidden files only
    10067 -fun! s:NetrwHide(islocal)
    10068 -"  call Dfunc("NetrwHide(islocal=".a:islocal.") g:netrw_hide=".g:netrw_hide)
    10069 -  let ykeep= @@
    10070 -  let svpos= netrw#NetrwSavePosn()
    10071 -
    10072 -  if exists("s:netrwmarkfilelist_{bufnr('%')}")
    10073 -"   call Decho(((g:netrw_hide == 1)? "unhide" : "hide")." files in markfilelist<".string(s:netrwmarkfilelist_{bufnr("%")}).">")
    10074 -"   call Decho("g:netrw_list_hide<".g:netrw_list_hide.">")
    10075 +" s:NetrwBannerCtrl: toggles the display of the banner {{{2
    10076 +fun! s:NetrwBannerCtrl(islocal)
    10077 +"  call Dfunc("s:NetrwBannerCtrl(islocal=".a:islocal.") g:netrw_banner=".g:netrw_banner)
    10078  
    10079 -   " hide the files in the markfile list
    10080 -   for fname in s:netrwmarkfilelist_{bufnr("%")}
    10081 -"    call Decho("match(g:netrw_list_hide<".g:netrw_list_hide.'> fname<\<'.fname.'\>>)='.match(g:netrw_list_hide,'\<'.fname.'\>')." l:isk=".&l:isk)
    10082 -    if match(g:netrw_list_hide,'\<'.fname.'\>') != -1
    10083 -     " remove fname from hiding list
    10084 -     let g:netrw_list_hide= substitute(g:netrw_list_hide,'..\<'.escape(fname,g:netrw_fname_escape).'\>..','','')
    10085 -     let g:netrw_list_hide= substitute(g:netrw_list_hide,',,',',','g')
    10086 -     let g:netrw_list_hide= substitute(g:netrw_list_hide,'^,\|,$','','')
    10087 -"     call Decho("unhide: g:netrw_list_hide<".g:netrw_list_hide.">")
    10088 -    else
    10089 -     " append fname to hiding list
    10090 -     if exists("g:netrw_list_hide") && g:netrw_list_hide != ""
    10091 -      let g:netrw_list_hide= g:netrw_list_hide.',\<'.escape(fname,g:netrw_fname_escape).'\>'
    10092 -     else
    10093 -      let g:netrw_list_hide= '\<'.escape(fname,g:netrw_fname_escape).'\>'
    10094 -     endif
    10095 -"     call Decho("hide: g:netrw_list_hide<".g:netrw_list_hide.">")
    10096 -    endif
    10097 -   endfor
    10098 -   keepj call s:NetrwUnmarkList(bufnr("%"),b:netrw_curdir)
    10099 -   let g:netrw_hide= 1
    10100 +  let ykeep= @@
    10101 +  " toggle the banner (enable/suppress)
    10102 +  let g:netrw_banner= !g:netrw_banner
    10103  
    10104 -  else
    10105 +  " refresh the listing
    10106 +  let svpos= netrw#SavePosn()
    10107 +  call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
    10108  
    10109 -   " switch between show-all/show-not-hidden/show-hidden
    10110 -   let g:netrw_hide=(g:netrw_hide+1)%3
    10111 -   exe "keepj norm! 0"
    10112 -   if g:netrw_hide && g:netrw_list_hide == ""
    10113 -    keepj call netrw#ErrorMsg(s:WARNING,"your hiding list is empty!",49)
    10114 -    let @@= ykeep
    10115 -"    call Dret("NetrwHide")
    10116 -    return
    10117 -   endif
    10118 +  " keep cursor on the filename
    10119 +  let fname= s:NetrwGetWord()
    10120 +  sil keepj $
    10121 +  let result= search('\%(^\%(|\+\s\)\=\|\s\{2,}\)\zs'.escape(fname,'.\[]*$^').'\%(\s\{2,}\|$\)','bc')
    10122 +"  call Decho("search result=".result." w:netrw_bannercnt=".(exists("w:netrw_bannercnt")? w:netrw_bannercnt : 'N/A'))
    10123 +  if result <= 0 && exists("w:netrw_bannercnt")
    10124 +   exe "keepj ".w:netrw_bannercnt
    10125    endif
    10126 -
    10127 -  keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
    10128 -  keepj call netrw#NetrwRestorePosn(svpos)
    10129    let @@= ykeep
    10130 -"  call Dret("NetrwHide")
    10131 +"  call Dret("s:NetrwBannerCtrl : g:netrw_banner=".g:netrw_banner)
    10132  endfun
    10133  
    10134  " ---------------------------------------------------------------------
    10135 -" s:NetrwHidden: invoked by "gh" {{{2
    10136 -fun! s:NetrwHidden(islocal)
    10137 -"  call Dfunc("s:NetrwHidden()")
    10138 -  let ykeep= @@
    10139 -  "  save current position
    10140 -  let svpos= netrw#NetrwSavePosn()
    10141 +" s:NetrwBookmarkMenu: Uses menu priorities {{{2
    10142 +"                      .2.[cnt] for bookmarks, and
    10143 +"                      .3.[cnt] for history
    10144 +"                      (see s:NetrwMenu())
    10145 +fun! s:NetrwBookmarkMenu()
    10146 +  if !exists("s:netrw_menucnt")
    10147 +   return
    10148 +  endif
    10149 +"  call Dfunc("NetrwBookmarkMenu()  histcnt=".g:netrw_dirhist_cnt." menucnt=".s:netrw_menucnt)
    10150  
    10151 -  if g:netrw_list_hide =~ '\(^\|,\)\\(^\\|\\s\\s\\)\\zs\\.\\S\\+'
    10152 -   " remove pattern from hiding list
    10153 -   let g:netrw_list_hide= substitute(g:netrw_list_hide,'\(^\|,\)\\(^\\|\\s\\s\\)\\zs\\.\\S\\+','','')
    10154 -  elseif s:Strlen(g:netrw_list_hide) >= 1
    10155 -   let g:netrw_list_hide= g:netrw_list_hide . ',\(^\|\s\s\)\zs\.\S\+'
    10156 -  else
    10157 -   let g:netrw_list_hide= '\(^\|\s\s\)\zs\.\S\+'
    10158 -  endif
    10159 +  " the following test assures that gvim is running, has menus available, and has menus enabled.
    10160 +  if has("gui") && has("menu") && has("gui_running") && &go =~# 'm' && g:netrw_menu
    10161 +   if exists("g:NetrwTopLvlMenu")
    10162 +"    call Decho("removing ".g:NetrwTopLvlMenu."Bookmarks menu item(s)")
    10163 +    exe 'sil! unmenu '.g:NetrwTopLvlMenu.'Bookmarks'
    10164 +    exe 'sil! unmenu '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Bookmark\ Delete'
    10165 +   endif
    10166 +   if !exists("s:netrw_initbookhist")
    10167 +    call s:NetrwBookHistRead()
    10168 +   endif
    10169  
    10170 -  " refresh screen and return to saved position
    10171 -  keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
    10172 -  keepj call netrw#NetrwRestorePosn(svpos)
    10173 -  let @@= ykeep
    10174 -"  call Dret("s:NetrwHidden")
    10175 -endfun
    10176 +   " show bookmarked places
    10177 +   if exists("g:netrw_bookmarklist") && g:netrw_bookmarklist != [] && g:netrw_dirhistmax > 0
    10178 +    let cnt= 1
    10179 +    for bmd in g:netrw_bookmarklist
    10180 +"     call Decho('sil! menu '.g:NetrwMenuPriority.".2.".cnt." ".g:NetrwTopLvlMenu.'Bookmark.'.bmd.'    :e '.bmd)
    10181 +     let bmd= escape(bmd,g:netrw_menu_escape)
    10182 +
    10183 +     " show bookmarks for goto menu
    10184 +     exe 'sil! menu '.g:NetrwMenuPriority.".2.".cnt." ".g:NetrwTopLvlMenu.'Bookmarks.'.bmd.'   :e '.bmd."\<cr>"
    10185 +
    10186 +     " show bookmarks for deletion menu
    10187 +     exe 'sil! menu '.g:NetrwMenuPriority.".8.2.".cnt." ".g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Bookmark\ Delete.'.bmd.'  '.cnt."mB"
    10188 +     let cnt= cnt + 1
    10189 +    endfor
    10190  
    10191 -" ---------------------------------------------------------------------
    10192 -"  s:NetrwHome: this function determines a "home" for saving bookmarks and history {{{2
    10193 -fun! s:NetrwHome()
    10194 -  if exists("g:netrw_home")
    10195 -   let home= g:netrw_home
    10196 -  else
    10197 -   " go to vim plugin home
    10198 -   for home in split(&rtp,',') + ['']
    10199 -    if isdirectory(home) && filewritable(home) | break | endif
    10200 -     let basehome= substitute(home,'[/\\]\.vim$','','')
    10201 -    if isdirectory(basehome) && filewritable(basehome)
    10202 -     let home= basehome."/.vim"
    10203 -     break
    10204 -    endif
    10205 -   endfor
    10206 -   if home == ""
    10207 -    " just pick the first directory
    10208 -    let home= substitute(&rtp,',.*$','','')
    10209 -   endif
    10210 -   if (has("win32") || has("win95") || has("win64") || has("win16"))
    10211 -    let home= substitute(home,'/','\\','g')
    10212     endif
    10213 -  endif
    10214 -  " insure that the home directory exists
    10215 -  if g:netrw_dirhistmax > 0 && !isdirectory(home)
    10216 -   if exists("g:netrw_mkdir")
    10217 -    call system(g:netrw_mkdir." ".shellescape(home))
    10218 -   else
    10219 -    call mkdir(home)
    10220 +
    10221 +   " show directory browsing history
    10222 +   if g:netrw_dirhistmax > 0
    10223 +    let cnt     = g:netrw_dirhist_cnt
    10224 +    let first   = 1
    10225 +    let histcnt = 0
    10226 +    while ( first || cnt != g:netrw_dirhist_cnt )
    10227 +     let histcnt  = histcnt + 1
    10228 +     let priority = g:netrw_dirhist_cnt + histcnt
    10229 +     if exists("g:netrw_dirhist_{cnt}")
    10230 +      let histdir= escape(g:netrw_dirhist_{cnt},g:netrw_menu_escape)
    10231 +"     call Decho('sil! menu '.g:NetrwMenuPriority.".3.".priority." ".g:NetrwTopLvlMenu.'History.'.histdir.'    :e '.histdir)
    10232 +      exe 'sil! menu '.g:NetrwMenuPriority.".3.".priority." ".g:NetrwTopLvlMenu.'History.'.histdir.'   :e '.histdir."\<cr>"
    10233 +     endif
    10234 +     let first = 0
    10235 +     let cnt   = ( cnt - 1 ) % g:netrw_dirhistmax
    10236 +     if cnt < 0
    10237 +      let cnt= cnt + g:netrw_dirhistmax
    10238 +     endif
    10239 +    endwhile
    10240     endif
    10241 +
    10242    endif
    10243 -  let g:netrw_home= home
    10244 -  return home
    10245 +"  call Dret("NetrwBookmarkMenu")
    10246  endfun
    10247  
    10248  " ---------------------------------------------------------------------
    10249 -" s:NetrwLeftmouse: handles the <leftmouse> when in a netrw browsing window {{{2
    10250 -fun! s:NetrwLeftmouse(islocal)
    10251 -  if exists("s:netrwdrag")
    10252 -   return
    10253 -  endif
    10254 -"  call Dfunc("s:NetrwLeftmouse(islocal=".a:islocal.")")
    10255 +"  s:NetrwBrowseChgDir: constructs a new directory based on the current {{{2
    10256 +"                       directory and a new directory name.  Also, if the
    10257 +"                       "new directory name" is actually a file,
    10258 +"                       NetrwBrowseChgDir() edits the file.
    10259 +fun! s:NetrwBrowseChgDir(islocal,newdir,...)
    10260 +"  call Dfunc("s:NetrwBrowseChgDir(islocal=".a:islocal."> newdir<".a:newdir.">) a:0=".a:0." curpos<".string(getpos("."))."> b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : "").">")
    10261 +"  call Decho("win#".winnr())
    10262  
    10263    let ykeep= @@
    10264 -  " check if the status bar was clicked on instead of a file/directory name
    10265 -  while getchar(0) != 0
    10266 -   "clear the input stream
    10267 -  endwhile
    10268 -  call feedkeys("\<LeftMouse>")
    10269 -  let c          = getchar()
    10270 -  let mouse_lnum = v:mouse_lnum
    10271 -  let wlastline  = line('w$')
    10272 -  let lastline   = line('$')
    10273 -"  call Decho("v:mouse_lnum=".mouse_lnum." line(w$)=".wlastline." line($)=".lastline." v:mouse_win=".v:mouse_win." winnr#".winnr())
    10274 -"  call Decho("v:mouse_col =".v:mouse_col."     col=".col(".")."  wincol =".wincol()." winwidth   =".winwidth(0))
    10275 -  if mouse_lnum >= wlastline + 1 || v:mouse_win != winnr()
    10276 -   " appears to be a status bar leftmouse click
    10277 -   let @@= ykeep
    10278 -"   call Dret("s:NetrwLeftmouse : detected a status bar leftmouse click")
    10279 -   return
    10280 -  endif
    10281 -  if v:mouse_col != col('.')
    10282 +  if !exists("b:netrw_curdir")
    10283 +   " Don't try to change-directory: this can happen, for example, when netrw#ErrorMsg has been called
    10284 +   " and the current window is the NetrwMessage window.
    10285     let @@= ykeep
    10286 -"   call Dret("s:NetrwLeftmouse : detected a vertical separator bar leftmouse click")
    102876387+"   call Decho("b:netrw_curdir doesn't exist!")
    102886388+"   call Decho("getcwd<".getcwd().">")
    102896389+"   call Dredir("ls!")
    10290 +"   call Dret("s:NetrwBrowseChgDir")
     6390 "   call Dret("s:NetrwBrowseChgDir")
    102916391    return
    102926392   endif
    102936393 
    10294 -  if a:islocal
    10295 -   if exists("b:netrw_curdir")
    10296 -    keepj call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(1,s:NetrwGetWord()))
    10297 -   endif
    10298 +  " NetrwBrowseChgDir: save options and initialize {{{3
     6394   " NetrwBrowseChgDir: save options and initialize {{{3
    102996395+"  call Decho("saving options")
    10300 +  keepj call s:NetrwOptionSave("s:")
    10301 +  keepj call s:NetrwSafeOptions()
     6396   keepj call s:NetrwOptionSave("s:")
     6397   keepj call s:NetrwSafeOptions()
     6398-  let nbcd_curpos                = netrw#NetrwSavePosn()
    103026399+  let nbcd_curpos                = netrw#SavePosn()
    10303 +  let s:nbcd_curpos_{bufnr('%')} = nbcd_curpos
     6400   let s:nbcd_curpos_{bufnr('%')} = nbcd_curpos
     6401-"  call Decho("(NetrwBrowseChgDir) setting s:nbcd_curpos_".bufnr('%')." to SavePosn")
    103046402+"  call Decho("setting s:nbcd_curpos_".bufnr('%')." to SavePosn")
    10305 +  if (has("win32") || has("win95") || has("win64") || has("win16"))
     6403   if (has("win32") || has("win95") || has("win64") || has("win16"))
     6404-   let dirname                   = substitute(b:netrw_curdir,'\\','/','ge')
    103066405+   let dirname = substitute(b:netrw_curdir,'\\','/','ge')
    103076406   else
    10308 -   if exists("b:netrw_curdir")
    10309 -    keepj call s:NetrwBrowse(0,s:NetrwBrowseChgDir(0,s:NetrwGetWord()))
    10310 -   endif
     6407-   let dirname= b:netrw_curdir
    103116408+   let dirname = b:netrw_curdir
    103126409   endif
    10313 -  let @@= ykeep
    10314 -"  call Dret("s:NetrwLeftmouse")
    10315 -endfun
    10316 +  let newdir    = a:newdir
    10317 +  let dolockout = 0
     6410   let newdir    = a:newdir
     6411   let dolockout = 0
     6412+  let dorestore = 1
    103186413+"  call Decho("dirname<".dirname.">")
    10319  
    10320 -" ---------------------------------------------------------------------
    10321 -" s:NetrwRightdrag: {{{2
    10322 -"DechoTabOn
    10323 -fun! s:NetrwRightdrag(islocal)
    10324 -"  call Dfunc("s:NetrwRightdrag(islocal=".a:islocal.")")
    10325 -  if !exists("s:netrwdrag")
    10326 -   let s:netrwdrag     = winnr()
    10327 -   call s:NetrwMarkFile(a:islocal,s:NetrwGetWord())
    10328 -   if a:islocal
    10329 -    nno <silent> <s-rightrelease> <leftmouse>:<c-u>call <SID>NetrwRightrelease(1)<cr>
    10330 -   else
    10331 -    nno <silent> <s-rightrelease> <leftmouse>:<c-u>call <SID>NetrwRightrelease(0)<cr>
     6414+
    103326415+  " ignore <cr>s when done in the banner
    103336416+  if g:netrw_banner
     
    103386421+     let g:netrw_quickhelp= (g:netrw_quickhelp + 1)%len(s:QuickHelp)
    103396422+"     call Decho("#2: quickhelp=".g:netrw_quickhelp." ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
    10340 +     setl noro ma nowrap
     6423+     setl ma noro nowrap
    103416424+     keepj call setline(line('.'),'"   Quick Help: <F1>:help  '.s:QuickHelp[g:netrw_quickhelp])
    103426425+     setl noma nomod nowrap
     
    103456428+"     call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
    103466429+    endif
    10347     endif
     6430+   endif
    103486431+"  else " Decho
    103496432+"   call Decho("(s:NetrwBrowseChgdir) g:netrw_banner=".g:netrw_banner." (no banner)")
     6433+  endif
     6434 
     6435   " set up o/s-dependent directory recognition pattern
     6436+"  call Decho("set up o/s-dependent directory recognition pattern")
     6437   if has("amiga")
     6438    let dirpat= '[\/:]$'
     6439   else
     6440    let dirpat= '[\/]$'
    103506441   endif
    10351 -"  call Dret("s:NetrwRightdrag : s:netrwdrag=".s:netrwdrag." buf#".bufnr("%"))
    10352 -endfun
    10353  
    10354 -" ---------------------------------------------------------------------
    10355 -" s:NetrwRightrelease: {{{2
    10356 -fun! s:NetrwRightrelease(islocal)
    10357 -"  call Dfunc("s:NetrwRightrelease(islocal=".a:islocal.") s:netrwdrag=".s:netrwdrag." buf#".bufnr("%"))
    10358 -  if exists("s:netrwdrag")
    10359 -   nunmap <s-rightrelease>
    10360 -   let tgt = s:NetrwGetWord()
    10361 -"   call Decho("target#1: ".tgt)
    10362 -   if tgt =~ '/$' && tgt !~ '^\./$'
    10363 -    let tgt = b:netrw_curdir."/".tgt
    10364 -   else
    10365 -    let tgt= b:netrw_curdir
    10366 -   endif
    10367 -"   call Decho("target#2: ".tgt)
    10368 -   call netrw#NetrwMakeTgt(tgt)
    10369 -   let curwin= winnr()
    10370 -   exe s:netrwdrag."wincmd w"
    10371 -   call s:NetrwMarkFileMove(a:islocal)
    10372 -   exe curwin."wincmd w"
    10373 -   unlet s:netrwdrag
    10374 +  " set up o/s-dependent directory recognition pattern
    10375 +"  call Decho("set up o/s-dependent directory recognition pattern")
    10376 +  if has("amiga")
    10377 +   let dirpat= '[\/:]$'
    10378 +  else
    10379 +   let dirpat= '[\/]$'
    10380    endif
    10381 -"  call Dret("s:NetrwRightrelease")
    10382 -endfun
    10383 -
    10384 -" ---------------------------------------------------------------------
    10385 -" s:NetrwListHide: uses [range]g~...~d to delete files that match comma {{{2
    10386 -" separated patterns given in g:netrw_list_hide
    10387 -fun! s:NetrwListHide()
    10388 -"  call Dfunc("NetrwListHide() g:netrw_hide=".g:netrw_hide." g:netrw_list_hide<".g:netrw_list_hide.">")
    10389 -  let ykeep= @@
     6442-"  call Decho("(NetrwBrowseChgDir) dirname<".dirname.">  dirpat<".dirpat.">")
    103906443+"  call Decho("dirname<".dirname.">  dirpat<".dirpat.">")
    103916444 
    10392 -  " find a character not in the "hide" string to use as a separator for :g and :v commands
    10393 -  " How-it-works: take the hiding command, convert it into a range.  Duplicate
    10394 -  " characters don't matter.  Remove all such characters from the '/~...90'
    10395 -  " string.  Use the first character left as a separator character.
    10396 -  let listhide= g:netrw_list_hide
    10397 -  let sep     = strpart(substitute('/~@#$%^&*{};:,<.>?|1234567890','['.escape(listhide,'-]^\').']','','ge'),1,1)
    10398 -"  call Decho("sep=".sep)
    10399 -
    10400 -  while listhide != ""
    10401 -   if listhide =~ ','
    10402 -    let hide     = substitute(listhide,',.*$','','e')
    10403 -    let listhide = substitute(listhide,'^.\{-},\(.*\)$','\1','e')
    10404 -   else
    10405 -    let hide     = listhide
    10406 -    let listhide = ""
    10407 -   endif
    10408 -
    10409 -   " Prune the list by hiding any files which match
    10410 -   if g:netrw_hide == 1
    10411 -"    call Decho("hiding<".hide."> listhide<".listhide.">")
    10412 -    exe 'sil! keepj '.w:netrw_bannercnt.',$g'.sep.hide.sep.'d'
    10413 -   elseif g:netrw_hide == 2
    10414 -"    call Decho("showing<".hide."> listhide<".listhide.">")
    10415 -    exe 'sil! keepj '.w:netrw_bannercnt.',$g'.sep.hide.sep.'s@^@ /-KEEP-/ @'
    10416 -   endif
    10417 -  endwhile
    10418 -  if g:netrw_hide == 2
    10419 -   exe 'sil! keepj '.w:netrw_bannercnt.',$v@^ /-KEEP-/ @d'
    10420 -   exe 'sil! keepj '.w:netrw_bannercnt.',$s@^\%( /-KEEP-/ \)\+@@e'
    10421 +  if dirname !~ dirpat
    10422 +   " apparently vim is "recognizing" that it is in a directory and
    10423 +   " is removing the trailing "/".  Bad idea, so let's put it back.
    10424 +   let dirname= dirname.'/'
     6445   if dirname !~ dirpat
     6446    " apparently vim is "recognizing" that it is in a directory and
     6447    " is removing the trailing "/".  Bad idea, so let's put it back.
     6448    let dirname= dirname.'/'
     6449-"   call Decho("(NetrwBrowseChgDir) adjusting dirname<".dirname.">")
    104256450+"   call Decho("adjusting dirname<".dirname.">")
    104266451   endif
    104276452 
    10428 -  " remove any blank lines that have somehow remained.
    10429 -  " This seems to happen under Windows.
    10430 -  exe 'sil! keepj 1,$g@^\s*$@d'
    10431 +  if newdir !~ dirpat
    10432 +   " ------------------------------
    10433 +   " NetrwBrowseChgDir: edit a file {{{3
    10434 +   " ------------------------------
     6453   if newdir !~ dirpat
     6454    " ------------------------------
     6455    " NetrwBrowseChgDir: edit a file {{{3
     6456    " ------------------------------
     6457-"   call Decho('(NetrwBrowseChgDir:edit-a-file) case "handling a file": newdir<'.newdir.'> !~ dirpat<'.dirpat.">")
    104356458+"   call Decho('edit-a-file: case "handling a file": newdir<'.newdir.'> !~ dirpat<'.dirpat.">")
    104366459 
    10437 -  let @@= ykeep
    10438 -"  call Dret("NetrwListHide")
    10439 -endfun
    10440 +   " save position for benefit of Rexplore
     6460    " save position for benefit of Rexplore
     6461-   let s:rexposn_{bufnr("%")}= netrw#NetrwSavePosn()
    104416462+   let s:rexposn_{bufnr("%")}= netrw#SavePosn()
    10442  
    10443 -" ---------------------------------------------------------------------
    10444 -" NetrwHideEdit: allows user to edit the file/directory hiding list
    10445 -fun! s:NetrwHideEdit(islocal)
    10446 -"  call Dfunc("NetrwHideEdit(islocal=".a:islocal.")")
     6463+
    104476464+"   call Decho("edit-a-file: setting s:rexposn_".bufnr("%")." to SavePosn")
    104486465+"   call Decho("edit-a-file: win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> ft=".&ft)
    104496466+"   call Decho("edit-a-file: w:netrw_liststyle=".(exists("w:netrw_liststyle")? w:netrw_liststyle : 'n/a')." w:netrw_treedict:".(exists("w:netrw_treedict")? "exists" : 'n/a')." newdir<".newdir.">")
    104506467 
    10451 -  let ykeep= @@
    10452 -  " save current cursor position
    10453 -  let svpos= netrw#NetrwSavePosn()
    10454 +   if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict") && newdir !~ '^\(/\|\a:\)'
     6468-"   call Decho("(NetrwBrowseChgDir:edit-a-file) setting s:rexposn_".bufnr("%")." to SavePosn")
     6469    if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict") && newdir !~ '^\(/\|\a:\)'
    104556470+"    call Decho("edit-a-file: handle tree listing: w:netrw_treedict<".(exists("w:netrw_treedict")? string(w:netrw_treedict) : 'n/a').">")
    104566471+"    call Decho("edit-a-file: newdir<".newdir.">")
    10457 +    let dirname= s:NetrwTreeDir()
    10458 +    if dirname =~ '/$'
    10459 +     let dirname= dirname.newdir
    10460 +    else
     6472     let dirname= s:NetrwTreeDir()
     6473     if dirname =~ '/$'
     6474      let dirname= dirname.newdir
     6475     else
     6476-     let dirname= s:NetrwTreeDir()."/".newdir
    104616477+     let dirname= dirname."/".newdir
    10462 +    endif
     6478     endif
     6479-"    call Decho("(NetrwBrowseChgDir:edit-a-file) dirname<".dirname.">")
     6480-"    call Decho("(NetrwBrowseChgDir:edit-a-file) tree listing")
    104636481+"    call Decho("edit-a-file: dirname<".dirname.">")
    104646482+"    call Decho("edit-a-file: tree listing")
    10465 +   elseif newdir =~ '^\(/\|\a:\)'
    10466 +    let dirname= newdir
    10467 +   else
    10468 +    let dirname= s:ComposePath(dirname,newdir)
    10469 +   endif
     6483    elseif newdir =~ '^\(/\|\a:\)'
     6484     let dirname= newdir
     6485    else
     6486     let dirname= s:ComposePath(dirname,newdir)
     6487    endif
     6488-"   call Decho("(NetrwBrowseChgDir:edit-a-file) handling a file: dirname<".dirname."> (a:0=".a:0.")")
    104706489+"   call Decho("edit-a-file: handling a file: dirname<".dirname."> (a:0=".a:0.")")
    10471 +   " this lets NetrwBrowseX avoid the edit
    10472 +   if a:0 < 1
     6490    " this lets NetrwBrowseX avoid the edit
     6491    if a:0 < 1
     6492-"    call Decho("(NetrwBrowseChgDir:edit-a-file) set up windows for editing<".fnameescape(dirname).">  didsplit=".(exists("s:didsplit")? s:didsplit : "doesn't exist"))
    104736493+"    call Decho("edit-a-file: set up windows for editing<".fnameescape(dirname).">  didsplit=".(exists("s:didsplit")? s:didsplit : "doesn't exist"))
    10474 +    keepj call s:NetrwOptionRestore("s:")
    10475 +    if !exists("s:didsplit")
     6494     keepj call s:NetrwOptionRestore("s:")
     6495     if !exists("s:didsplit")
     6496-"     call Decho("(NetrwBrowseChgDir:edit-a-file) s:didsplit does not exist; g:netrw_browse_split=".g:netrw_browse_split." win#".winnr())
    104766497+"     call Decho("edit-a-file: s:didsplit does not exist; g:netrw_browse_split=".g:netrw_browse_split." win#".winnr())
    10477 +     if     g:netrw_browse_split == 1
    10478 +      " horizontally splitting the window first
    10479 +      keepalt new
    10480 +      if !&ea
    10481 +       keepalt wincmd _
    10482 +      endif
    10483 +     elseif g:netrw_browse_split == 2
    10484 +      " vertically splitting the window first
    10485 +      keepalt rightb vert new
    10486 +      if !&ea
    10487 +       keepalt wincmd |
    10488 +      endif
    10489 +     elseif g:netrw_browse_split == 3
    10490 +      " open file in new tab
    10491 +      keepalt tabnew
    10492 +     elseif g:netrw_browse_split == 4
    10493 +      " act like "P" (ie. open previous window)
    10494 +      if s:NetrwPrevWinOpen(2) == 3
    10495 +       let @@= ykeep
    10496 +"       call Dret("s:NetrwBrowseChgDir")
    10497 +       return
    10498 +      endif
    10499 +     else
    10500 +      " handling a file, didn't split, so remove menu
     6498      if     g:netrw_browse_split == 1
     6499       " horizontally splitting the window first
     6500       keepalt new
     6501@@ -4380,10 +4352,18 @@
     6502       endif
     6503      else
     6504       " handling a file, didn't split, so remove menu
     6505-"      call Decho("(NetrwBrowseChgDir:edit-a-file) handling a file+didn't split, so remove menu")
    105016506+"      call Decho("edit-a-file: handling a file+didn't split, so remove menu")
    10502 +      call s:NetrwMenu(0)
    10503 +      " optional change to window
    10504 +      if g:netrw_chgwin >= 1
    10505 +       exe "keepj keepalt ".g:netrw_chgwin."wincmd w"
    10506 +      endif
    10507 +     endif
    10508 +    endif
    10509  
    10510 -  " get new hiding list from user
    10511 -  call inputsave()
    10512 -  let newhide= input("Edit Hiding List: ",g:netrw_list_hide)
    10513 -  call inputrestore()
    10514 -  let g:netrw_list_hide= newhide
    10515 -"  call Decho("new g:netrw_list_hide<".g:netrw_list_hide.">")
    10516 +    " the point where netrw actually edits the (local) file
    10517 +    " if its local only: LocalBrowseCheck() doesn't edit a file, but NetrwBrowse() will
     6507       call s:NetrwMenu(0)
     6508       " optional change to window
     6509       if g:netrw_chgwin >= 1
     6510+       if winnr("$")+1 == g:netrw_chgwin
     6511+       " if g:netrw_chgwin is set to one more than the last window, then
     6512+       " vertically split the last window to make that window available.
     6513+       let curwin= winnr()
     6514+       exe "keepj keepalt ".g:netrw_chgwin."wincmd ".winnr("$")
     6515+       vs
     6516+       exe "keepj keepalt ".g:netrw_chgwin."wincmd ".curwin
     6517+       endif
     6518        exe "keepj keepalt ".g:netrw_chgwin."wincmd w"
     6519       endif
     6520      endif
     6521@@ -4391,26 +4371,40 @@
     6522 
     6523     " the point where netrw actually edits the (local) file
     6524     " if its local only: LocalBrowseCheck() doesn't edit a file, but NetrwBrowse() will
    105186525+    " no keepalt to support  :e #  to return to a directory listing
    10519 +    if a:islocal
     6526     if a:islocal
     6527-"     call Decho("(NetrwBrowseChgDir:edit-a-file) edit local file: exe e! ".fnameescape(dirname))
     6528-     exe "keepj keepalt e! ".fnameescape(dirname)
    105206529+"     call Decho("edit-a-file: edit local file: exe e! ".fnameescape(dirname))
    105216530+     " some like c-^ to return to the last edited file
     
    105266535+      exe "keepj e! ".fnameescape(dirname)
    105276536+     endif
    10528 +     call s:NetrwCursor()
    10529 +    else
     6537+"     call Decho("after e! ".dirname.": hidden=".&hidden." bufhidden<".&bufhidden."> mod=".&mod)
     6538      call s:NetrwCursor()
     6539+"     call Decho("COMBAK#1: after e! ".dirname.": hidden=".&hidden." bufhidden<".&bufhidden."> mod=".&mod)
     6540+     if &hidden || &bufhidden == "hide"
     6541+      " file came from vim's hidden storage.  Don't "restore" options with it.
     6542+      let dorestore= 0
     6543+     endif
     6544     else
     6545-"     call Decho("(NetrwBrowseChgDir:edit-a-file) remote file: NetrwBrowse will edit it")
    105306546+"     call Decho("edit-a-file: remote file: NetrwBrowse will edit it")
    10531 +    endif
    10532 +    let dolockout= 1
    10533  
    10534 -  " refresh the listing
    10535 -  sil keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,"./"))
    10536 +    " handle g:Netrw_funcref -- call external-to-netrw functions
    10537 +    "   This code will handle g:Netrw_funcref as an individual function reference
    10538 +    "   or as a list of function references.  It will ignore anything that's not
    10539 +    "   a function reference.  See  :help Funcref  for information about function references.
    10540 +    if exists("g:Netrw_funcref")
     6547     endif
     6548     let dolockout= 1
     6549+"     call Decho("COMBAK#2: after e! ".dirname.": hidden=".&hidden." bufhidden<".&bufhidden."> mod=".&mod)
     6550 
     6551     " handle g:Netrw_funcref -- call external-to-netrw functions
     6552     "   This code will handle g:Netrw_funcref as an individual function reference
     6553     "   or as a list of function references.  It will ignore anything that's not
     6554     "   a function reference.  See  :help Funcref  for information about function references.
     6555     if exists("g:Netrw_funcref")
     6556-"     call Decho("(NetrwBrowseChgDir:edit-a-file) handle optional Funcrefs")
    105416557+"     call Decho("edit-a-file: handle optional Funcrefs")
    10542 +     if type(g:Netrw_funcref) == 2
     6558      if type(g:Netrw_funcref) == 2
     6559-"      call Decho("(NetrwBrowseChgDir:edit-a-file) handling a g:Netrw_funcref")
    105436560+"      call Decho("edit-a-file: handling a g:Netrw_funcref")
    10544 +      keepj call g:Netrw_funcref()
    10545 +     elseif type(g:Netrw_funcref) == 3
     6561       keepj call g:Netrw_funcref()
     6562      elseif type(g:Netrw_funcref) == 3
     6563-"      call Decho("(NetrwBrowseChgDir:edit-a-file) handling a list of g:Netrw_funcrefs")
    105466564+"      call Decho("edit-a-file: handling a list of g:Netrw_funcrefs")
    10547 +      for Fncref in g:Netrw_funcref
    10548 +       if type(FncRef) == 2
    10549 +        keepj call FncRef()
    10550 +       endif
    10551 +      endfor
    10552 +     endif
    10553 +    endif
    10554 +   endif
    10555  
    10556 -  " restore cursor position
    10557 -  call netrw#NetrwRestorePosn(svpos)
    10558 -  let @@= ykeep
    10559 +  elseif newdir =~ '^/'
    10560 +   " ----------------------------------------------------
    10561 +   " NetrwBrowseChgDir: just go to the new directory spec {{{3
    10562 +   " ----------------------------------------------------
     6565       for Fncref in g:Netrw_funcref
     6566        if type(FncRef) == 2
     6567         keepj call FncRef()
     6568@@ -4424,7 +4418,7 @@
     6569    " ----------------------------------------------------
     6570    " NetrwBrowseChgDir: just go to the new directory spec {{{3
     6571    " ----------------------------------------------------
     6572-"   call Decho('(NetrwBrowseChgDir:goto-newdir) case "just go to new directory spec": newdir<'.newdir.'>')
    105636573+"   call Decho('goto-newdir: case "just go to new directory spec": newdir<'.newdir.'>')
    10564 +   let dirname    = newdir
    10565 +   keepj call s:SetRexDir(a:islocal,dirname)
    10566 +   keepj call s:NetrwOptionRestore("s:")
    10567  
    10568 -"  call Dret("NetrwHideEdit")
    10569 -endfun
    10570 +  elseif newdir == './'
    10571 +   " ---------------------------------------------
    10572 +   " NetrwBrowseChgDir: refresh the directory list {{{3
    10573 +   " ---------------------------------------------
     6574    let dirname    = newdir
     6575    keepj call s:SetRexDir(a:islocal,dirname)
     6576    keepj call s:NetrwOptionRestore("s:")
     6577@@ -4433,37 +4427,52 @@
     6578    " ---------------------------------------------
     6579    " NetrwBrowseChgDir: refresh the directory list {{{3
     6580    " ---------------------------------------------
     6581-"   call Decho('(NetrwBrowseChgDir:refresh-dirlist) case "refresh directory listing": newdir == "./"')
    105746582+"   call Decho('refresh-dirlist: case "refresh directory listing": newdir == "./"')
    10575 +   keepj call s:SetRexDir(a:islocal,dirname)
    10576  
    10577 -" ---------------------------------------------------------------------
    10578 -" NetSortSequence: allows user to edit the sorting sequence
    10579 -fun! s:NetSortSequence(islocal)
    10580 -"  call Dfunc("NetSortSequence(islocal=".a:islocal.")")
    10581 +  elseif newdir == '../'
    10582 +   " --------------------------------------
    10583 +   " NetrwBrowseChgDir: go up one directory {{{3
    10584 +   " --------------------------------------
     6583    keepj call s:SetRexDir(a:islocal,dirname)
     6584 
     6585   elseif newdir == '../'
     6586    " --------------------------------------
     6587    " NetrwBrowseChgDir: go up one directory {{{3
     6588    " --------------------------------------
     6589-"   call Decho('(NetrwBrowseChgDir:go-up) case "go up one directory": newdir == "../"')
    105856590+"   call Decho('go-up: case "go up one directory": newdir == "../"')
    105866591 
    10587 -  let ykeep= @@
    10588 -  let svpos= netrw#NetrwSavePosn()
    10589 -  call inputsave()
    10590 -  let newsortseq= input("Edit Sorting Sequence: ",g:netrw_sort_sequence)
    10591 -  call inputrestore()
    10592 +   if w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict")
    10593 +    " force a refresh
     6592    if w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict")
     6593     " force a refresh
     6594-"    call Decho("(NetrwBrowseChgDir:go-up) clear buffer<".expand("%")."> with :%d")
     6595-"    call Decho("(NetrwBrowseChgDir:go-up) setl noro ma")
    105946596+"    call Decho("go-up: clear buffer<".expand("%")."> with :%d")
    105956597+"    call Decho("go-up: setl noro ma")
    10596 +    setl noro ma
    10597 +    keepj %d
    10598 +   endif
    10599  
    10600 -  " refresh the listing
    10601 -  let g:netrw_sort_sequence= newsortseq
    10602 -  keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
    10603 -  keepj call netrw#NetrwRestorePosn(svpos)
    10604 -  let @@= ykeep
    10605 +   if has("amiga")
    10606 +    " amiga
     6598     setl noro ma
     6599     keepj %d
     6600    endif
     6601 
     6602    if has("amiga")
     6603     " amiga
     6604-"    call Decho('(NetrwBrowseChgDir:go-up) case "go up one directory": newdir == "../" and amiga')
    106076605+"    call Decho('go-up: case "go up one directory": newdir == "../" and amiga')
    10608 +    if a:islocal
    10609 +     let dirname= substitute(dirname,'^\(.*[/:]\)\([^/]\+$\)','\1','')
    10610 +     let dirname= substitute(dirname,'/$','','')
    10611 +    else
    10612 +     let dirname= substitute(dirname,'^\(.*[/:]\)\([^/]\+/$\)','\1','')
    10613 +    endif
     6606     if a:islocal
     6607      let dirname= substitute(dirname,'^\(.*[/:]\)\([^/]\+$\)','\1','')
     6608      let dirname= substitute(dirname,'/$','','')
     6609     else
     6610      let dirname= substitute(dirname,'^\(.*[/:]\)\([^/]\+/$\)','\1','')
     6611     endif
     6612-"    call Decho("(NetrwBrowseChgDir:go-up) amiga: dirname<".dirname."> (go up one dir)")
    106146613+"    call Decho("go-up: amiga: dirname<".dirname."> (go up one dir)")
    10615  
    10616 -"  call Dret("NetSortSequence")
    10617 -endfun
     6614+
    106186615+   elseif !g:netrw_cygwin && (has("win32") || has("win95") || has("win64") || has("win16"))
    106196616+    " windows
     
    106316628+"    call Decho("go-up: windows: dirname<".dirname."> (go up one dir)")
    106326629 
    10633 -" ---------------------------------------------------------------------
    10634 -" s:NetrwMakeDir: this function makes a directory (both local and remote) {{{2
    10635 -fun! s:NetrwMakeDir(usrhost)
    10636 -"  call Dfunc("NetrwMakeDir(usrhost<".a:usrhost.">)")
    10637 +   else
    10638 +    " unix or cygwin
     6630    else
     6631     " unix or cygwin
     6632-"    call Decho('(NetrwBrowseChgDir:go-up) case "go up one directory": newdir == "../" and unix or cygwin')
    106396633+"    call Decho('go-up: case "go up one directory": newdir == "../" and unix or cygwin')
    10640 +    if a:islocal
    10641 +     let dirname= substitute(dirname,'^\(.*\)/\([^/]\+\)/$','\1','')
    10642 +     if dirname == ""
    10643 +      let dirname= '/'
    10644 +     endif
    10645 +    else
    10646 +     let dirname= substitute(dirname,'^\(\a\+://.\{-}/\{1,2}\)\(.\{-}\)\([^/]\+\)/$','\1\2','')
    10647 +    endif
     6634     if a:islocal
     6635      let dirname= substitute(dirname,'^\(.*\)/\([^/]\+\)/$','\1','')
     6636      if dirname == ""
     6637@@ -4472,7 +4481,7 @@
     6638     else
     6639      let dirname= substitute(dirname,'^\(\a\+://.\{-}/\{1,2}\)\(.\{-}\)\([^/]\+\)/$','\1\2','')
     6640     endif
     6641-"    call Decho("(NetrwBrowseChgDir:go-up) unix: dirname<".dirname."> (go up one dir)")
    106486642+"    call Decho("go-up: unix: dirname<".dirname."> (go up one dir)")
    10649 +   endif
    10650 +   keepj call s:SetRexDir(a:islocal,dirname)
    10651  
    10652 -  let ykeep= @@
    10653 -  " get name of new directory from user.  A bare <CR> will skip.
    10654 -  " if its currently a directory, also request will be skipped, but with
    10655 -  " a message.
    10656 -  call inputsave()
    10657 -  let newdirname= input("Please give directory name: ")
    10658 -  call inputrestore()
    10659 -"  call Decho("newdirname<".newdirname.">")
    10660 +  elseif exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict")
    10661 +   " --------------------------------------
    10662 +   " NetrwBrowseChgDir: Handle Tree Listing {{{3
    10663 +   " --------------------------------------
     6643    endif
     6644    keepj call s:SetRexDir(a:islocal,dirname)
     6645 
     6646@@ -4480,35 +4489,35 @@
     6647    " --------------------------------------
     6648    " NetrwBrowseChgDir: Handle Tree Listing {{{3
     6649    " --------------------------------------
     6650-"   call Decho('(NetrwBrowseChgDir:tree-list) case liststyle is TREELIST and w:netrw_treedict exists')
    106646651+"   call Decho('tree-list: case liststyle is TREELIST and w:netrw_treedict exists')
    10665 +   " force a refresh (for TREELIST, wait for NetrwTreeDir() to force the refresh)
     6652    " force a refresh (for TREELIST, wait for NetrwTreeDir() to force the refresh)
     6653-"   call Decho("(NetrwBrowseChgDir) (treelist) setl noro ma")
    106666654+"   call Decho("tree-list: setl noro ma")
    10667 +   setl noro ma
    10668 +   if !(exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir"))
     6655    setl noro ma
     6656    if !(exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir"))
     6657-"    call Decho("(NetrwBrowseChgDir) clear buffer<".expand("%")."> with :%d")
    106696658+"    call Decho("tree-list: clear buffer<".expand("%")."> with :%d")
    10670 +    keepj %d
    10671 +   endif
    10672 +   let treedir      = s:NetrwTreeDir()
    10673 +   let s:treecurpos = nbcd_curpos
    10674 +   let haskey= 0
     6659     keepj %d
     6660    endif
     6661    let treedir      = s:NetrwTreeDir()
     6662    let s:treecurpos = nbcd_curpos
     6663    let haskey= 0
     6664-"   call Decho("(NetrwBrowseChgDir:tree-list) w:netrw_treedict<".string(w:netrw_treedict).">")
    106756665+"   call Decho("tree-list: w:netrw_treedict<".string(w:netrw_treedict).">")
    106766666 
    10677 -  if newdirname == ""
    10678 -   let @@= ykeep
    10679 -"   call Dret("NetrwMakeDir : user aborted with bare <cr>")
    10680 -   return
    10681 +   " search treedict for tree dir as-is
    10682 +   if has_key(w:netrw_treedict,treedir)
     6667    " search treedict for tree dir as-is
     6668    if has_key(w:netrw_treedict,treedir)
     6669-"    call Decho('(NetrwBrowseChgDir:tree-list) ....searched for treedir<'.treedir.'> : found it!')
    106836670+"    call Decho('tree-list: ....searched for treedir<'.treedir.'> : found it!')
    10684 +    let haskey= 1
    10685 +   else
     6671     let haskey= 1
     6672    else
     6673-"    call Decho('(NetrwBrowseChgDir:tree-list) ....searched for treedir<'.treedir.'> : not found')
    106866674+"    call Decho('tree-list: ....searched for treedir<'.treedir.'> : not found')
    10687 +   endif
    10688 +
    10689 +   " search treedict for treedir with a / appended
    10690 +   if !haskey && treedir !~ '/$'
    10691 +    if has_key(w:netrw_treedict,treedir."/")
    10692 +     let treedir= treedir."/"
     6675    endif
     6676 
     6677    " search treedict for treedir with a / appended
     6678    if !haskey && treedir !~ '/$'
     6679     if has_key(w:netrw_treedict,treedir."/")
     6680      let treedir= treedir."/"
     6681-"     call Decho('(NetrwBrowseChgDir:tree-list) ....searched.for treedir<'.treedir.'> found it!')
    106936682+"     call Decho('tree-list: ....searched.for treedir<'.treedir.'> found it!')
    10694 +     let haskey = 1
    10695 +    else
     6683      let haskey = 1
     6684     else
     6685-"     call Decho('(NetrwBrowseChgDir:tree-list) ....searched for treedir<'.treedir.'/> : not found')
    106966686+"     call Decho('tree-list: ....searched for treedir<'.treedir.'/> : not found')
    10697 +    endif
    10698 +   endif
    10699 +
    10700 +   " search treedict for treedir with any trailing / elided
    10701 +   if !haskey && treedir =~ '/$'
    10702 +    let treedir= substitute(treedir,'/$','','')
    10703 +    if has_key(w:netrw_treedict,treedir)
     6687     endif
     6688    endif
     6689 
     6690@@ -4516,24 +4525,24 @@
     6691    if !haskey && treedir =~ '/$'
     6692     let treedir= substitute(treedir,'/$','','')
     6693     if has_key(w:netrw_treedict,treedir)
     6694-"     call Decho('(NetrwBrowseChgDir:tree-list) ....searched.for treedir<'.treedir.'> found it!')
    107046695+"     call Decho('tree-list: ....searched.for treedir<'.treedir.'> found it!')
    10705 +     let haskey = 1
    10706 +    else
     6696      let haskey = 1
     6697     else
     6698-"     call Decho('(NetrwBrowseChgDir:tree-list) ....searched for treedir<'.treedir.'> : not found')
    107076699+"     call Decho('tree-list: ....searched for treedir<'.treedir.'> : not found')
    10708 +    endif
    10709 +   endif
    10710 +
    10711 +   if haskey
    10712 +    " close tree listing for selected subdirectory
     6700     endif
     6701    endif
     6702 
     6703    if haskey
     6704     " close tree listing for selected subdirectory
     6705-"    call Decho("(NetrwBrowseChgDir:tree-list) closing selected subdirectory<".dirname.">")
    107136706+"    call Decho("tree-list: closing selected subdirectory<".dirname.">")
    10714 +    call remove(w:netrw_treedict,treedir)
     6707     call remove(w:netrw_treedict,treedir)
     6708-"    call Decho("(NetrwBrowseChgDir) removed     entry<".treedir."> from treedict")
     6709-"    call Decho("(NetrwBrowseChgDir) yielding treedict<".string(w:netrw_treedict).">")
    107156710+"    call Decho("tree-list: removed     entry<".treedir."> from treedict")
    107166711+"    call Decho("tree-list: yielding treedict<".string(w:netrw_treedict).">")
    10717 +    let dirname= w:netrw_treetop
    10718 +   else
    10719 +    " go down one directory
    10720 +    let dirname= substitute(treedir,'/*$','/','')
     6712     let dirname= w:netrw_treetop
     6713    else
     6714     " go down one directory
     6715     let dirname= substitute(treedir,'/*$','/','')
     6716-"    call Decho("(NetrwBrowseChgDir:tree-list) go down one dir: treedir<".treedir.">")
    107216717+"    call Decho("tree-list: go down one dir: treedir<".treedir.">")
    10722 +   endif
    10723 +   keepj call s:SetRexDir(a:islocal,dirname)
    10724 +   let s:treeforceredraw = 1
    10725 +
    10726 +  else
    10727 +   " ----------------------------------------
    10728 +   " NetrwBrowseChgDir: Go down one directory {{{3
    10729 +   " ----------------------------------------
    10730 +   let dirname    = s:ComposePath(dirname,newdir)
     6718    endif
     6719    keepj call s:SetRexDir(a:islocal,dirname)
     6720    let s:treeforceredraw = 1
     6721@@ -4543,28 +4552,38 @@
     6722    " NetrwBrowseChgDir: Go down one directory {{{3
     6723    " ----------------------------------------
     6724    let dirname    = s:ComposePath(dirname,newdir)
     6725-"   call Decho("(NetrwBrowseChgDir:go-down) go down one dir: dirname<".dirname."> newdir<".newdir.">")
    107316726+"   call Decho("go down one dir: dirname<".dirname."> newdir<".newdir.">")
    10732 +   keepj call s:SetRexDir(a:islocal,dirname)
     6727    keepj call s:SetRexDir(a:islocal,dirname)
    107336728   endif
    107346729 
    10735 -  if a:usrhost == ""
    10736 -"   call Decho("local mkdir")
    10737 + " --------------------------------------
    10738 + " NetrwBrowseChgDir: Restore and Cleanup {{{3
    10739 + " --------------------------------------
    10740 +  keepj call s:NetrwOptionRestore("s:")
    10741 +  if dolockout
     6730  " --------------------------------------
     6731  " NetrwBrowseChgDir: Restore and Cleanup {{{3
     6732  " --------------------------------------
     6733-  keepj call s:NetrwOptionRestore("s:")
     6734-  if dolockout
     6735-"   call Decho("(NetrwBrowseChgDir:restore) filewritable(dirname<".dirname.">)=".filewritable(dirname))
     6736+"  call Decho("COMBAK#3: after e! ".dirname.": hidden=".&hidden." bufhidden<".&bufhidden."> mod=".&mod)
     6737+  if dorestore
     6738+   " dorestore is zero'd when a local file was hidden or bufhidden;
     6739+   " in such a case, we want to keep whatever settings it may have.
     6740+"   call Decho("doing option restore (dorestore=".dorestore.")")
     6741+   keepj call s:NetrwOptionRestore("s:")
     6742+"  else " Decho
     6743+"   call Decho("skipping option restore (dorestore==0): hidden=".&hidden." bufhidden=".&bufhidden." mod=".&mod)
     6744+  endif
     6745+"  call Decho("COMBAK#4: after e! ".dirname.": hidden=".&hidden." bufhidden<".&bufhidden."> mod=".&mod)
     6746+  if dolockout && dorestore
    107426747+"   call Decho("restore: filewritable(dirname<".dirname.">)=".filewritable(dirname))
    10743 +   if filewritable(dirname)
     6748    if filewritable(dirname)
     6749-"    call Decho("(NetrwBrowseChgDir:restore) doing modification lockout settings: ma nomod noro")
     6750-"    call Decho("(NetrwBrowseChgDir:restore) setl ma nomod noro")
     6751-    setl ma nomod noro
     6752-"    call Decho("(NetrwBrowseChgDir:restore) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
     6753-   else
     6754-"    call Decho("(NetrwBrowseChgDir:restore) doing modification lockout settings: ma nomod ro")
     6755-"    call Decho("(NetrwBrowseChgDir:restore) setl ma nomod noro")
     6756-    setl ma nomod ro
     6757-"    call Decho("(NetrwBrowseChgDir:restore) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
    107446758+"    call Decho("restore: doing modification lockout settings: ma nomod noro")
    107456759+"    call Decho("restore: setl ma nomod noro")
    10746 +    setl ma nomod noro
     6760+    setl ma noro nomod
    107476761+"    call Decho("restore: ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
    107486762+   else
    107496763+"    call Decho("restore: doing modification lockout settings: ma nomod ro")
    107506764+"    call Decho("restore: setl ma nomod noro")
    10751 +    setl ma nomod ro
     6765+    setl ma ro nomod
    107526766+"    call Decho("restore: ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
    10753 +   endif
    10754 +  endif
    10755 +  let @@= ykeep
    10756  
    10757 -   " Local mkdir:
    10758 -   " sanity checks
    10759 -   let fullnewdir= b:netrw_curdir.'/'.newdirname
    10760 -"   call Decho("fullnewdir<".fullnewdir.">")
    10761 -   if isdirectory(fullnewdir)
    10762 -    if !exists("g:netrw_quiet")
    10763 -     keepj call netrw#ErrorMsg(s:WARNING,"<".newdirname."> is already a directory!",24)
    10764 +"  call Dret("s:NetrwBrowseChgDir <".dirname."> : curpos<".string(getpos(".")).">")
    10765 +  return dirname
    10766 +endfun
    10767 +
    10768 +" ---------------------------------------------------------------------
     6767    endif
     6768   endif
     6769+"  call Decho("COMBAK#5: after e! ".dirname.": hidden=".&hidden." bufhidden<".&bufhidden."> mod=".&mod)
     6770   let @@= ykeep
     6771 
     6772 "  call Dret("s:NetrwBrowseChgDir <".dirname."> : curpos<".string(getpos(".")).">")
     6773@@ -4572,6 +4591,55 @@
     6774 endfun
     6775 
     6776 " ---------------------------------------------------------------------
    107696777+" s:NetrwBrowseUpDir: implements the "-" mappings {{{2
    107706778+"    for thin, long, and wide: cursor placed just after banner
     
    107886796+    if !search('\c^'.curline,'cw')
    107896797+     sil! keepj 1
    10790      endif
    10791 -    let @@= ykeep
    10792 -"    call Dret("NetrwMakeDir : directory<".newdirname."> exists previously")
    10793 -    return
    10794     endif
    10795 -   if s:FileReadable(fullnewdir)
    10796 -    if !exists("g:netrw_quiet")
    10797 -     keepj call netrw#ErrorMsg(s:WARNING,"<".newdirname."> is already a file!",25)
     6798+    endif
     6799+   endif
    107986800+   exe "sil! keepj norm! z\<cr>"
    107996801+   while winline() < swwline
     
    108226824+
    108236825+" ---------------------------------------------------------------------
    10824 +" s:NetrwBrowseX:  (implements "x") executes a special "viewer" script or program for the {{{2
    10825 +"              given filename; typically this means given their extension.
    10826 +"              0=local, 1=remote
    10827 +fun! netrw#NetrwBrowseX(fname,remote)
    10828 +"  call Dfunc("NetrwBrowseX(fname<".a:fname."> remote=".a:remote.")")
    10829 +
    10830 +  let ykeep      = @@
     6826 " s:NetrwBrowseX:  (implements "x") executes a special "viewer" script or program for the {{{2
     6827 "              given filename; typically this means given their extension.
     6828 "              0=local, 1=remote
     6829@@ -4579,7 +4647,7 @@
     6830 "  call Dfunc("NetrwBrowseX(fname<".a:fname."> remote=".a:remote.")")
     6831 
     6832   let ykeep      = @@
     6833-  let screenposn = netrw#NetrwSavePosn()
    108316834+  let screenposn = netrw#SavePosn()
    10832 +
    10833 +  " special core dump handler
    10834 +  if a:fname =~ '/core\(\.\d\+\)\=$'
    10835 +   if exists("g:Netrw_corehandler")
    10836 +    if type(g:Netrw_corehandler) == 2
    10837 +     " g:Netrw_corehandler is a function reference (see :help Funcref)
    10838 +"     call Decho("g:Netrw_corehandler is a funcref")
    10839 +     call g:Netrw_corehandler(a:fname)
    10840 +    elseif type(g:Netrw_corehandler) == 3
    10841 +     " g:Netrw_corehandler is a List of function references (see :help Funcref)
    10842 +"     call Decho("g:Netrw_corehandler is a List")
    10843 +     for Fncref in g:Netrw_corehandler
    10844 +      if type(FncRef) == 2
    10845 +       call FncRef(a:fname)
    10846 +      endif
    10847 +     endfor
     6835 
     6836   " special core dump handler
     6837   if a:fname =~ '/core\(\.\d\+\)\=$'
     6838@@ -4597,7 +4665,7 @@
     6839       endif
     6840      endfor
    108486841     endif
     6842-    call netrw#NetrwRestorePosn(screenposn)
    108496843+    call netrw#RestorePosn(screenposn)
    108506844     let @@= ykeep
    10851 -"    call Dret("NetrwMakeDir : file<".newdirname."> exists previously")
    10852 +"    call Dret("NetrwBrowseX : coredump handler invoked")
     6845 "    call Dret("NetrwBrowseX : coredump handler invoked")
    108536846     return
     6847@@ -4629,7 +4697,7 @@
     6848 
     6849   if a:remote == 1
     6850    " create a local copy
     6851-"   call Decho("(remote) a:remote=".a:remote.": create a local copy of <".a:fname.">")
     6852+"   call Decho("remote: a:remote=".a:remote.": create a local copy of <".a:fname.">")
     6853    setl bh=delete
     6854    call netrw#NetRead(3,a:fname)
     6855    " attempt to rename tempfile
     6856@@ -4645,7 +4713,7 @@
     6857     let fname= s:netrw_tmpfile
    108546858    endif
    10855 +  endif
    10856  
    10857 -   " requested new local directory is neither a pre-existing file or
    10858 -   " directory, so make it!
    10859 -   if exists("*mkdir")
    10860 -    call mkdir(fullnewdir,"p")
    10861 -   else
    10862 -    let netrw_origdir= s:NetrwGetcwd(1)
    10863 -    exe 'keepj lcd '.fnameescape(b:netrw_curdir)
    10864 -"    call Decho("netrw_origdir<".netrw_origdir.">: lcd b:netrw_curdir<".fnameescape(b:netrw_curdir).">")
    10865 -"    call Decho("exe sil! !".g:netrw_localmkdir.' '.shellescape(newdirname,1))
    10866 -    exe "sil! !".g:netrw_localmkdir.' '.shellescape(newdirname,1)
    10867 -    if v:shell_error != 0
    10868 -     let @@= ykeep
    10869 -     call netrw#ErrorMsg(s:ERROR,"consider setting g:netrw_localmkdir<".g:netrw_localmkdir."> to something that works",80)
    10870 -"     call Dret("NetrwMakeDir : failed: sil! !".g:netrw_localmkdir.' '.shellescape(newdirname,1))
    10871 +  " set up the filename
    10872 +  " (lower case the extension, make a local copy of a remote file)
    10873 +  let exten= substitute(a:fname,'.*\.\(.\{-}\)','\1','e')
    10874 +  if has("win32") || has("win95") || has("win64") || has("win16")
    10875 +   let exten= substitute(exten,'^.*$','\L&\E','')
    10876 +  endif
    10877 +"  call Decho("exten<".exten.">")
    10878 +
    10879 +  " seems kde systems often have gnome-open due to dependencies, even though
    10880 +  " gnome-open's subsidiary display tools are largely absent.  Kde systems
    10881 +  " usually have "kdeinit" running, though...  (tnx Mikolaj Machowski)
    10882 +  if !exists("s:haskdeinit")
    10883 +   if has("unix") && executable("ps") && !has("win32unix")
    10884 +    let s:haskdeinit= system("ps -e") =~ 'kdeinit'
    10885 +    if v:shell_error
    10886 +     let s:haskdeinit = 0
    10887 +    endif
    10888 +   else
    10889 +    let s:haskdeinit= 0
    10890 +   endif
    10891 +"   call Decho("setting s:haskdeinit=".s:haskdeinit)
    10892 +  endif
    10893 +
    10894 +  if a:remote == 1
    10895 +   " create a local copy
    10896 +"   call Decho("remote: a:remote=".a:remote.": create a local copy of <".a:fname.">")
    10897 +   setl bh=delete
    10898 +   call netrw#NetRead(3,a:fname)
    10899 +   " attempt to rename tempfile
    10900 +   let basename= substitute(a:fname,'^\(.*\)/\(.*\)\.\([^.]*\)$','\2','')
    10901 +   let newname = substitute(s:netrw_tmpfile,'^\(.*\)/\(.*\)\.\([^.]*\)$','\1/'.basename.'.\3','')
    10902 +"   call Decho("basename<".basename.">")
    10903 +"   call Decho("newname <".newname.">")
    10904 +   if rename(s:netrw_tmpfile,newname) == 0
    10905 +    " renaming succeeded
    10906 +    let fname= newname
    10907 +   else
    10908 +    " renaming failed
    10909 +    let fname= s:netrw_tmpfile
    10910 +   endif
    10911 +  else
     6859   else
     6860-"   call Decho("(local) a:remote=".a:remote.": handling local copy of <".a:fname.">")
    109126861+"   call Decho("local: a:remote=".a:remote.": handling local copy of <".a:fname.">")
    10913 +   let fname= a:fname
    10914 +   " special ~ handler for local
    10915 +   if fname =~ '^\~' && expand("$HOME") != ""
    10916 +"    call Decho('invoking special ~ handler')
    10917 +    let fname= substitute(fname,'^\~',expand("$HOME"),'')
    10918 +   endif
    10919 +  endif
    10920 +"  call Decho("fname<".fname.">")
    10921 +"  call Decho("exten<".exten."> "."netrwFileHandlers#NFH_".exten."():exists=".exists("*netrwFileHandlers#NFH_".exten))
    10922 +
    10923 +  " set up redirection
    10924 +  if &srr =~ "%s"
    10925 +   if (has("win32") || has("win95") || has("win64") || has("win16"))
    10926 +    let redir= substitute(&srr,"%s","nul","")
    10927 +   else
    10928 +    let redir= substitute(&srr,"%s","/dev/null","")
    10929 +   endif
    10930 +  elseif (has("win32") || has("win95") || has("win64") || has("win16"))
    10931 +   let redir= &srr . "nul"
    10932 +  else
    10933 +   let redir= &srr . "/dev/null"
    10934 +  endif
    10935 +"  call Decho("set up redirection: redir{".redir."} srr{".&srr."}")
    10936 +
    10937 +  " extract any viewing options.  Assumes that they're set apart by quotes.
    10938 +"  call Decho("extract any viewing options")
    10939 +  if exists("g:netrw_browsex_viewer")
    10940 +"   call Decho("g:netrw_browsex_viewer<".g:netrw_browsex_viewer.">")
    10941 +   if g:netrw_browsex_viewer =~ '\s'
    10942 +    let viewer  = substitute(g:netrw_browsex_viewer,'\s.*$','','')
    10943 +    let viewopt = substitute(g:netrw_browsex_viewer,'^\S\+\s*','','')." "
    10944 +    let oviewer = ''
    10945 +    let cnt     = 1
    10946 +    while !executable(viewer) && viewer != oviewer
    10947 +     let viewer  = substitute(g:netrw_browsex_viewer,'^\(\(^\S\+\s\+\)\{'.cnt.'}\S\+\)\(.*\)$','\1','')
    10948 +     let viewopt = substitute(g:netrw_browsex_viewer,'^\(\(^\S\+\s\+\)\{'.cnt.'}\S\+\)\(.*\)$','\3','')." "
    10949 +     let cnt     = cnt + 1
    10950 +     let oviewer = viewer
    10951 +"     call Decho("!exe: viewer<".viewer.">  viewopt<".viewopt.">")
    10952 +    endwhile
    10953 +   else
    10954 +    let viewer  = g:netrw_browsex_viewer
    10955 +    let viewopt = ""
    10956 +   endif
    10957 +"   call Decho("viewer<".viewer.">  viewopt<".viewopt.">")
    10958 +  endif
    10959 +
    10960 +  " execute the file handler
    10961 +"  call Decho("execute the file handler (if any)")
    10962 +  if exists("g:netrw_browsex_viewer") && g:netrw_browsex_viewer == '-'
    10963 +"   call Decho("g:netrw_browsex_viewer<".g:netrw_browsex_viewer.">")
    10964 +   let ret= netrwFileHandlers#Invoke(exten,fname)
    10965 +
    10966 +  elseif exists("g:netrw_browsex_viewer") && executable(viewer)
    10967 +"   call Decho("g:netrw_browsex_viewer<".g:netrw_browsex_viewer.">")
    10968 +"   call Decho("exe sil !".viewer." ".viewopt.shellescape(fname,1).redir)
    10969 +   exe "sil !".viewer." ".viewopt.shellescape(fname,1).redir
    10970 +   let ret= v:shell_error
    10971 +
    10972 +  elseif has("win32") || has("win64")
    10973 +"   call Decho("windows")
    10974 +   if executable("start")
    10975 +"    call Decho('exe sil !start rundll32 url.dll,FileProtocolHandler '.shellescape(fname,1))
    10976 +    exe 'sil !start rundll32 url.dll,FileProtocolHandler '.shellescape(fname,1)
    10977 +   elseif executable("rundll32")
    10978 +"    call Decho('exe sil !rundll32 url.dll,FileProtocolHandler '.shellescape(fname,1))
    10979 +    exe 'sil !rundll32 url.dll,FileProtocolHandler '.shellescape(fname,1)
    10980 +   else
    10981 +    call netrw#ErrorMsg(s:WARNING,"rundll32 not on path",74)
    10982 +   endif
    10983 +   call inputsave()|call input("Press <cr> to continue")|call inputrestore()
    10984 +   let ret= v:shell_error
    10985 +
    10986 +  elseif has("win32unix")
    10987 +   let winfname= 'c:\cygwin'.substitute(fname,'/','\\','g')
    10988 +"   call Decho("cygwin: winfname<".shellescape(winfname,1).">")
    10989 +   if executable("start")
    10990 +"    call Decho('exe sil !start rundll32 url.dll,FileProtocolHandler '.shellescape(winfname,1))
    10991 +    exe 'sil !start rundll32 url.dll,FileProtocolHandler '.shellescape(winfname,1)
    10992 +   elseif executable("rundll32")
    10993 +"    call Decho('exe sil !rundll32 url.dll,FileProtocolHandler '.shellescape(winfname,1))
    10994 +    exe 'sil !rundll32 url.dll,FileProtocolHandler '.shellescape(winfname,1)
    10995 +   else
    10996 +    call netrw#ErrorMsg(s:WARNING,"rundll32 not on path",74)
    10997 +   endif
    10998 +   call inputsave()|call input("Press <cr> to continue")|call inputrestore()
    10999 +   let ret= v:shell_error
    11000 +
    11001 +  elseif has("unix") && executable("xdg-open") && !s:haskdeinit
    11002 +"   call Decho("unix and xdg-open")
    11003 +"   call Decho("exe sil !xdg-open ".shellescape(fname,1)." ".redir)
    11004 +   exe "sil !xdg-open ".shellescape(fname,1).redir
    11005 +   let ret= v:shell_error
    11006 +
    11007 +  elseif has("unix") && executable("kfmclient") && s:haskdeinit
    11008 +"   call Decho("unix and kfmclient")
    11009 +"   call Decho("exe sil !kfmclient exec ".shellescape(fname,1)." ".redir)
    11010 +   exe "sil !kfmclient exec ".shellescape(fname,1)." ".redir
    11011 +   let ret= v:shell_error
    11012 +
    11013 +  elseif has("macunix") && executable("open")
    11014 +"   call Decho("macunix and open")
    11015 +"   call Decho("exe sil !open ".shellescape(fname,1)." ".redir)
    11016 +   exe "sil !open ".shellescape(fname,1)." ".redir
    11017 +   let ret= v:shell_error
    11018 +
    11019 +  else
    11020 +   " netrwFileHandlers#Invoke() always returns 0
    11021 +   let ret= netrwFileHandlers#Invoke(exten,fname)
    11022 +  endif
    11023 +
    11024 +  " if unsuccessful, attempt netrwFileHandlers#Invoke()
    11025 +  if ret
    11026 +   let ret= netrwFileHandlers#Invoke(exten,fname)
    11027 +  endif
    11028 +
    11029 +  " restoring redraw! after external file handlers
    11030 +  redraw!
    11031 +
    11032 +  " cleanup: remove temporary file,
    11033 +  "          delete current buffer if success with handler,
    11034 +  "          return to prior buffer (directory listing)
    11035 +  "          Feb 12, 2008: had to de-activiate removal of
    11036 +  "          temporary file because it wasn't getting seen.
    11037 +"  if a:remote == 1 && fname != a:fname
    11038 +""   call Decho("deleting temporary file<".fname.">")
    11039 +"   call s:NetrwDelete(fname)
    11040 +"  endif
    11041 +
    11042 +  if a:remote == 1
    11043 +   setl bh=delete bt=nofile
    11044 +   if g:netrw_use_noswf
    11045 +    setl noswf
    11046 +   endif
    11047 +   exe "sil! keepj norm! \<c-o>"
    11048 +"   redraw!
    11049 +  endif
     6862    let fname= a:fname
     6863    " special ~ handler for local
     6864    if fname =~ '^\~' && expand("$HOME") != ""
     6865@@ -4783,7 +4851,7 @@
     6866    exe "sil! keepj norm! \<c-o>"
     6867 "   redraw!
     6868   endif
     6869-  call netrw#NetrwRestorePosn(screenposn)
    110506870+  call netrw#RestorePosn(screenposn)
    11051 +  let @@= ykeep
    11052 +
    11053 +"  call Dret("NetrwBrowseX")
    11054 +endfun
    11055 +
    11056 +" ---------------------------------------------------------------------
    11057 +" s:NetrwChgPerm: (implements "gp") change file permission {{{2
    11058 +fun! s:NetrwChgPerm(islocal,curdir)
    11059 +"  call Dfunc("s:NetrwChgPerm(islocal=".a:islocal." curdir<".a:curdir.">)")
    11060 +  let ykeep  = @@
    11061 +  call inputsave()
    11062 +  let newperm= input("Enter new permission: ")
    11063 +  call inputrestore()
    11064 +  let chgperm= substitute(g:netrw_chgperm,'\<FILENAME\>',shellescape(expand("<cfile>")),'')
    11065 +  let chgperm= substitute(chgperm,'\<PERM\>',shellescape(newperm),'')
    11066 +"  call Decho("chgperm<".chgperm.">")
    11067 +  call system(chgperm)
    11068 +  if v:shell_error != 0
    11069 +   keepj call netrw#ErrorMsg(1,"changing permission on file<".expand("<cfile>")."> seems to have failed",75)
    11070 +  endif
    11071 +  if a:islocal
    11072 +   keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
    11073 +  endif
    11074 +  let @@= ykeep
    11075 +"  call Dret("s:NetrwChgPerm")
    11076 +endfun
    11077 +
    11078 +" ---------------------------------------------------------------------
    11079 +" s:NetrwClearExplore: clear explore variables (if any) {{{2
    11080 +fun! s:NetrwClearExplore()
    11081 +"  call Dfunc("s:NetrwClearExplore()")
    11082 +  2match none
    11083 +  if exists("s:explore_match")        |unlet s:explore_match        |endif
    11084 +  if exists("s:explore_indx")         |unlet s:explore_indx         |endif
    11085 +  if exists("s:netrw_explore_prvdir") |unlet s:netrw_explore_prvdir |endif
    11086 +  if exists("s:dirstarstar")          |unlet s:dirstarstar          |endif
    11087 +  if exists("s:explore_prvdir")       |unlet s:explore_prvdir       |endif
    11088 +  if exists("w:netrw_explore_indx")   |unlet w:netrw_explore_indx   |endif
    11089 +  if exists("w:netrw_explore_listlen")|unlet w:netrw_explore_listlen|endif
    11090 +  if exists("w:netrw_explore_list")   |unlet w:netrw_explore_list   |endif
    11091 +  if exists("w:netrw_explore_bufnr")  |unlet w:netrw_explore_bufnr  |endif
    11092 +"   redraw!
    11093 +  echo " "
    11094 +  echo " "
    11095 +"  call Dret("s:NetrwClearExplore")
    11096 +endfun
    11097 +
    11098 +" ---------------------------------------------------------------------
    11099 +" s:NetrwExploreListUniq: {{{2
    11100 +fun! s:NetrwExploreListUniq(explist)
    11101 +"  call Dfunc("s:NetrwExploreListUniq(explist<".string(a:explist).">)")
    11102 +
    11103 +  " this assumes that the list is already sorted
    11104 +  let newexplist= []
    11105 +  for member in a:explist
    11106 +   if !exists("uniqmember") || member != uniqmember
    11107 +    let uniqmember = member
    11108 +    let newexplist = newexplist + [ member ]
    11109 +   endif
    11110 +  endfor
    11111 +
    11112 +"  call Dret("s:NetrwExploreListUniq newexplist<".string(newexplist).">")
    11113 +  return newexplist
    11114 +endfun
    11115 +
    11116 +" ---------------------------------------------------------------------
    11117 +" s:NetrwForceChgDir: (gd support) Force treatment as a directory {{{2
    11118 +fun! s:NetrwForceChgDir(islocal,newdir)
    11119 +"  call Dfunc("s:NetrwForceChgDir(islocal=".a:islocal." newdir<".a:newdir.">)")
    11120 +  let ykeep= @@
    11121 +  if a:newdir !~ '/$'
    11122 +   " ok, looks like force is needed to get directory-style treatment
    11123 +   if a:newdir =~ '@$'
    11124 +    let newdir= substitute(a:newdir,'@$','/','')
    11125 +   elseif a:newdir =~ '[*=|\\]$'
    11126 +    let newdir= substitute(a:newdir,'.$','/','')
    11127 +   else
    11128 +    let newdir= a:newdir.'/'
    11129 +   endif
    11130 +"   call Decho("adjusting newdir<".newdir."> due to gd")
    11131 +  else
    11132 +   " should already be getting treatment as a directory
    11133 +   let newdir= a:newdir
    11134 +  endif
    11135 +  let newdir= s:NetrwBrowseChgDir(a:islocal,newdir)
    11136 +  call s:NetrwBrowse(a:islocal,newdir)
    11137 +  let @@= ykeep
    11138 +"  call Dret("s:NetrwForceChgDir")
    11139 +endfun
    11140 +
    11141 +" ---------------------------------------------------------------------
    11142 +" s:NetrwForceFile: (gf support) Force treatment as a file {{{2
    11143 +fun! s:NetrwForceFile(islocal,newfile)
    11144 +"  call Dfunc("s:NetrwForceFile(islocal=".a:islocal." newdir<".a:newfile.">)")
    11145 +  if a:newfile =~ '[/@*=|\\]$'
    11146 +   let newfile= substitute(a:newfile,'.$','','')
    11147 +  else
    11148 +   let newfile= a:newfile
    11149 +  endif
    11150 +  if a:islocal
    11151 +   call s:NetrwBrowseChgDir(a:islocal,newfile)
    11152 +  else
    11153 +   call s:NetrwBrowse(a:islocal,s:NetrwBrowseChgDir(a:islocal,newfile))
    11154 +  endif
    11155 +"  call Dret("s:NetrwForceFile")
    11156 +endfun
    11157 +
    11158 +" ---------------------------------------------------------------------
    11159 +" s:NetrwHide: this function is invoked by the "a" map for browsing {{{2
    11160 +"          and switches the hiding mode.  The actual hiding is done by
    11161 +"          s:NetrwListHide().
    11162 +"             g:netrw_hide= 0: show all
    11163 +"                           1: show not-hidden files
    11164 +"                           2: show hidden files only
    11165 +fun! s:NetrwHide(islocal)
    11166 +"  call Dfunc("NetrwHide(islocal=".a:islocal.") g:netrw_hide=".g:netrw_hide)
    11167 +  let ykeep= @@
     6871   let @@= ykeep
     6872 
     6873 "  call Dret("NetrwBrowseX")
     6874@@ -4901,10 +4969,10 @@
     6875 fun! s:NetrwHide(islocal)
     6876 "  call Dfunc("NetrwHide(islocal=".a:islocal.") g:netrw_hide=".g:netrw_hide)
     6877   let ykeep= @@
     6878-  let svpos= netrw#NetrwSavePosn()
    111686879+  let svpos= netrw#SavePosn()
    11169 +
    11170 +  if exists("s:netrwmarkfilelist_{bufnr('%')}")
     6880 
     6881   if exists("s:netrwmarkfilelist_{bufnr('%')}")
     6882-"   call Decho(((g:netrw_hide == 1)? "unhide" : "hide")." files in markfilelist<".string(s:netrwmarkfilelist_{bufnr("%")}).">")
    111716883+"   call Decho("((g:netrw_hide == 1)? "unhide" : "hide")." files in markfilelist<".string(s:netrwmarkfilelist_{bufnr("%")}).">")
    11172 +"   call Decho("g:netrw_list_hide<".g:netrw_list_hide.">")
    11173 +
    11174 +   " hide the files in the markfile list
    11175 +   for fname in s:netrwmarkfilelist_{bufnr("%")}
    11176 +"    call Decho("match(g:netrw_list_hide<".g:netrw_list_hide.'> fname<\<'.fname.'\>>)='.match(g:netrw_list_hide,'\<'.fname.'\>')." l:isk=".&l:isk)
    11177 +    if match(g:netrw_list_hide,'\<'.fname.'\>') != -1
    11178 +     " remove fname from hiding list
    11179 +     let g:netrw_list_hide= substitute(g:netrw_list_hide,'..\<'.escape(fname,g:netrw_fname_escape).'\>..','','')
    11180 +     let g:netrw_list_hide= substitute(g:netrw_list_hide,',,',',','g')
    11181 +     let g:netrw_list_hide= substitute(g:netrw_list_hide,'^,\|,$','','')
    11182 +"     call Decho("unhide: g:netrw_list_hide<".g:netrw_list_hide.">")
    11183 +    else
    11184 +     " append fname to hiding list
    11185 +     if exists("g:netrw_list_hide") && g:netrw_list_hide != ""
    11186 +      let g:netrw_list_hide= g:netrw_list_hide.',\<'.escape(fname,g:netrw_fname_escape).'\>'
    11187 +     else
    11188 +      let g:netrw_list_hide= '\<'.escape(fname,g:netrw_fname_escape).'\>'
    11189 +     endif
    11190 +"     call Decho("hide: g:netrw_list_hide<".g:netrw_list_hide.">")
    11191 +    endif
    11192 +   endfor
    11193 +   keepj call s:NetrwUnmarkList(bufnr("%"),b:netrw_curdir)
    11194 +   let g:netrw_hide= 1
    11195 +
    11196 +  else
    11197 +
    11198 +   " switch between show-all/show-not-hidden/show-hidden
    11199 +   let g:netrw_hide=(g:netrw_hide+1)%3
    11200 +   exe "keepj norm! 0"
    11201 +   if g:netrw_hide && g:netrw_list_hide == ""
    11202 +    keepj call netrw#ErrorMsg(s:WARNING,"your hiding list is empty!",49)
    11203 +    let @@= ykeep
    11204 +"    call Dret("NetrwHide")
    11205 +    return
    11206 +   endif
    11207 +  endif
    11208 +
    11209 +  keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
     6884 "   call Decho("g:netrw_list_hide<".g:netrw_list_hide.">")
     6885 
     6886    " hide the files in the markfile list
     6887@@ -4943,7 +5011,7 @@
     6888   endif
     6889 
     6890   keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
     6891-  keepj call netrw#NetrwRestorePosn(svpos)
    112106892+  keepj call netrw#RestorePosn(svpos)
    11211 +  let @@= ykeep
    11212 +"  call Dret("NetrwHide")
    11213 +endfun
    11214 +
    11215 +" ---------------------------------------------------------------------
    11216 +" s:NetrwHidden: invoked by "gh" {{{2
    11217 +fun! s:NetrwHidden(islocal)
    11218 +"  call Dfunc("s:NetrwHidden()")
    11219 +  let ykeep= @@
    11220 +  "  save current position
     6893   let @@= ykeep
     6894 "  call Dret("NetrwHide")
     6895 endfun
     6896@@ -4954,7 +5022,7 @@
     6897 "  call Dfunc("s:NetrwHidden()")
     6898   let ykeep= @@
     6899   "  save current position
     6900-  let svpos= netrw#NetrwSavePosn()
    112216901+  let svpos= netrw#SavePosn()
    11222 +
    11223 +  if g:netrw_list_hide =~ '\(^\|,\)\\(^\\|\\s\\s\\)\\zs\\.\\S\\+'
    11224 +   " remove pattern from hiding list
    11225 +   let g:netrw_list_hide= substitute(g:netrw_list_hide,'\(^\|,\)\\(^\\|\\s\\s\\)\\zs\\.\\S\\+','','')
    11226 +  elseif s:Strlen(g:netrw_list_hide) >= 1
    11227 +   let g:netrw_list_hide= g:netrw_list_hide . ',\(^\|\s\s\)\zs\.\S\+'
    11228 +  else
    11229 +   let g:netrw_list_hide= '\(^\|\s\s\)\zs\.\S\+'
    11230 +  endif
    11231 +
    11232 +  " refresh screen and return to saved position
    11233 +  keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
     6902 
     6903   if g:netrw_list_hide =~ '\(^\|,\)\\(^\\|\\s\\s\\)\\zs\\.\\S\\+'
     6904    " remove pattern from hiding list
     6905@@ -4967,7 +5035,7 @@
     6906 
     6907   " refresh screen and return to saved position
     6908   keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
     6909-  keepj call netrw#NetrwRestorePosn(svpos)
    112346910+  keepj call netrw#RestorePosn(svpos)
    11235 +  let @@= ykeep
    11236 +"  call Dret("s:NetrwHidden")
    11237 +endfun
    11238 +
    11239 +" ---------------------------------------------------------------------
    11240 +"  s:NetrwHome: this function determines a "home" for saving bookmarks and history {{{2
    11241 +fun! s:NetrwHome()
    11242 +  if exists("g:netrw_home")
    11243 +   let home= g:netrw_home
    11244 +  else
    11245 +   " go to vim plugin home
    11246 +   for home in split(&rtp,',') + ['']
    11247 +    if isdirectory(home) && filewritable(home) | break | endif
    11248 +     let basehome= substitute(home,'[/\\]\.vim$','','')
    11249 +    if isdirectory(basehome) && filewritable(basehome)
    11250 +     let home= basehome."/.vim"
    11251 +     break
    11252 +    endif
    11253 +   endfor
    11254 +   if home == ""
    11255 +    " just pick the first directory
    11256 +    let home= substitute(&rtp,',.*$','','')
    11257 +   endif
    11258 +   if (has("win32") || has("win95") || has("win64") || has("win16"))
    11259 +    let home= substitute(home,'/','\\','g')
    11260 +   endif
    11261 +  endif
    11262 +  " insure that the home directory exists
    11263 +  if g:netrw_dirhistmax > 0 && !isdirectory(home)
    11264 +   if exists("g:netrw_mkdir")
    11265 +    call system(g:netrw_mkdir." ".shellescape(home))
    11266 +   else
    11267 +    call mkdir(home)
    11268 +   endif
    11269 +  endif
    11270 +  let g:netrw_home= home
    11271 +  return home
    11272 +endfun
    11273 +
    11274 +" ---------------------------------------------------------------------
     6911   let @@= ykeep
     6912 "  call Dret("s:NetrwHidden")
     6913 endfun
     6914@@ -5008,291 +5076,745 @@
     6915 endfun
     6916 
     6917 " ---------------------------------------------------------------------
     6918-" s:NetrwLeftmouse: handles the <leftmouse> when in a netrw browsing window {{{2
     6919-fun! s:NetrwLeftmouse(islocal)
     6920-  if exists("s:netrwdrag")
     6921-   return
     6922-  endif
     6923-"  call Dfunc("s:NetrwLeftmouse(islocal=".a:islocal.")")
    112756924+" s:NetrwLeftmouse: handles the <leftmouse> when in a netrw browsing window {{{2
    112766925+fun! s:NetrwLeftmouse(islocal)
     
    114667115+fun! s:NetrwMakeDir(usrhost)
    114677116+"  call Dfunc("s:NetrwMakeDir(usrhost<".a:usrhost.">)")
    11468 +
    11469 +  let ykeep= @@
     7117 
     7118   let ykeep= @@
     7119-  " check if the status bar was clicked on instead of a file/directory name
     7120-  while getchar(0) != 0
     7121-   "clear the input stream
     7122-  endwhile
     7123-  call feedkeys("\<LeftMouse>")
     7124-  let c          = getchar()
     7125-  let mouse_lnum = v:mouse_lnum
     7126-  let wlastline  = line('w$')
     7127-  let lastline   = line('$')
     7128-"  call Decho("v:mouse_lnum=".mouse_lnum." line(w$)=".wlastline." line($)=".lastline." v:mouse_win=".v:mouse_win." winnr#".winnr())
     7129-"  call Decho("v:mouse_col =".v:mouse_col."     col=".col(".")."  wincol =".wincol()." winwidth   =".winwidth(0))
     7130-  if mouse_lnum >= wlastline + 1 || v:mouse_win != winnr()
     7131-   " appears to be a status bar leftmouse click
     7132-   let @@= ykeep
     7133-"   call Dret("s:NetrwLeftmouse : detected a status bar leftmouse click")
     7134-   return
     7135-  endif
     7136-  if v:mouse_col != col('.')
    114707137+  " get name of new directory from user.  A bare <CR> will skip.
    114717138+  " if its currently a directory, also request will be skipped, but with
     
    114777144+
    114787145+  if newdirname == ""
    11479 +   let @@= ykeep
     7146    let @@= ykeep
     7147-"   call Dret("s:NetrwLeftmouse : detected a vertical separator bar leftmouse click")
    114807148+"   call Dret("s:NetrwMakeDir : user aborted with bare <cr>")
    11481 +   return
    11482 +  endif
    11483 +
     7149    return
     7150   endif
     7151 
     7152-  if a:islocal
     7153-   if exists("b:netrw_curdir")
     7154-    keepj call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(1,s:NetrwGetWord()))
    114847155+  if a:usrhost == ""
    114857156+"   call Decho("local mkdir")
     
    114967167+"    call Dret("s:NetrwMakeDir : directory<".newdirname."> exists previously")
    114977168+    return
    11498 +   endif
     7169    endif
     7170-  else
     7171-   if exists("b:netrw_curdir")
     7172-    keepj call s:NetrwBrowse(0,s:NetrwBrowseChgDir(0,s:NetrwGetWord()))
    114997173+   if s:FileReadable(fullnewdir)
    115007174+    if !exists("g:netrw_quiet")
     
    115047178+"    call Dret("s:NetrwMakeDir : file<".newdirname."> exists previously")
    115057179+    return
    11506 +   endif
    11507 +
     7180    endif
     7181-  endif
     7182-  let @@= ykeep
     7183-"  call Dret("s:NetrwLeftmouse")
     7184-endfun
     7185 
     7186-" ---------------------------------------------------------------------
     7187-" s:NetrwRightdrag: {{{2
     7188-"DechoTabOn
     7189-fun! s:NetrwRightdrag(islocal)
     7190-"  call Dfunc("s:NetrwRightdrag(islocal=".a:islocal.")")
     7191-  if !exists("s:netrwdrag")
     7192-   let s:netrwdrag     = winnr()
     7193-   call s:NetrwMarkFile(a:islocal,s:NetrwGetWord())
     7194-   if a:islocal
     7195-    nno <silent> <s-rightrelease> <leftmouse>:<c-u>call <SID>NetrwRightrelease(1)<cr>
    115087196+   " requested new local directory is neither a pre-existing file or
    115097197+   " directory, so make it!
     
    115247212+     call netrw#ErrorMsg(s:ERROR,"consider setting g:netrw_localmkdir<".g:netrw_localmkdir."> to something that works",80)
    115257213+"     call Dret("s:NetrwMakeDir : failed: sil! !".g:netrw_localmkdir.' '.shellescape(newdirname,1))
    11526       return
    11527      endif
    11528      if !g:netrw_keepdir
    11529 -     exe 'keepj lcd '.fnameescape(netrw_origdir)
    11530 -"     call Decho("netrw_keepdir=".g:netrw_keepdir.": keepjumps lcd ".fnameescape(netrw_origdir)." getcwd<".getcwd().">")
     7214+     return
     7215+    endif
     7216+    if !g:netrw_keepdir
    115317217+"     call Decho("restoring netrw_origdir since g:netrw_keepdir=".g:netrw_keepdir)
    115327218+     call s:NetrwLcd(netrw_origdir)
     
    115837269+"    call Decho("b:netrw_fname<".b:netrw_fname.">")
    115847270+    let remotepath= b:netrw_fname
    11585 +   else
     7271    else
     7272-    nno <silent> <s-rightrelease> <leftmouse>:<c-u>call <SID>NetrwRightrelease(0)<cr>
    115867273+    let remotepath= ""
    11587 +   endif
     7274    endif
    115887275+   call s:NetrwRemoteFtpCmd(remotepath,g:netrw_remote_mkdir.' "'.newdirname.'"')
    115897276+   keepj call s:NetrwRefresh(0,s:NetrwBrowseChgDir(0,'./'))
    115907277+   keepj call netrw#RestorePosn(svpos)
    11591 +  endif
     7278   endif
     7279-"  call Dret("s:NetrwRightdrag : s:netrwdrag=".s:netrwdrag." buf#".bufnr("%"))
    115927280+
    115937281+  let @@= ykeep
    115947282+"  call Dret("s:NetrwMakeDir")
    11595 +endfun
    11596 +
    11597 +" ---------------------------------------------------------------------
     7283 endfun
     7284 
     7285 " ---------------------------------------------------------------------
     7286-" s:NetrwRightrelease: {{{2
     7287-fun! s:NetrwRightrelease(islocal)
     7288-"  call Dfunc("s:NetrwRightrelease(islocal=".a:islocal.") s:netrwdrag=".s:netrwdrag." buf#".bufnr("%"))
     7289-  if exists("s:netrwdrag")
     7290-   nunmap <s-rightrelease>
     7291-   let tgt = s:NetrwGetWord()
     7292-"   call Decho("target#1: ".tgt)
     7293-   if tgt =~ '/$' && tgt !~ '^\./$'
     7294-    let tgt = b:netrw_curdir."/".tgt
     7295-   else
     7296-    let tgt= b:netrw_curdir
     7297-   endif
     7298-"   call Decho("target#2: ".tgt)
     7299-   call netrw#NetrwMakeTgt(tgt)
     7300-   let curwin= winnr()
     7301-   exe s:netrwdrag."wincmd w"
     7302-   call s:NetrwMarkFileMove(a:islocal)
     7303-   exe curwin."wincmd w"
     7304-   unlet s:netrwdrag
    115987305+" s:TreeSqueezeDir: allows a shift-cr (gvim only) to squeeze the current tree-listing directory {{{2
    115997306+fun! s:TreeSqueezeDir(islocal)
     
    116187325+"   call Decho("squeezing at line#".line(".").": ".getline('.'))
    116197326+   call s:NetrwBrowse(a:islocal,s:NetrwBrowseChgDir(a:islocal,s:NetrwGetWord()))
    11620 +  endif
     7327   endif
     7328-"  call Dret("s:NetrwRightrelease")
    116217329+"  call Dret("s:TreeSqueezeDir")
    11622 +endfun
    11623 +
    11624 +" ---------------------------------------------------------------------
     7330 endfun
     7331 
     7332 " ---------------------------------------------------------------------
     7333-" s:NetrwListHide: uses [range]g~...~d to delete files that match comma {{{2
     7334-" separated patterns given in g:netrw_list_hide
     7335-fun! s:NetrwListHide()
     7336-"  call Dfunc("NetrwListHide() g:netrw_hide=".g:netrw_hide." g:netrw_list_hide<".g:netrw_list_hide.">")
     7337-  let ykeep= @@
    116257338+" s:NetrwMaps: {{{2
    116267339+fun! s:NetrwMaps(islocal)
    116277340+"  call Dfunc("s:NetrwMaps(islocal=".a:islocal.") b:netrw_curdir<".b:netrw_curdir.">")
    11628 +
     7341 
     7342-  " find a character not in the "hide" string to use as a separator for :g and :v commands
     7343-  " How-it-works: take the hiding command, convert it into a range.  Duplicate
     7344-  " characters don't matter.  Remove all such characters from the '/~...90'
     7345-  " string.  Use the first character left as a separator character.
     7346-  let listhide= g:netrw_list_hide
     7347-  let sep     = strpart(substitute('/~@#$%^&*{};:,<.>?|1234567890','['.escape(listhide,'-]^\').']','','ge'),1,1)
     7348-"  call Decho("sep=".sep)
    116297349+  if g:netrw_mousemaps && g:netrw_retmap
    116307350+"   call Decho("set up Rexplore 2-leftmouse")
     
    116367356+"     call Decho("making map for c-leftmouse")
    116377357+     nmap <unique> <silent> <c-leftmouse>      <Plug>NetrwReturn
    11638      endif
    11639     endif
     7358+    endif
     7359+   endif
    116407360+   nno <silent> <Plug>NetrwReturn      :Rexplore<cr>
    116417361+"   call Decho("made <Plug>NetrwReturn map")
    116427362+  endif
    11643 +
     7363 
     7364-  while listhide != ""
     7365-   if listhide =~ ','
     7366-    let hide     = substitute(listhide,',.*$','','e')
     7367-    let listhide = substitute(listhide,'^.\{-},\(.*\)$','\1','e')
     7368-   else
     7369-    let hide     = listhide
     7370-    let listhide = ""
    116447371+  if a:islocal
    116457372+"   call Decho("make local maps")
     
    116487375+   nnoremap <buffer> <silent> %                :call <SID>NetrwOpenFile(1)<cr>
    116497376+   nnoremap <buffer> <silent> c                :call <SID>NetrwLcd(b:netrw_curdir)<cr>
    11650 +   nnoremap <buffer> <silent> C                :let g:netrw_chgwin= winnr()<cr>
     7377+   nnoremap <buffer> <silent> C                :<c-u>call <SID>NetrwSetChgwin()<cr>
    116517378+   nnoremap <buffer> <silent> <cr>     :call netrw#LocalBrowseCheck(<SID>NetrwBrowseChgDir(1,<SID>NetrwGetWord()))<cr>
    116527379+   nnoremap <buffer> <silent> <s-cr>   :call <SID>TreeSqueezeDir(1)<cr>
     
    117017428+   inoremap <buffer> <silent> c                <c-o>:exe "keepjumps lcd ".fnameescape(b:netrw_curdir)<cr>
    117027429+   inoremap <buffer> <silent> c                <c-o>:call <SID>NetrwLcd(b:netrw_curdir)<cr>
    11703 +   inoremap <buffer> <silent> C                <c-o>:let g:netrw_chgwin= winnr()<cr>
     7430+   inoremap <buffer> <silent> C                <c-o>:call <SID>NetrwSetChgwin()<cr>
    117047431+   inoremap <buffer> <silent> %                <c-o>:call <SID>NetrwOpenFile(1)<cr>
    117057432+   inoremap <buffer> <silent> -                <c-o>:call <SID>NetrwBrowseUpDir(1)<cr>
     
    117557482+    nmap <buffer> <unique> <c-l> <Plug>NetrwRefresh
    117567483+    imap <buffer> <unique> <c-l> <Plug>NetrwRefresh
    11757 +   endif
     7484    endif
     7485-
     7486-   " Prune the list by hiding any files which match
     7487-   if g:netrw_hide == 1
     7488-"    call Decho("hiding<".hide."> listhide<".listhide.">")
     7489-    exe 'sil! keepj '.w:netrw_bannercnt.',$g'.sep.hide.sep.'d'
     7490-   elseif g:netrw_hide == 2
     7491-"    call Decho("showing<".hide."> listhide<".listhide.">")
     7492-    exe 'sil! keepj '.w:netrw_bannercnt.',$g'.sep.hide.sep.'s@^@ /-KEEP-/ @'
    117587493+   nnoremap <buffer> <silent> <Plug>NetrwRefresh               :call <SID>NetrwRefresh(1,<SID>NetrwBrowseChgDir(1,'./'))<cr>
    117597494+   if s:didstarstar || !mapcheck("<s-down>","n")
    117607495+    nnoremap <buffer> <silent> <s-down>        :Nexplore<cr>
    117617496+    inoremap <buffer> <silent> <s-down>        :Nexplore<cr>
    11762 +   endif
     7497    endif
     7498-  endwhile
     7499-  if g:netrw_hide == 2
     7500-   exe 'sil! keepj '.w:netrw_bannercnt.',$v@^ /-KEEP-/ @d'
     7501-   exe 'sil! keepj '.w:netrw_bannercnt.',$s@^\%( /-KEEP-/ \)\+@@e'
     7502-  endif
     7503-
     7504-  " remove any blank lines that have somehow remained.
     7505-  " This seems to happen under Windows.
     7506-  exe 'sil! keepj 1,$g@^\s*$@d'
     7507-
     7508-  let @@= ykeep
     7509-"  call Dret("NetrwListHide")
     7510-endfun
     7511-
     7512-" ---------------------------------------------------------------------
     7513-" NetrwHideEdit: allows user to edit the file/directory hiding list
     7514-fun! s:NetrwHideEdit(islocal)
     7515-"  call Dfunc("NetrwHideEdit(islocal=".a:islocal.")")
     7516-
     7517-  let ykeep= @@
     7518-  " save current cursor position
     7519-  let svpos= netrw#NetrwSavePosn()
     7520-
     7521-  " get new hiding list from user
     7522-  call inputsave()
     7523-  let newhide= input("Edit Hiding List: ",g:netrw_list_hide)
     7524-  call inputrestore()
     7525-  let g:netrw_list_hide= newhide
     7526-"  call Decho("new g:netrw_list_hide<".g:netrw_list_hide.">")
     7527-
     7528-  " refresh the listing
     7529-  sil keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,"./"))
     7530-
     7531-  " restore cursor position
     7532-  call netrw#NetrwRestorePosn(svpos)
     7533-  let @@= ykeep
     7534-
     7535-"  call Dret("NetrwHideEdit")
     7536-endfun
     7537-
     7538-" ---------------------------------------------------------------------
     7539-" NetSortSequence: allows user to edit the sorting sequence
     7540-fun! s:NetSortSequence(islocal)
     7541-"  call Dfunc("NetSortSequence(islocal=".a:islocal.")")
     7542-
     7543-  let ykeep= @@
     7544-  let svpos= netrw#NetrwSavePosn()
     7545-  call inputsave()
     7546-  let newsortseq= input("Edit Sorting Sequence: ",g:netrw_sort_sequence)
     7547-  call inputrestore()
     7548-
     7549-  " refresh the listing
     7550-  let g:netrw_sort_sequence= newsortseq
     7551-  keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
     7552-  keepj call netrw#NetrwRestorePosn(svpos)
     7553-  let @@= ykeep
     7554-
     7555-"  call Dret("NetSortSequence")
     7556-endfun
     7557-
     7558-" ---------------------------------------------------------------------
     7559-" s:NetrwMakeDir: this function makes a directory (both local and remote) {{{2
     7560-fun! s:NetrwMakeDir(usrhost)
     7561-"  call Dfunc("NetrwMakeDir(usrhost<".a:usrhost.">)")
     7562-
     7563-  let ykeep= @@
     7564-  " get name of new directory from user.  A bare <CR> will skip.
     7565-  " if its currently a directory, also request will be skipped, but with
     7566-  " a message.
     7567-  call inputsave()
     7568-  let newdirname= input("Please give directory name: ")
     7569-  call inputrestore()
     7570-"  call Decho("newdirname<".newdirname.">")
     7571-
     7572-  if newdirname == ""
     7573-   let @@= ykeep
     7574-"   call Dret("NetrwMakeDir : user aborted with bare <cr>")
     7575-   return
     7576-  endif
     7577-
     7578-  if a:usrhost == ""
     7579-"   call Decho("local mkdir")
    117637580+   if s:didstarstar || !mapcheck("<s-up>","n")
    117647581+    nnoremap <buffer> <silent> <s-up>  :Pexplore<cr>
     
    117997616+   exe 'inoremap <buffer> <silent> d           <c-o>:call <SID>NetrwMakeDir("")<cr>'
    118007617+   nnoremap <buffer> <F1>                      :he netrw-quickhelp<cr>
    11801 +
     7618 
     7619-   " Local mkdir:
     7620-   " sanity checks
     7621-   let fullnewdir= b:netrw_curdir.'/'.newdirname
     7622-"   call Decho("fullnewdir<".fullnewdir.">")
     7623-   if isdirectory(fullnewdir)
     7624-    if !exists("g:netrw_quiet")
     7625-     keepj call netrw#ErrorMsg(s:WARNING,"<".newdirname."> is already a directory!",24)
     7626-    endif
     7627-    let @@= ykeep
     7628-"    call Dret("NetrwMakeDir : directory<".newdirname."> exists previously")
     7629-    return
    118027630+  else " remote
    118037631+"   call Decho("make remote maps")
     
    118327660+   nnoremap <buffer> <silent> gh       :<c-u>call <SID>NetrwHidden(0)<cr>
    118337661+   nnoremap <buffer> <silent> gp       :<c-u>call <SID>NetrwChgPerm(0,b:netrw_curdir)<cr>
    11834 +   nnoremap <buffer> <silent> C                :let g:netrw_chgwin= winnr()<cr>
     7662+   nnoremap <buffer> <silent> C                :<c-u>call <SID>NetrwSetChgwin()<cr>
    118357663+   nnoremap <buffer> <silent> i                :call <SID>NetrwListStyle(0)<cr>
    118367664+   nnoremap <buffer> <silent> I                :call <SID>NetrwBannerCtrl(1)<cr>
     
    118807708+   inoremap <buffer> <silent> gh       <c-o>:<c-u>call <SID>NetrwHidden(0)<cr>
    118817709+   inoremap <buffer> <silent> gp       <c-o>:<c-u>call <SID>NetrwChgPerm(0,b:netrw_curdir)<cr>
    11882 +   inoremap <buffer> <silent> C                <c-o>:let g:netrw_chgwin= winnr()<cr>
     7710+   inoremap <buffer> <silent> C                <c-o>:call <SID>NetrwSetChgwin()<cr>
    118837711+   inoremap <buffer> <silent> i                <c-o>:call <SID>NetrwListStyle(0)<cr>
    118847712+   inoremap <buffer> <silent> I                <c-o>:call <SID>NetrwBannerCtrl(1)<cr>
     
    119057733+    nmap <buffer> <c-h> <Plug>NetrwHideEdit
    119067734+    imap <buffer> <c-h> <Plug>NetrwHideEdit
    11907 +   endif
     7735    endif
     7736-   if s:FileReadable(fullnewdir)
     7737-    if !exists("g:netrw_quiet")
     7738-     keepj call netrw#ErrorMsg(s:WARNING,"<".newdirname."> is already a file!",25)
     7739-    endif
     7740-    let @@= ykeep
     7741-"    call Dret("NetrwMakeDir : file<".newdirname."> exists previously")
     7742-    return
    119087743+   nnoremap <buffer> <silent> <Plug>NetrwHideEdit      :call <SID>NetrwHideEdit(0)<cr>
    119097744+   if !hasmapto('<Plug>NetrwRefresh')
    119107745+    nmap <buffer> <c-l> <Plug>NetrwRefresh
    119117746+    imap <buffer> <c-l> <Plug>NetrwRefresh
    11912 +   endif
    11913 +
     7747    endif
     7748 
     7749-   " requested new local directory is neither a pre-existing file or
     7750-   " directory, so make it!
     7751-   if exists("*mkdir")
     7752-    call mkdir(fullnewdir,"p")
     7753-   else
     7754-    let netrw_origdir= s:NetrwGetcwd(1)
     7755-    exe 'keepj lcd '.fnameescape(b:netrw_curdir)
     7756-"    call Decho("netrw_origdir<".netrw_origdir.">: lcd b:netrw_curdir<".fnameescape(b:netrw_curdir).">")
     7757-"    call Decho("exe sil! !".g:netrw_localmkdir.' '.shellescape(newdirname,1))
     7758-    exe "sil! !".g:netrw_localmkdir.' '.shellescape(newdirname,1)
     7759-    if v:shell_error != 0
     7760-     let @@= ykeep
     7761-     call netrw#ErrorMsg(s:ERROR,"consider setting g:netrw_localmkdir<".g:netrw_localmkdir."> to something that works",80)
     7762-"     call Dret("NetrwMakeDir : failed: sil! !".g:netrw_localmkdir.' '.shellescape(newdirname,1))
     7763-     return
     7764-    endif
     7765-    if !g:netrw_keepdir
     7766-     exe 'keepj lcd '.fnameescape(netrw_origdir)
     7767-"     call Decho("netrw_keepdir=".g:netrw_keepdir.": keepjumps lcd ".fnameescape(netrw_origdir)." getcwd<".getcwd().">")
     7768-    endif
    119147769+   let mapsafepath     = escape(s:path, s:netrw_map_escape)
    119157770+   let mapsafeusermach = escape(s:user.s:machine, s:netrw_map_escape)
     
    119387793+    exe 'vnoremap <buffer> <silent> <rightmouse> <leftmouse>:call <SID>NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")<cr>'
    119397794+    exe 'inoremap <buffer> <silent> <rightmouse> <c-o><leftmouse><c-o>:call <SID>NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")<cr>'
    11940 +   endif
     7795    endif
    119417796+   exe 'nnoremap <buffer> <silent> <del>       :call <SID>NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")<cr>'
    119427797+   exe 'nnoremap <buffer> <silent> d           :call <SID>NetrwMakeDir("'.mapsafeusermach.'")<cr>'
     
    120557910 
    120567911 " ---------------------------------------------------------------------
    12057 @@ -5324,7 +5765,16 @@
     7912@@ -5324,7 +5846,16 @@
    120587913   let ykeep   = @@
    120597914   let curbufnr= bufnr("%")
     
    120737928   if exists("s:netrwmarkfilelist_{curbufnr}")
    120747929    " markfile list pre-exists
    12075 @@ -5336,7 +5786,7 @@
     7930@@ -5336,7 +5867,7 @@
    120767931     " append filename to buffer's markfilelist
    120777932 "    call Decho("append filename<".a:fname."> to local markfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr}).">")
     
    120827937    else
    120837938     " remove filename from buffer's markfilelist
    12084 @@ -5350,12 +5800,12 @@
     7939@@ -5350,12 +5881,12 @@
    120857940      " rebuild match list to display markings correctly
    120867941 "     call Decho("rebuild s:netrwmarkfilemtch_".curbufnr)
     
    120987953       let first= 0
    120997954      endfor
    12100 @@ -5373,9 +5823,9 @@
     7955@@ -5373,9 +5904,9 @@
    121017956 
    121027957    " build initial markfile matching pattern
     
    121107965 "   call Decho("ending s:netrwmarkfilemtch_".curbufnr."<".s:netrwmarkfilemtch_{curbufnr}.">")
    121117966   endif
    12112 @@ -5427,7 +5877,7 @@
     7967@@ -5427,7 +5958,7 @@
    121137968 "                            g:netrw_decompress      = { ".gz" : "gunzip" , ".bz2" : "bunzip2" , ".zip" : "unzip" , ".tar" : "tar -xf", ".xz" : "unxz"}
    121147969 fun! s:NetrwMarkFileCompress(islocal)
     
    121197974   let curbufnr = bufnr("%")
    121207975 
    12121 @@ -5482,7 +5932,7 @@
     7976@@ -5482,7 +6013,7 @@
    121227977 
    121237978    call s:NetrwUnmarkList(curbufnr,curdir)
     
    121287983 "  call Dret("s:NetrwMarkFileCompress")
    121297984 endfun
    12130 @@ -5596,7 +6046,7 @@
     7985@@ -5522,7 +6053,7 @@
     7986   if      a:islocal &&  s:netrwmftgt_islocal
     7987    " Copy marked files, local directory to local directory
     7988 "   call Decho("copy from local to local")
     7989-   if !executable(g:netrw_localcopycmd) && g:netrw_localcopycmd !~ '\<cmd\s'
     7990+   if !executable(g:netrw_localcopycmd) && g:netrw_localcopycmd !~ '^'.expand("$COMSPEC").'\s'
     7991     call netrw#ErrorMsg(s:ERROR,"g:netrw_localcopycmd<".g:netrw_localcopycmd."> not executable on your system, aborting",91)
     7992 "    call Dfunc("s:NetrwMarkFileMove : g:netrw_localcopycmd<".g:netrw_localcopycmd."> n/a!")
     7993     return
     7994@@ -5596,7 +6127,7 @@
    121317995   elseif !a:islocal &&  s:netrwmftgt_islocal
    121327996    " Copy marked files, remote directory to local directory
     
    121378001   elseif !a:islocal && !s:netrwmftgt_islocal
    121388002    " Copy marked files, remote directory to remote directory
    12139 @@ -5617,15 +6067,15 @@
     8003@@ -5617,15 +6148,15 @@
    121408004     endif
    121418005    endif
     
    121568020      if v:shell_error != 0
    121578021       call netrw#ErrorMsg(s:WARNING,"consider setting g:netrw_localrmdir<".g:netrw_localrmdir."> to something that works",80)
    12158 @@ -5633,7 +6083,7 @@
     8022@@ -5633,7 +6164,7 @@
    121598023       return
    121608024      endif
     
    121658029    endif
    121668030   endif
    12167 @@ -5655,7 +6105,7 @@
     8031@@ -5655,7 +6186,7 @@
    121688032    keepj call s:NetrwRefreshDir(a:islocal,curdir)
    121698033   endif
     
    121748038   
    121758039 "  call Dret("s:NetrwMarkFileCopy 1")
    12176 @@ -5679,7 +6129,7 @@
     8040@@ -5679,7 +6210,7 @@
    121778041   endif
    121788042 "  call Decho("sanity chk passed: s:netrwmarkfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr}))
     
    121838047    let curdir = b:netrw_curdir
    121848048    for fname in s:netrwmarkfilelist
    12185 @@ -5771,7 +6221,7 @@
     8049@@ -5771,7 +6302,7 @@
    121868050 "                     Uses the local marked-file list.
    121878051 fun! s:NetrwMarkFileExe(islocal)
     
    121928056   let curbufnr = bufnr("%")
    121938057 
    12194 @@ -5829,7 +6279,7 @@
     8058@@ -5829,7 +6360,7 @@
    121958059 
    121968060    " refresh the listing
     
    122018065    keepj call netrw#ErrorMsg(s:ERROR,"no files marked!",59)
    122028066   endif
    12203 @@ -5843,7 +6293,7 @@
     8067@@ -5843,7 +6374,7 @@
    122048068 "                  Uses the local marked file list.
    122058069 fun! s:NetrwMarkHideSfx(islocal)
     
    122108074 
    122118075   " s:netrwmarkfilelist_{curbufnr}: the List of marked files
    12212 @@ -5886,7 +6336,7 @@
     8076@@ -5886,7 +6417,7 @@
    122138077 
    122148078    " refresh the listing
     
    122198083    keepj call netrw#ErrorMsg(s:ERROR,"no files marked!",59)
    122208084   endif
    12221 @@ -5899,7 +6349,7 @@
     8085@@ -5899,7 +6430,7 @@
    122228086 "                     Uses the local marked-file list.
    122238087 fun! s:NetrwMarkFileVimCmd(islocal)
     
    122288092   let curbufnr = bufnr("%")
    122298093 
    12230 @@ -5943,7 +6393,7 @@
     8094@@ -5943,7 +6474,7 @@
    122318095 
    122328096    " refresh the listing
     
    122378101    keepj call netrw#ErrorMsg(s:ERROR,"no files marked!",59)
    122388102   endif
    12239 @@ -5957,7 +6407,7 @@
     8103@@ -5957,7 +6488,7 @@
    122408104 "                  Uses the local marked file list.
    122418105 fun! s:NetrwMarkHideSfx(islocal)
     
    122468110 
    122478111   " s:netrwmarkfilelist_{curbufnr}: the List of marked files
    12248 @@ -6000,7 +6450,7 @@
     8112@@ -6000,7 +6531,7 @@
    122498113 
    122508114    " refresh the listing
     
    122558119    keepj call netrw#ErrorMsg(s:ERROR,"no files marked!",59)
    122568120   endif
    12257 @@ -6013,7 +6463,7 @@
     8121@@ -6013,7 +6544,7 @@
    122588122 "                     Uses the global markfilelist
    122598123 fun! s:NetrwMarkFileGrep(islocal)
     
    122648128 
    122658129   if exists("s:netrwmarkfilelist")
    12266 @@ -6053,7 +6503,7 @@
     8130@@ -6053,7 +6584,7 @@
    122678131   echo "(use :cn, :cp to navigate, :Rex to return)"
    122688132 
     
    122738137   if exists("nonisi")
    122748138    " original, user-supplied pattern did not begin with a character from isident
    12275 @@ -6094,7 +6544,7 @@
     8139@@ -6094,8 +6625,8 @@
    122768140   if      a:islocal &&  s:netrwmftgt_islocal
    122778141    " move: local -> local
    122788142 "   call Decho("move from local to local")
    122798143-"   call Decho("(s:NetrwMarkFileMove) local to local move")
     8144-   if !executable(g:netrw_localmovecmd) && g:netrw_localmovecmd !~ '\<cmd\s'
    122808145+"   call Decho("local to local move")
    12281     if !executable(g:netrw_localmovecmd) && g:netrw_localmovecmd !~ '\<cmd\s'
     8146+   if !executable(g:netrw_localmovecmd) && g:netrw_localmovecmd !~ '^'.expand("$COMSPEC").'\s'
    122828147     call netrw#ErrorMsg(s:ERROR,"g:netrw_localmovecmd<".g:netrw_localmovecmd."> not executable on your system, aborting",90)
    122838148 "    call Dfunc("s:NetrwMarkFileMove : g:netrw_localmovecmd<".g:netrw_localmovecmd."> n/a!")
    12284 @@ -6189,7 +6639,7 @@
     8149     return
     8150@@ -6189,7 +6720,7 @@
    122858151   endif
    122868152   if g:netrw_fastbrowse <= 1
     
    122918157   
    122928158 "  call Dret("s:NetrwMarkFileMove")
    12293 @@ -6267,8 +6717,8 @@
     8159@@ -6267,8 +6798,8 @@
    122948160    let eikeep = &ei
    122958161    let areg   = @a
     
    123028168    keepj call s:NetrwEnew()
    123038169    keepj call s:NetrwSafeOptions()
    12304 @@ -6276,7 +6726,7 @@
     8170@@ -6276,7 +6807,7 @@
    123058171    keepj 2
    123068172    let bannercnt= search('^" =====','W')
     
    123118177     sil keepj %s/\s\{2,}\S.*$//e
    123128178     call histdel("/",-1)
    12313 @@ -6284,7 +6734,7 @@
     8179@@ -6284,7 +6815,7 @@
    123148180     sil keepj %s/\s\{2,}/\r/ge
    123158181     call histdel("/",-1)
     
    123208186     call histdel("/",-1)
    123218187     call histdel("/",-1)
    12322 @@ -6348,7 +6798,7 @@
     8188@@ -6348,7 +6879,7 @@
    123238189 "                     Uses the global markfilelist
    123248190 fun! s:NetrwMarkFileTag(islocal)
     
    123298195   let curbufnr = bufnr("%")
    123308196 
    12331 @@ -6374,7 +6824,7 @@
     8197@@ -6374,7 +6905,7 @@
    123328198     endif
    123338199    else
     
    123388204     1split
    123398205     e tags
    12340 @@ -6386,7 +6836,7 @@
     8206@@ -6386,7 +6917,7 @@
    123418207    endif
    123428208    2match none
     
    123478213 
    123488214 "  call Dret("s:NetrwMarkFileTag")
    12349 @@ -6400,7 +6850,7 @@
     8215@@ -6400,7 +6931,7 @@
    123508216 "                            1=target directory is local
    123518217 fun! s:NetrwMarkFileTgt(islocal)
     
    123568222   let hadtgt = exists("s:netrwmftgt")
    123578223   if !exists("w:netrw_bannercnt")
    12358 @@ -6414,10 +6864,10 @@
     8224@@ -6414,10 +6945,10 @@
    123598225 "    call Decho("cursor in banner region, and target already is <".b:netrw_curdir.">: removing target")
    123608226     unlet s:netrwmftgt s:netrwmftgt_islocal
     
    123698235     return
    123708236    else
    12371 @@ -6454,10 +6904,10 @@
     8237@@ -6454,10 +6985,10 @@
    123728238   let s:netrwmftgt_islocal= a:islocal
    123738239 
     
    123828248    sil! keepj norm! j
    123838249   endif
    12384 @@ -6559,7 +7009,7 @@
     8250@@ -6559,7 +7090,7 @@
    123858251 " s:NetrwUnMarkFile: {{{2
    123868252 fun! s:NetrwUnMarkFile(islocal)
     
    123918257 
    123928258   " unmark marked file list (although I expect s:NetrwUpload()
    12393 @@ -6573,7 +7023,7 @@
     8259@@ -6573,7 +7104,7 @@
    123948260   endif
    123958261 
     
    124008266 endfun
    124018267 
    12402 @@ -6688,10 +7138,10 @@
     8268@@ -6688,10 +7219,10 @@
    124038269   let ykeep= @@
    124048270   if exists("s:netrwmarkfilelist_{bufnr('%')}")
     
    124138279   let @@= ykeep
    124148280 
    12415 @@ -6707,19 +7157,22 @@
     8281@@ -6707,19 +7238,22 @@
    124168282 "     choice = 2 : didn't save modified file, opened window
    124178283 "     choice = 3 : cancel open
     
    124408306    " if only one window, open a new one first
    124418307 "   call Decho("only one window, so open a new one (g:netrw_alto=".g:netrw_alto.")")
    12442 @@ -6732,68 +7185,73 @@
     8308@@ -6732,68 +7266,73 @@
    124438309 "    call Decho("exe ".(g:netrw_alto? "bel " : "abo ").winsz."wincmd s")
    124448310     exe (g:netrw_alto? "bel " : "abo ").winsz."wincmd s"
     
    125518417 
    125528418   " restore b:netrw_curdir (window split/enew may have lost it)
    12553 @@ -6806,7 +7264,7 @@
     8419@@ -6806,7 +7345,7 @@
    125548420    endif
    125558421   endif
     
    125608426 endfun
    125618427 
    12562 @@ -6855,7 +7313,7 @@
     8428@@ -6855,7 +7394,7 @@
    125638429 "   call Decho("handle uploading a list of files via scp")
    125648430    let curdir= getcwd()
     
    125698435     let args    = join(map(filelist,"shellescape(v:val, 1)"))
    125708436     if exists("g:netrw_port") && g:netrw_port != ""
    12571 @@ -6867,7 +7325,7 @@
     8437@@ -6867,7 +7406,7 @@
    125728438     let tgt     = substitute(a:tgt,'^scp://[^/]\+/\(.*\)$','\1','')
    125738439 "    call Decho("exe ".s:netrw_silentxfer."!".g:netrw_scp_cmd.shellescape(useport,1)." ".args." ".shellescape(machine.":".tgt,1))
     
    125788444    elseif a:tgt =~ '^ftp:'
    125798445     call s:NetrwMethod(a:tgt)
    12580 @@ -7035,7 +7493,7 @@
     8446@@ -7029,13 +7568,14 @@
     8447 fun! s:NetrwRefresh(islocal,dirname)
     8448 "  call Dfunc("NetrwRefresh(islocal<".a:islocal.">,dirname=".a:dirname.") hide=".g:netrw_hide." sortdir=".g:netrw_sort_direction)
     8449   " at the current time (Mar 19, 2007) all calls to NetrwRefresh() call NetrwBrowseChgDir() first.
     8450-  " (defunct) NetrwBrowseChgDir() may clear the display; hence a NetrwSavePosn() may not work if its placed here.
     8451-  " (defunct) Also, NetrwBrowseChgDir() now does a NetrwSavePosn() itself.
     8452   setl ma noro
    125818453 "  call Decho("setl ma noro")
    125828454 "  call Decho("clear buffer<".expand("%")."> with :%d")
    125838455   let ykeep      = @@
    125848456-  let screenposn = netrw#NetrwSavePosn()
     8457+
     8458+  " save the cursor position before refresh.
    125858459+  let screenposn = netrw#SavePosn()
     8460+"  call Decho("win#".winnr().": ".winheight(0)."x".winwidth(0)." curfile<".expand("%").">")
    125868461 "  call Decho("clearing buffer prior to refresh")
    125878462   sil! keepj %d
    125888463   if a:islocal
    12589 @@ -7043,7 +7501,7 @@
     8464@@ -7043,7 +7583,9 @@
    125908465   else
    125918466    keepj call s:NetrwBrowse(a:islocal,a:dirname)
    125928467   endif
    125938468-  keepj call netrw#NetrwRestorePosn(screenposn)
     8469+
     8470+  " restore position
    125948471+  keepj call netrw#RestorePosn(screenposn)
    125958472 
    125968473   " restore file marks
    125978474   if exists("s:netrwmarkfilemtch_{bufnr('%')}") && s:netrwmarkfilemtch_{bufnr("%")} != ""
    12598 @@ -7062,7 +7520,7 @@
     8475@@ -7062,7 +7604,7 @@
    125998476 " ---------------------------------------------------------------------
    126008477 " s:NetrwRefreshDir: refreshes a directory by name {{{2
     
    126058482 "  call Dfunc("s:NetrwRefreshDir(islocal=".a:islocal." dirname<".a:dirname.">) g:netrw_fastbrowse=".g:netrw_fastbrowse)
    126068483   if g:netrw_fastbrowse == 0
    12607 @@ -7087,7 +7545,7 @@
     8484@@ -7087,12 +7629,27 @@
    126088485 
    126098486   elseif g:netrw_fastbrowse <= 1
     
    126148491 "  call Dret("s:NetrwRefreshDir")
    126158492 endfun
    12616 @@ -7149,7 +7607,7 @@
     8493 
     8494 " ---------------------------------------------------------------------
     8495+" s:NetrwSetChgwin: set g:netrw_chgwin; a <cr> will use the specified
     8496+" window number to do its editing in.
     8497+" Supports   [count]C  where the count, if present, is used to specify
     8498+" a window to use for editing via the <cr> mapping.
     8499+fun! s:NetrwSetChgwin()
     8500+"  call Dfunc("s:NetrwSetChgwin() v:count=".v:count)
     8501+  if v:count > 0
     8502+   let g:netrw_chgwin= v:count
     8503+  else
     8504+   let g:netrw_chgwin= winnr()
     8505+  endif
     8506+"  call Dret("s:NetrwSetChgwin")
     8507+endfun
     8508+
     8509+" ---------------------------------------------------------------------
     8510 " s:NetrwSetSort: sets up the sort based on the g:netrw_sort_sequence {{{2
     8511 "          What this function does is to compute a priority for the patterns
     8512 "          in the g:netrw_sort_sequence.  It applies a substitute to any
     8513@@ -7149,7 +7706,7 @@
    126178514    let priority = priority + 1
    126188515   endwhile
     
    126238520   endif
    126248521 
    12625 @@ -7178,7 +7636,7 @@
     8522@@ -7178,7 +7735,7 @@
    126268523    " supports choosing a bookmark as a target using a qb-generated list
    126278524    let choice= a:choice - 1
     
    126328529     echomsg "Sorry, bookmark#".a:choice." doesn't exist!"
    126338530    endif
    12634 @@ -7188,7 +7646,7 @@
     8531@@ -7188,7 +7745,7 @@
    126358532    let choice= (a:choice % g:netrw_dirhistmax) + 1
    126368533    if exists("g:netrw_dirhist_".choice)
     
    126418538     echomsg "Sorry, history#".a:choice." not available!"
    126428539    endif
    12643 @@ -7202,12 +7660,12 @@
     8540@@ -7202,12 +7759,12 @@
    126448541 fun! s:NetrwSortStyle(islocal)
    126458542 "  call Dfunc("s:NetrwSortStyle(islocal=".a:islocal.") netrw_sort_by<".g:netrw_sort_by.">")
     
    126568553 "  call Dret("s:NetrwSortStyle : netrw_sort_by<".g:netrw_sort_by.">")
    126578554 endfun
    12658 @@ -7269,13 +7727,29 @@
     8555@@ -7229,6 +7786,7 @@
     8556   if a:mode == 0
     8557    " remote and o
     8558    let winsz= (g:netrw_winsize > 0)? (g:netrw_winsize*winheight(0))/100 : -g:netrw_winsize
     8559+   if winsz == 0|let winsz= ""|endif
     8560 "   call Decho("exe ".(g:netrw_alto? "bel " : "abo ").winsz."wincmd s")
     8561    exe (g:netrw_alto? "bel " : "abo ").winsz."wincmd s"
     8562    let s:didsplit= 1
     8563@@ -7249,6 +7807,7 @@
     8564   elseif a:mode == 2
     8565    " remote and v
     8566    let winsz= (g:netrw_winsize > 0)? (g:netrw_winsize*winwidth(0))/100 : -g:netrw_winsize
     8567+   if winsz == 0|let winsz= ""|endif
     8568 "   call Decho("exe ".(g:netrw_altv? "rightb " : "lefta ").winsz."wincmd v")
     8569    exe (g:netrw_altv? "rightb " : "lefta ").winsz."wincmd v"
     8570    let s:didsplit= 1
     8571@@ -7259,6 +7818,7 @@
     8572   elseif a:mode == 3
     8573    " local and o
     8574    let winsz= (g:netrw_winsize > 0)? (g:netrw_winsize*winheight(0))/100 : -g:netrw_winsize
     8575+   if winsz == 0|let winsz= ""|endif
     8576 "   call Decho("exe ".(g:netrw_alto? "bel " : "abo ").winsz."wincmd s")
     8577    exe (g:netrw_alto? "bel " : "abo ").winsz."wincmd s"
     8578    let s:didsplit= 1
     8579@@ -7269,18 +7829,35 @@
    126598580   elseif a:mode == 4
    126608581    " local and t
     
    126888609 
    126898610   elseif a:mode == 5
    12690 @@ -7322,7 +7796,7 @@
     8611    " local and v
     8612    let winsz= (g:netrw_winsize > 0)? (g:netrw_winsize*winwidth(0))/100 : -g:netrw_winsize
     8613+   if winsz == 0|let winsz= ""|endif
     8614 "   call Decho("exe ".(g:netrw_altv? "rightb " : "lefta ").winsz."wincmd v")
     8615    exe (g:netrw_altv? "rightb " : "lefta ").winsz."wincmd v"
     8616    let s:didsplit= 1
     8617@@ -7322,7 +7899,7 @@
    126918618      let ebmd= escape(bmd,g:netrw_menu_escape)
    126928619      " show bookmarks for goto menu
     
    126978624     endfor
    126988625    endif
    12699 @@ -7337,7 +7811,7 @@
     8626@@ -7337,7 +7914,7 @@
    127008627       let histentry  = g:netrw_dirhist_{histcnt}
    127018628       let ehistentry = escape(histentry,g:netrw_menu_escape)
     
    127068633      let histcnt = histcnt + 1
    127078634     endwhile
    12708 @@ -7350,60 +7824,57 @@
     8635@@ -7350,60 +7927,57 @@
    127098636 " s:NetrwTreeDir: determine tree directory given current cursor position {{{2
    127108637 " (full path directory with trailing slash returned)
     
    127998726 endfun
    128008727 
    12801 @@ -7440,7 +7911,7 @@
     8728@@ -7440,7 +8014,7 @@
    128028729   endif
    128038730 
     
    128088735 "  call Decho("display subtrees with depth<".depth."> and current leaves")
    128098736   for entry in w:netrw_treedict[a:dir]
    12810 @@ -7457,6 +7928,7 @@
     8737@@ -7457,6 +8031,7 @@
    128118738     sil! keepj call setline(line("$")+1,depth.entry)
    128128739    endif
     
    128168743 endfun
    128178744 
    12818 @@ -7466,7 +7938,8 @@
     8745@@ -7466,7 +8041,8 @@
    128198746   if w:netrw_liststyle == s:TREELIST
    128208747 "   call Dfunc("NetrwTreeListing() bufname<".expand("%").">")
     
    128268753    " update the treetop
    128278754 "   call Decho("update the treetop")
    12828 @@ -7485,7 +7958,7 @@
     8755@@ -7485,7 +8061,7 @@
    128298756 
    128308757    " update the directory listing for the current directory
     
    128358762    let w:netrw_treedict[a:dirname]= getline(w:netrw_bannercnt,line("$"))
    128368763 "   call Decho("w:treedict[".a:dirname."]= ".string(w:netrw_treedict[a:dirname]))
    12837 @@ -7498,9 +7971,19 @@
     8764@@ -7498,9 +8074,19 @@
    128388765     let fname= ""
    128398766    endif
     
    128518778+   endwhile
    128528779+
    12853 +   setl noma nomod ro
     8780+   exe "setl ".g:netrw_bufsettings
    128548781 
    128558782 "   call Dret("NetrwTreeListing : bufname<".expand("%").">")
    128568783    return
    12857 @@ -7508,6 +7991,44 @@
     8784@@ -7508,6 +8094,44 @@
    128588785 endfun
    128598786 
     
    129008827 fun! s:NetrwWideListing()
    129018828 
    12902 @@ -7544,7 +8065,9 @@
     8829@@ -7544,7 +8168,9 @@
    129038830    let newcolstart = w:netrw_bannercnt + fpc
    129048831    let newcolend   = newcolstart + fpc - 1
     
    129118838     if newcolend > line("$") | let newcolend= line("$") | endif
    129128839     let newcolqty= newcolend - newcolstart
    12913 @@ -7557,7 +8080,9 @@
     8840@@ -7557,13 +8183,15 @@
    129148841     exe "sil! keepj ".newcolstart.','.newcolend.'d'
    129158842     exe 'sil! keepj '.w:netrw_bannercnt
     
    129228849    keepj call histdel("/",-1)
    129238850    exe "nmap <buffer> <silent> w       /^\\\\|\\s\\s\\zs\\S/\<cr>"
    12924 @@ -7582,30 +8107,32 @@
     8851    exe "nmap <buffer> <silent> b       ?^\\\\|\\s\\s\\zs\\S?\<cr>"
     8852 "   call Decho("NetrwWideListing) setl noma nomod ro")
     8853-   setl noma nomod ro
     8854+   exe "setl ".g:netrw_bufsettings
     8855 "   call Decho("(NetrwWideListing) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
     8856 "   call Dret("NetrwWideListing")
     8857    return
     8858@@ -7582,30 +8210,32 @@
    129258859 " s:PerformListing: {{{2
    129268860 fun! s:PerformListing(islocal)
     
    129618895   endif
    129628896 
    12963 @@ -7614,7 +8141,7 @@
     8897@@ -7614,7 +8244,7 @@
    129648898 
    129658899   " Set up the banner {{{3
     
    129708904    keepj call setline(2,'" Netrw Directory Listing                                        (netrw '.g:loaded_netrw.')')
    129718905    if exists("g:netrw_bannerbackslash") && g:netrw_bannerbackslash
    12972 @@ -7628,6 +8155,7 @@
     8906@@ -7628,6 +8258,7 @@
    129738907    keepj 1
    129748908    let w:netrw_bannercnt= 1
     
    129788912   let sortby= g:netrw_sort_by
    129798913   if g:netrw_sort_direction =~ "^r"
    12980 @@ -7636,26 +8164,28 @@
     8914@@ -7636,26 +8267,28 @@
    129818915 
    129828916   " Sorted by... {{{3
     
    130118945     if s:netrwmftgt_islocal
    130128946      sil! keepj call setline(line("."),'"   Copy/Move Tgt: '.s:netrwmftgt.' (local)')
    13013 @@ -7664,14 +8194,14 @@
     8947@@ -7664,14 +8297,14 @@
    130148948     endif
    130158949     let w:netrw_bannercnt= w:netrw_bannercnt + 1
     
    130288962     if g:netrw_hide == 1
    130298963      keepj put ='\"   Hiding:        '.g:netrw_list_hide
    13030 @@ -7681,47 +8211,62 @@
     8964@@ -7681,47 +8314,62 @@
    130318965     let w:netrw_bannercnt= w:netrw_bannercnt + 1
    130328966    endif
     
    131019035        " normal direction sorting
    131029036        exe 'sil keepj '.w:netrw_bannercnt.',$sort'.' '.g:netrw_sort_options
    13103 @@ -7731,13 +8276,13 @@
     9037@@ -7731,13 +8379,13 @@
    131049038       endif
    131059039      endif
     
    131179051 "       call Decho('exe sil keepjumps '.w:netrw_bannercnt.',$sort')
    131189052        exe 'sil! keepj '.w:netrw_bannercnt.',$sort'.' '.g:netrw_sort_options
    13119 @@ -7751,149 +8296,306 @@
     9053@@ -7751,47 +8399,57 @@
    131209054     endif
    131219055 
     
    131839117 endfun
    131849118 
    13185 -" ---------------------------------------------------------------------
    13186 -" s:SetupNetrwStatusLine: {{{2
    13187 -fun! s:SetupNetrwStatusLine(statline)
    13188 -"  call Dfunc("SetupNetrwStatusLine(statline<".a:statline.">)")
    13189 +" ---------------------------------------------------------------------
    13190 +" s:SetupNetrwStatusLine: {{{2
    13191 +fun! s:SetupNetrwStatusLine(statline)
    13192 +"  call Dfunc("SetupNetrwStatusLine(statline<".a:statline.">)")
    13193 +
    13194 +  if !exists("s:netrw_setup_statline")
    13195 +   let s:netrw_setup_statline= 1
    13196 +"   call Decho("do first-time status line setup")
    13197 +
    13198 +   if !exists("s:netrw_users_stl")
    13199 +    let s:netrw_users_stl= &stl
    13200 +   endif
    13201 +   if !exists("s:netrw_users_ls")
    13202 +    let s:netrw_users_ls= &laststatus
    13203 +   endif
     9119@@ -7810,79 +8468,226 @@
     9120    if !exists("s:netrw_users_ls")
     9121     let s:netrw_users_ls= &laststatus
     9122    endif
     9123-
     9124-   " set up User9 highlighting as needed
     9125-   let keepa= @a
     9126-   redir @a
     9127-   try
     9128-    hi User9
     9129-   catch /^Vim\%((\a\+)\)\=:E411/
     9130-    if &bg == "dark"
     9131-     hi User9 ctermfg=yellow ctermbg=blue guifg=yellow guibg=blue
     9132-    else
     9133-     hi User9 ctermbg=yellow ctermfg=blue guibg=yellow guifg=blue
     9134-    endif
     9135-   endtry
     9136-   redir END
     9137-   let @a= keepa
    132049138+
    132059139+   " set up User9 highlighting as needed
     
    133429276+"   call Dret("NetrwRemoteFtpCmd")
    133439277+   return
    13344  
    13345 -  if !exists("s:netrw_setup_statline")
    13346 -   let s:netrw_setup_statline= 1
    13347 -"   call Decho("do first-time status line setup")
     9278+
    133489279+  ".........................................
    133499280+  else " {{{3
    133509281+   keepj call netrw#ErrorMsg(s:WARNING,"unable to comply with your request<" . bufname("%") . ">",23)
    133519282+  endif
    13352  
    13353 -   if !exists("s:netrw_users_stl")
    13354 -    let s:netrw_users_stl= &stl
    13355 -   endif
    13356 -   if !exists("s:netrw_users_ls")
    13357 -    let s:netrw_users_ls= &laststatus
     9283+
    133589284+  " cleanup for Windows " {{{3
    133599285+  if has("win32") || has("win95") || has("win64") || has("win16")
     
    133709296+    exe "sil! keepj ".w:netrw_bannercnt.',$s/^\%(\S\+\s\+\)\{8}//e'
    133719297+    keepj call histdel("/",-1)
    13372     endif
    13373 -
    13374 -   " set up User9 highlighting as needed
    13375 -   let keepa= @a
    13376 -   redir @a
    13377 -   try
    13378 -    hi User9
    13379 -   catch /^Vim\%((\a\+)\)\=:E411/
    13380 -    if &bg == "dark"
    13381 -     hi User9 ctermfg=yellow ctermbg=blue guifg=yellow guibg=blue
    13382 -    else
    13383 -     hi User9 ctermbg=yellow ctermfg=blue guibg=yellow guifg=blue
    13384 -    endif
    13385 -   endtry
    13386 -   redir END
    13387 -   let @a= keepa
     9298+   endif
    133889299   endif
    133899300 
     
    134779388   if exists("b:netrw_method")
    134789389 "   call Decho("setting w:netrw_method to b:netrw_method<".b:netrw_method.">")
    13479     let w:netrw_method= b:netrw_method
    13480    endif
    13481  
    13482 -  if s:method == "ftp"
    13483 +  if s:method == "ftp" || s:method == "sftp"
     9390@@ -7892,8 +8697,8 @@
     9391   if s:method == "ftp"
    134849392    " use ftp to get remote file listing {{{3
    134859393 "   call Decho("use ftp to get remote file listing")
     
    134919399     let listcmd= g:netrw_ftp_timelist_cmd
    134929400    elseif g:netrw_sort_by =~ '^s'
    13493 @@ -7903,6 +8605,20 @@
     9401@@ -7903,6 +8708,20 @@
    134949402    call s:NetrwRemoteFtpCmd(s:path,listcmd)
    134959403 "   exe "sil! keepalt keepj ".w:netrw_bannercnt.',$g/^./call Decho("raw listing: ".getline("."))'
     
    135129420     " shorten the listing
    135139421 "    call Decho("generate short listing")
    13514 @@ -7975,8 +8691,8 @@
     9422@@ -7944,7 +8763,7 @@
     9423     endif
     9424    endif
     9425 
     9426-  else
     9427+   else
     9428    " use ssh to get remote file listing {{{3
     9429 "   call Decho("use ssh to get remote file listing: s:path<".s:path.">")
     9430    let listcmd= s:MakeSshCmd(g:netrw_list_cmd)
     9431@@ -7975,8 +8794,8 @@
    135159432    endif
    135169433 
     
    135239440     keepj call histdel("/",-1)
    135249441    endif
    13525 @@ -8023,7 +8739,9 @@
     9442@@ -8023,7 +8842,9 @@
    135269443 "  if exists("w:netrw_bannercnt") && w:netrw_bannercnt <= line("$") " Decho
    135279444 "   exe "keepj ".w:netrw_bannercnt.',$g/^./call Decho("listing: ".getline("."))'
     
    135349451 
    135359452 " ---------------------------------------------------------------------
    13536 @@ -8031,7 +8749,7 @@
     9453@@ -8031,7 +8852,7 @@
    135379454 fun! s:NetrwRemoteRm(usrhost,path) range
    135389455 "  call Dfunc("s:NetrwRemoteRm(usrhost<".a:usrhost."> path<".a:path.">) virtcol=".virtcol("."))
     
    135439460   let all= 0
    135449461   if exists("s:netrwmarkfilelist_{bufnr('%')}")
    13545 @@ -8070,7 +8788,7 @@
     9462@@ -8070,7 +8891,7 @@
    135469463   " refresh the (remote) directory listing
    135479464 "  call Decho("refresh remote directory listing")
     
    135529469 "  call Dret("s:NetrwRemoteRm")
    135539470 endfun
    13554 @@ -8190,141 +8908,12 @@
     9471@@ -8190,141 +9011,12 @@
    135559472 endfun
    135569473 
     
    136959612   let rename_cmd = s:MakeSshCmd(g:netrw_rename_cmd)
    136969613 
    13697 @@ -8387,7 +8976,7 @@
     9614@@ -8387,7 +9079,7 @@
    136989615 
    136999616   " refresh the directory
     
    137049621 "  call Dret("NetrwRemoteRename")
    137059622 endfun
    13706 @@ -8439,9 +9028,9 @@
     9623@@ -8439,9 +9131,9 @@
    137079624   exe 'sil! bdelete '.plainfname
    137089625   exe 'keepalt file! '.plainfname
     
    137169633   exe "sil doau BufReadPost ".fname2396e
    137179634 endfun
    13718 @@ -8456,107 +9045,263 @@
     9635@@ -8456,107 +9148,263 @@
    137199636   " The &ft == "netrw" test was installed because the BufEnter event
    137209637   " would hit when re-entering netrw windows, creating unexpected
     
    140219938      else
    140229939       " normal file
    14023 @@ -8564,7 +9309,7 @@
     9940@@ -8564,7 +9412,7 @@
    140249941      endif
    140259942     elseif executable(filename)
     
    140309947     else
    140319948      " normal file
    14032 @@ -8575,45 +9320,45 @@
     9949@@ -8575,45 +9423,45 @@
    140339950     " normal file
    140349951     let pfile= filename
     
    1408610003    endif
    1408710004   endfor
    14088 @@ -8622,138 +9367,13 @@
     10005@@ -8622,138 +9470,13 @@
    1408910006   sil! keepj g/^$/d
    1409010007   sil! keepj %s/\r$//e
     
    1422610143 fun! s:NetrwLocalExecute(cmd)
    1422710144 "  call Dfunc("s:NetrwLocalExecute(cmd<".a:cmd.">)")
    14228 @@ -8769,7 +9389,7 @@
     10145@@ -8769,7 +9492,7 @@
    1422910146   let optargs= input(":!".a:cmd,"","file")
    1423010147 "  call Decho("optargs<".optargs.">")
     
    1423510152   " strip any ansi escape sequences off
    1423610153   let result = substitute(result,"\e\\[[0-9;]*m","","g")
    14237 @@ -8789,7 +9409,7 @@
     10154@@ -8789,7 +9512,7 @@
    1423810155   " preparation for removing multiple files/directories
    1423910156   let ykeep = @@
     
    1424410161   " rename files given by the markfilelist
    1424510162   if exists("s:netrwmarkfilelist_{bufnr('%')}")
    14246 @@ -8848,7 +9468,7 @@
     10163@@ -8848,7 +9571,7 @@
    1424710164   " refresh the directory
    1424810165 "  call Decho("refresh the directory listing")
     
    1425310170 
    1425410171 "  call Dret("NetrwLocalRename")
    14255 @@ -8864,7 +9484,7 @@
     10172@@ -8864,7 +9587,7 @@
    1425610173   let ykeep = @@
    1425710174   let ret   = 0
     
    1426210179   if exists("s:netrwmarkfilelist_{bufnr('%')}")
    1426310180    " remove all marked files
    14264 @@ -8911,7 +9531,7 @@
     10181@@ -8911,7 +9634,7 @@
    1426510182 "  call Decho("bufname<".bufname("%").">")
    1426610183   if bufname("%") != "NetrwMessage"
     
    1427110188   let @@= ykeep
    1427210189 
    14273 @@ -9007,31 +9627,26 @@
     10190@@ -9007,31 +9730,26 @@
    1427410191 " Support Functions: {{{1
    1427510192 
     
    1432010237    if exists("s:winBeforeErr")
    1432110238     exe s:winBeforeErr."wincmd w"
    14322 @@ -9044,7 +9659,7 @@
     10239@@ -9041,10 +9759,22 @@
     10240   if a:0 > 0
     10241    exe "keepj ".a:1
     10242   endif
     10243+"  call Decho("a:1             = ".((a:0 > 0)?              a:1       : 'n/a'))
     10244+"  call Decho("liststyle       = ".(exists("liststyle")?    liststyle : 'n/a'). " w:netrw_liststyle=".(exists("w:netrw_liststyle")? w:netrw_liststyle : 'n/a'))
     10245+  if exists("liststyle") && exists("w:netrw_liststyle") && liststyle != w:netrw_liststyle
     10246+   let usesrch= 1
     10247+  else
     10248+   let usesrch= 0
     10249+  endif
     10250+
     10251+"  call Decho("winh            = ".(exists("w:netrw_winh")?    w:netrw_winh    : -1))
     10252+"  call Decho("winw            = ".(exists("w:netrw_winw")?    w:netrw_winw    : -1))
     10253+"  call Decho("cur    winheight=".winheight(0)." winwidth=".winwidth(0))
     10254+"  call Decho("w:netrw_winfile = ".(exists("w:netrw_winfile")? w:netrw_winfile : 'n/a'))
    1432310255 
    1432410256   " restore window
     
    1432910261   endif
    1433010262   if v:shell_error == 0
    14331 @@ -9055,29 +9670,38 @@
     10263@@ -9055,64 +9785,111 @@
    1433210264 
    1433310265   " restore top-of-screen line
     
    1433910271 
    1434010272   " restore position
    14341    if exists("w:netrw_line") && exists("w:netrw_col")
     10273-  if exists("w:netrw_line") && exists("w:netrw_col")
    1434210274-"   call Decho("(NetrwRestorePosn) restore posn: exe keepj norm! ".w:netrw_line."G0".w:netrw_col."|")
    14343 +"   call Decho("restore posn: exe keepj norm! ".w:netrw_line."G0".w:netrw_col."|")
     10275+  " when the window's height x width has changed, the line,col is no longer useful
     10276+  if w:netrw_winh == winheight(0) && w:netrw_winw == winwidth(0) && exists("w:netrw_line") && exists("w:netrw_col") && !usesrch
     10277+"   call Decho("using posn: exe keepj norm! ".w:netrw_line."G0".w:netrw_col."|")
    1434410278    exe "keepj norm! ".w:netrw_line."G0".w:netrw_col."\<bar>"
     10279+
     10280+  elseif exists("w:netrw_winfile")
     10281+   if !search('\<'.escape(w:netrw_winfile,g:netrw_fname_escape),'cw')
     10282+    if exists("w:netrw_bannercnt")
     10283+"     call Decho("using bannercnt: win#".winnr()." ".winheight(0)."x".winwidth(0)." w:netrw_winfile<".w:netrw_winfile.">")
     10284+     exe "keepj ".w:netrw_bannercnt
     10285+     norm! 0
     10286+    else
     10287+     " go to upper left corner
     10288+"     call Decho("goto ulc: win#".winnr()." ".winheight(0)."x".winwidth(0)." w:netrw_winfile<".w:netrw_winfile.">")
     10289+     keepj 1
     10290+     norm! 0
     10291+    endif
     10292+   else
     10293+"    call Decho("used search: w:netrw_winfile<".w:netrw_winfile.">")
     10294+   endif
     10295+
     10296+  else
     10297+"   call Decho("goto ulc: win#".winnr()." ".winheight(0)."x".winwidth(0))
     10298+   keepj 1
     10299+   norm! 0
    1434510300   endif
    1434610301 
     
    1437210327-"  call Decho("(NetrwSavePosn) currently, win#".w:netrw_winnr." line#".w:netrw_line." col#".w:netrw_col)
    1437310328+"  call Decho("currently, win#".w:netrw_winnr." line#".w:netrw_line." col#".w:netrw_col)
     10329+
     10330+  " save filename under cursor
     10331+"  call Decho("line#".line(".")." w:netrw_bannercnt=".(exists("w:netrw_bannercnt")? w:netrw_bannercnt : 'n/a'))
     10332+  if exists("w:netrw_bannercnt") && line(".") >= w:netrw_bannercnt && &ft == "netrw"
     10333+   let winfile = "|let w:netrw_winfile='".s:NetrwGetWord()."'"
     10334+  else
     10335+   let winfile= ""
     10336+  endif
     10337+"  call Decho("winfile<".winfile.">")
     10338+  if exists("w:netrw_liststyle")
     10339+   let liststyle = "|let liststyle=".w:netrw_liststyle
     10340+  else
     10341+   let liststyle= ""
     10342+  endif
     10343+"  call Decho("liststyle=".liststyle)
    1437410344 
    1437510345   " Save top-of-screen line
    1437610346   keepj norm! H0
    14377 @@ -9086,33 +9710,29 @@
     10347   let w:netrw_hline= line(".")
     10348 
     10349+  " save up alternate position information
     10350+  " use this when window height x width has changed
     10351+  let w:netrw_winh = winheight(0)
     10352+  let w:netrw_winw = winwidth(0)
     10353+
    1437810354   " set up string holding position parameters
    14379    let ret          = "let w:netrw_winnr=".w:netrw_winnr."|let w:netrw_line=".w:netrw_line."|let w:netrw_col=".w:netrw_col."|let w:netrw_hline=".w:netrw_hline
     10355-  let ret          = "let w:netrw_winnr=".w:netrw_winnr."|let w:netrw_line=".w:netrw_line."|let w:netrw_col=".w:netrw_col."|let w:netrw_hline=".w:netrw_hline
     10356+  let ret          = "let w:netrw_winnr=".w:netrw_winnr."|let w:netrw_line=".w:netrw_line."|let w:netrw_col=".w:netrw_col."|let w:netrw_hline=".w:netrw_hline."|let w:netrw_winh=".w:netrw_winh."|let w:netrw_winw=".w:netrw_winw.liststyle.winfile
    1438010357 
    1438110358-  keepj call netrw#NetrwRestorePosn()
     
    1442810405 
    1442910406 " ---------------------------------------------------------------------
    14430 @@ -9179,7 +9799,7 @@
     10407@@ -9179,7 +9956,7 @@
    1443110408 "  call Dfunc("s:FileReadable(fname<".a:fname.">)")
    1443210409 
     
    1443710414    let ret= filereadable(a:fname)
    1443810415   endif
    14439 @@ -9205,7 +9825,7 @@
     10416@@ -9205,7 +9982,7 @@
    1444010417 
    1444110418    " sanity check -- does the temporary file's directory exist?
     
    1444610423 "    call Dret("s:GetTempfile getcwd<".getcwd().">")
    1444710424     return ""
    14448 @@ -9217,7 +9837,7 @@
     10425@@ -9217,7 +9994,7 @@
    1444910426 
    1445010427    " o/s dependencies
     
    1445510432     if !exists("+shellslash") || !&ssl
    1445610433      let tmpfile = substitute(tmpfile,'/','\','g')
    14457 @@ -9253,7 +9873,7 @@
     10434@@ -9253,7 +10030,7 @@
    1445810435    endif
    1445910436   endif
     
    1446410441   return tmpfile
    1446510442 endfun
    14466 @@ -9342,7 +9962,7 @@
     10443@@ -9263,7 +10040,11 @@
     10444 "               a correct command for use with a system() call
     10445 fun! s:MakeSshCmd(sshcmd)
     10446 "  call Dfunc("s:MakeSshCmd(sshcmd<".a:sshcmd.">) user<".s:user."> machine<".s:machine.">")
     10447-  let sshcmd = substitute(a:sshcmd,'\<HOSTNAME\>',s:user.s:machine,'')
     10448+  if s:user == ""
     10449+   let sshcmd = substitute(a:sshcmd,'\<HOSTNAME\>',s:machine,'')
     10450+  else
     10451+   let sshcmd = substitute(a:sshcmd,'\<HOSTNAME\>',s:user."@".s:machine,'')
     10452+  endif
     10453   if exists("g:netrw_port") && g:netrw_port != ""
     10454    let sshcmd= substitute(sshcmd,"USEPORT",g:netrw_sshport.' '.g:netrw_port,'')
     10455   elseif exists("s:port") && s:port != ""
     10456@@ -9342,7 +10123,7 @@
    1446710457    let &l:cursorcolumn = s:netrw_usercuc
    1446810458    if w:netrw_liststyle == s:WIDELIST
     
    1447310463 "    call Decho("case g:netrw_cursor==2 and not wide: (use user's cul,cuc)")
    1447410464     let &l:cursorline   = s:netrw_usercul
    14475 @@ -9361,7 +9981,7 @@
     10465@@ -9361,7 +10142,7 @@
    1447610466 " ---------------------------------------------------------------------
    1447710467 " s:RestoreCursorline: restores cursorline/cursorcolumn to original user settings {{{2
     
    1448210472    let &l:cursorline   = s:netrw_usercul
    1448310473   endif
    14484 @@ -9432,7 +10052,7 @@
     10474@@ -9430,9 +10211,9 @@
     10475   keepj call s:NetrwOptionRestore("w:")
     10476 "  call Decho("generate a buffer with keepjumps keepalt enew!")
    1448510477   let netrw_keepdiff= &l:diff
    14486    keepj keepalt enew!
     10478-  keepj keepalt enew!
     10479+  noswapfile keepj keepalt enew!
    1448710480   let &l:diff= netrw_keepdiff
    1448810481-"  call Decho("bufnr($)=".bufnr("$"))
     
    1449110484 
    1449210485   " copy function-local-variables to buffer variable equivalents
    14493 @@ -9459,7 +10079,7 @@
     10486@@ -9459,7 +10240,7 @@
    1449410487    if b:netrw_curdir =~ '/$'
    1449510488     if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST
     
    1450010493      nno <silent> <buffer> ]   :sil call <SID>TreeListMove(']')<cr>
    1450110494     else
    14502 @@ -9468,7 +10088,7 @@
     10495@@ -9468,7 +10249,7 @@
    1450310496    endif
    1450410497   endif
     
    1450910502 
    1451010503 " ---------------------------------------------------------------------
    14511 @@ -9499,6 +10119,43 @@
     10504@@ -9499,6 +10280,43 @@
    1451210505 "  call Dret("s:NetrwInsureWinVars win#".winnr())
    1451310506 endfun
     
    1453910532+    call s:NetrwOptionRestore("w:")
    1454010533+"    call Decho("setl noma nomod nowrap")
    14541 +    setl noma nomod nowrap
     10534+    exe "setl ".g:netrw_bufsettings
    1454210535+"    call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
    1454310536+    let a:newdir= dirname
     
    1455310546 " s:NetrwSaveWordPosn: used to keep cursor on same word after refresh, {{{2
    1455410547 " changed sorting, etc.  Also see s:NetrwRestoreWordPosn().
    14555 @@ -9537,13 +10194,19 @@
     10548@@ -9537,13 +10355,19 @@
    1455610549 fun! s:RemotePathAnalysis(dirname)
    1455710550 "  call Dfunc("s:RemotePathAnalysis(a:dirname<".a:dirname.">)")
     
    1456510558-  let s:port    = substitute(a:dirname,dirpat,'\4','')
    1456610559-  let s:path    = substitute(a:dirname,dirpat,'\5','')
     10560-  let s:fname   = substitute(a:dirname,'^.*/\ze.','','')
    1456710561+  let s:user    = substitute(a:dirname,dirpat,'\3','')
    1456810562+  let s:machine = substitute(a:dirname,dirpat,'\4','')
    1456910563+  let s:port    = substitute(a:dirname,dirpat,'\5','')
    1457010564+  let s:path    = substitute(a:dirname,dirpat,'\6','')
    14571    let s:fname   = substitute(a:dirname,'^.*/\ze.','','')
     10565+  let s:fname   = substitute(s:path,'^.*/\ze.','','')
    1457210566+  if s:machine =~ '@'
    1457310567+   let dirpat    = '^\(.*\)@\(.\{-}\)$'
     
    1457810572 "  call Decho("set up s:method <".s:method .">")
    1457910573 "  call Decho("set up s:user   <".s:user   .">")
    14580 @@ -9620,33 +10283,51 @@
     10574@@ -9620,33 +10444,51 @@
    1458110575    return
    1458210576   endif
     
    1463710631 "  call Dfunc("s:SaveBufVars() buf#".bufnr("%"))
    1463810632 
    14639 @@ -9717,42 +10398,48 @@
     10633@@ -9717,42 +10559,48 @@
    1464010634 endfun
    1464110635 
     
    1470810702 endfun
    1470910703 
    14710 @@ -9764,7 +10451,7 @@
     10704@@ -9764,7 +10612,7 @@
    1471110705   let prvline  = (line(".") > 1)?         getline(line(".")-1) : ''
    1471210706   let nxtline  = (line(".") < line("$"))? getline(line(".")+1) : ''
     
    1471710711 "  call Decho("curline  <".curline."> #".line("."))
    1471810712 "  call Decho("nxtline  <".nxtline."> #".line(".")+1)
    14719 @@ -9775,22 +10462,22 @@
     10713@@ -9775,22 +10623,22 @@
    1472010714 "   call Decho('regfile')
    1472110715    if     a:dir == '[' && prvline != ''
     
    1474410738     endif
    1474510739    endif
    14746 @@ -9798,11 +10485,11 @@
     10740@@ -9798,11 +10646,11 @@
    1474710741   elseif a:dir == ']' && nxtline != ''
    1474810742    keepj norm! $
     
    1476010754diff -Naur vim74.orig/runtime/autoload/netrwSettings.vim vim74/runtime/autoload/netrwSettings.vim
    1476110755--- vim74.orig/runtime/autoload/netrwSettings.vim       2013-05-03 19:53:43.000000000 +0000
    14762 +++ vim74/runtime/autoload/netrwSettings.vim    2014-04-27 05:20:57.241746894 +0000
     10756+++ vim74/runtime/autoload/netrwSettings.vim    2014-06-01 00:42:49.474209777 +0000
    1476310757@@ -1,7 +1,7 @@
    1476410758 " netrwSettings.vim: makes netrw settings simpler
     
    1479410788diff -Naur vim74.orig/runtime/autoload/netrw_gitignore.vim vim74/runtime/autoload/netrw_gitignore.vim
    1479510789--- vim74.orig/runtime/autoload/netrw_gitignore.vim     1970-01-01 00:00:00.000000000 +0000
    14796 +++ vim74/runtime/autoload/netrw_gitignore.vim  2014-04-27 05:20:57.245080310 +0000
     10790+++ vim74/runtime/autoload/netrw_gitignore.vim  2014-06-01 00:42:49.487543077 +0000
    1479710791@@ -0,0 +1,71 @@
    1479810792+" netrw_gitignore#Hide: gitignore-based hiding
     
    1486910863diff -Naur vim74.orig/runtime/autoload/phpcomplete.vim vim74/runtime/autoload/phpcomplete.vim
    1487010864--- vim74.orig/runtime/autoload/phpcomplete.vim 2011-12-08 15:38:25.000000000 +0000
    14871 +++ vim74/runtime/autoload/phpcomplete.vim      2014-04-27 05:20:57.248413727 +0000
    14872 @@ -1,27 +1,99 @@
     10865+++ vim74/runtime/autoload/phpcomplete.vim      2014-06-01 00:42:49.544209599 +0000
     10866@@ -1,27 +1,101 @@
    1487310867 " Vim completion script
    1487410868 " Language:    PHP
     
    1487710871+" Maintainer:  Dávid Szabó ( complex857 AT gmail DOT com )
    1487810872+" Previous Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
     10873+" URL: https://github.com/shawncplus/phpcomplete.vim
     10874+" Last Change:  2014 May 08
    1487910875 "
    1488010876-"   TODO:
     
    1490110897+"                      and generally not much more accurate then simple keyword completion.
    1490210898+"
    14903 +"              let     g:phpcomplete_search_tags_for_variables = 1/0 [default 0]
     10899+"              let g:phpcomplete_search_tags_for_variables = 1/0 [default 0]
    1490410900+"                      Enables use of tags when the plugin tries to find variables.
    1490510901+"                      When enabled the plugin will search for the variables in the tag files with kind 'v',
     
    1498410980 
    1498510981                if phpbegin == [0,0] && phpend == [0,0]
    14986 @@ -37,5116 +109,2449 @@
     10982@@ -37,5116 +111,2449 @@
    1498710983                        let start = col('.') - 1
    1498810984                        let curline = line('.')
     
    1502511021+               " chop of the "base" from the end of the current instruction
    1502611022+               if a:base != ""
    15027 +                       let context = substitute(context, '\s*\$\?\([a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\)*$', '', '')
     11023+                       let context = substitute(context, '\s*[$a-zA-Z_0-9\x7f-\xff]*$', '', '')
    1502811024+               end
    1502911025+       end
     
    2142517421+                       if line =~# '^\s*'.object.'\s*=\s*new\s\+'.class_name_pattern && !object_is_array
    2142617422+                               let classname_candidate = matchstr(line, object.'\c\s*=\s*new\s*\zs'.class_name_pattern.'\ze')
     17423+                               let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(classname_candidate, a:current_namespace, a:imports)
    2142717424+                               break
    2142817425+                       endif
     
    2143117428+                       if line =~# '^\s*'.object.'\s*=&\?\s*'.class_name_pattern.'\s*::\s*getInstance' && !object_is_array
    2143217429+                               let classname_candidate = matchstr(line, object.'\s*=&\?\s*\zs'.class_name_pattern.'\ze\s*::\s*getInstance')
     17430+                               let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(classname_candidate, a:current_namespace, a:imports)
    2143317431+                               break
    2143417432+                       endif
     
    2169417692+               return no_namespace_candidate
    2169517693+       endif
    21696 +endif
    21697 +
    2169817694+endfunction
    2169917695+" }}}
     
    2243018426diff -Naur vim74.orig/runtime/colors/README.txt vim74/runtime/colors/README.txt
    2243118427--- vim74.orig/runtime/colors/README.txt        2010-05-15 11:03:31.000000000 +0000
    22432 +++ vim74/runtime/colors/README.txt     2014-04-27 05:20:57.261747391 +0000
     18428+++ vim74/runtime/colors/README.txt     2014-06-01 00:42:49.970875179 +0000
    2243318429@@ -36,6 +36,14 @@
    2243418430 removed in your color scheme.  Use something like "gui=NONE" to remove the
     
    2244818444diff -Naur vim74.orig/runtime/colors/delek.vim vim74/runtime/colors/delek.vim
    2244918445--- vim74.orig/runtime/colors/delek.vim 2010-05-15 11:03:31.000000000 +0000
    22450 +++ vim74/runtime/colors/delek.vim      2014-04-27 05:20:57.261747391 +0000
     18446+++ vim74/runtime/colors/delek.vim      2014-06-01 00:42:50.027541702 +0000
    2245118447@@ -1,10 +1,10 @@
    2245218448 " Vim color file
     
    2247818474diff -Naur vim74.orig/runtime/colors/industry.vim vim74/runtime/colors/industry.vim
    2247918475--- vim74.orig/runtime/colors/industry.vim      1970-01-01 00:00:00.000000000 +0000
    22480 +++ vim74/runtime/colors/industry.vim   2014-04-27 05:20:57.265080808 +0000
     18476+++ vim74/runtime/colors/industry.vim   2014-06-01 00:42:50.067541600 +0000
    2248118477@@ -0,0 +1,40 @@
    2248218478+" Vim color file
     
    2252218518diff -Naur vim74.orig/runtime/compiler/gcc.vim vim74/runtime/compiler/gcc.vim
    2252318519--- vim74.orig/runtime/compiler/gcc.vim 2011-12-15 20:20:22.000000000 +0000
    22524 +++ vim74/runtime/compiler/gcc.vim      2014-04-27 05:20:57.275081056 +0000
     18520+++ vim74/runtime/compiler/gcc.vim      2014-06-01 00:42:50.447540632 +0000
    2252518521@@ -25,10 +25,10 @@
    2252618522       \%f:%l:\ %tarning:\ %m,
     
    2254018536diff -Naur vim74.orig/runtime/doc/autocmd.txt vim74/runtime/doc/autocmd.txt
    2254118537--- vim74.orig/runtime/doc/autocmd.txt  2013-08-10 11:24:52.000000000 +0000
    22542 +++ vim74/runtime/doc/autocmd.txt       2014-04-27 05:20:57.295081553 +0000
     18538+++ vim74/runtime/doc/autocmd.txt       2014-06-01 00:42:51.010872531 +0000
    2254318539@@ -1,4 +1,4 @@
    2254418540-*autocmd.txt*   For Vim version 7.4.  Last change: 2013 Aug 04
    22545 +*autocmd.txt*   For Vim version 7.4.  Last change: 2014 Jan 23
     18541+*autocmd.txt*   For Vim version 7.4.  Last change: 2014 May 02
    2254618542 
    2254718543 
     
    2257018566                                                        *CompleteDone*
    2257118567 CompleteDone                   After Insert mode completion is done.  Either
    22572 @@ -553,6 +562,9 @@
     18568@@ -553,11 +562,15 @@
    2257318569                                It is not allowed to change to another buffer
    2257418570                                here.  You can reload the buffer but not edit
     
    2258018576 FileChangedShell               When Vim notices that the modification time of
    2258118577                                a file has changed since editing started.
    22582 @@ -731,7 +743,7 @@
     18578                                Also when the file attributes of the file
     18579-                               change. |timestamp|
     18580+                               change or when the size of the file changes.
     18581+                               |timestamp|
     18582                                Mostly triggered after executing a shell
     18583                                command, but also with a |:checktime| command
     18584                                or when Gvim regains input focus.
     18585@@ -731,7 +744,7 @@
    2258318586                                command is run, before jumping to the first
    2258418587                                location. For |:cfile| and |:lfile| commands
     
    2259118594diff -Naur vim74.orig/runtime/doc/change.txt vim74/runtime/doc/change.txt
    2259218595--- vim74.orig/runtime/doc/change.txt   2013-08-10 11:24:52.000000000 +0000
    22593 +++ vim74/runtime/doc/change.txt        2014-04-27 05:20:57.295081553 +0000
     18596+++ vim74/runtime/doc/change.txt        2014-06-01 00:42:51.047539105 +0000
    2259418597@@ -1,4 +1,4 @@
    2259518598-*change.txt*    For Vim version 7.4.  Last change: 2013 Jul 17
     
    2266018663diff -Naur vim74.orig/runtime/doc/cmdline.txt vim74/runtime/doc/cmdline.txt
    2266118664--- vim74.orig/runtime/doc/cmdline.txt  2013-08-10 11:24:52.000000000 +0000
    22662 +++ vim74/runtime/doc/cmdline.txt       2014-04-27 05:20:57.298414969 +0000
     18665+++ vim74/runtime/doc/cmdline.txt       2014-06-01 00:42:51.080872353 +0000
    2266318666@@ -1,4 +1,4 @@
    2266418667-*cmdline.txt*   For Vim version 7.4.  Last change: 2013 Mar 16
     
    2271018713diff -Naur vim74.orig/runtime/doc/develop.txt vim74/runtime/doc/develop.txt
    2271118714--- vim74.orig/runtime/doc/develop.txt  2013-08-10 11:24:52.000000000 +0000
    22712 +++ vim74/runtime/doc/develop.txt       2014-04-27 05:20:57.298414969 +0000
     18715+++ vim74/runtime/doc/develop.txt       2014-06-01 00:42:51.124205576 +0000
    2271318716@@ -1,4 +1,4 @@
    2271418717-*develop.txt*   For Vim version 7.4.  Last change: 2013 Apr 27
     
    2272718730diff -Naur vim74.orig/runtime/doc/diff.txt vim74/runtime/doc/diff.txt
    2272818731--- vim74.orig/runtime/doc/diff.txt     2013-08-10 11:24:52.000000000 +0000
    22729 +++ vim74/runtime/doc/diff.txt  2014-04-27 05:20:57.301748385 +0000
     18732+++ vim74/runtime/doc/diff.txt  2014-06-01 00:42:51.130872226 +0000
    2273018733@@ -1,4 +1,4 @@
    2273118734-*diff.txt*      For Vim version 7.4.  Last change: 2013 Jul 07
    22732 +*diff.txt*      For Vim version 7.4.  Last change: 2013 Sep 20
     18735+*diff.txt*      For Vim version 7.4.  Last change: 2014 May 20
    2273318736 
    2273418737 
    2273518738                  VIM REFERENCE MANUAL    by Bram Moolenaar
     18739@@ -95,7 +95,7 @@
     18740 :difft[his]    Make the current window part of the diff windows.  This sets
     18741                the options like for "vimdiff".
     18742 
     18743-:diffp[atch] {patchfile}                                *E816* *:diffp* *:diffpatch*
     18744+:diffp[atch] {patchfile}                        *E816* *:diffp* *:diffpatch*
     18745                Use the current buffer, patch it with the diff found in
     18746                {patchfile} and open a buffer on the result.  The options are
     18747                set as for "vimdiff".
    2273618748@@ -123,10 +123,14 @@
    2273718749 file for a moment and come back to the same file and be in diff mode again.
     
    2275318765diff -Naur vim74.orig/runtime/doc/digraph.txt vim74/runtime/doc/digraph.txt
    2275418766--- vim74.orig/runtime/doc/digraph.txt  2013-08-10 11:24:52.000000000 +0000
    22755 +++ vim74/runtime/doc/digraph.txt       2014-04-27 05:20:57.301748385 +0000
     18767+++ vim74/runtime/doc/digraph.txt       2014-06-01 00:42:51.154205500 +0000
    2275618768@@ -1,4 +1,4 @@
    2275718769-*digraph.txt*   For Vim version 7.4.  Last change: 2011 Jan 15
    22758 +*digraph.txt*   For Vim version 7.4.  Last change: 2013 Dec 12
     18770+*digraph.txt*   For Vim version 7.4.  Last change: 2014 Apr 17
    2275918771 
    2276018772 
     
    2276918781        Percent sign            %       Greek/Cyrillic special
    2277018782        Plus                    +       smalls: Arabic, capitals: Hebrew
     18783@@ -1077,7 +1077,7 @@
     18784 âŠ¥    -T      22A5    8869    UP TACK
     18785 â‹
     18786        .P      22C5    8901    DOT OPERATOR
     18787 â‹®    :3      22EE    8942    VERTICAL ELLIPSIS
     18788-⋯       .3      22EF    8943    MIDLINE HORIZONTAL ELLIPSIS
     18789+⋯    .3      22EF    8943    MIDLINE HORIZONTAL ELLIPSIS
     18790 âŒ‚    Eh      2302    8962    HOUSE
     18791 âŒˆ    <7      2308    8968    LEFT CEILING
     18792 âŒ‰    >7      2309    8969    RIGHT CEILING
    2277118793diff -Naur vim74.orig/runtime/doc/editing.txt vim74/runtime/doc/editing.txt
    2277218794--- vim74.orig/runtime/doc/editing.txt  2013-08-10 11:24:53.000000000 +0000
    22773 +++ vim74/runtime/doc/editing.txt       2014-04-27 05:20:57.301748385 +0000
     18795+++ vim74/runtime/doc/editing.txt       2014-06-01 00:42:51.197538723 +0000
    2277418796@@ -1,4 +1,4 @@
    2277518797-*editing.txt*   For Vim version 7.4.  Last change: 2013 Aug 03
    22776 +*editing.txt*   For Vim version 7.4.  Last change: 2013 Nov 25
     18798+*editing.txt*   For Vim version 7.4.  Last change: 2014 May 02
    2277718799 
    2277818800 
     
    2278618808                                                        *:keepalt* *:keepa*
    2278718809 :keepalt {cmd}         Execute {cmd} while keeping the current alternate file
     18810@@ -1468,14 +1469,15 @@
     18811 ==============================================================================
     18812 10. Timestamps                                 *timestamp* *timestamps*
     18813 
     18814-Vim remembers the modification timestamp of a file when you begin editing it.
     18815-This is used to avoid that you have two different versions of the same file
     18816-(without you knowing this).
     18817-
     18818-After a shell command is run (|:!cmd| |suspend| |:read!| |K|) timestamps are
     18819-compared for all buffers in a window.   Vim will run any associated
     18820-|FileChangedShell| autocommands or display a warning for any files that have
     18821-changed.  In the GUI this happens when Vim regains input focus.
     18822+Vim remembers the modification timestamp, mode and size of a file when you
     18823+begin editing it.  This is used to avoid that you have two different versions
     18824+of the same file (without you knowing this).
     18825+
     18826+After a shell command is run (|:!cmd| |suspend| |:read!| |K|) timestamps,
     18827+file modes and file sizes are compared for all buffers in a window.   Vim will
     18828+run any associated |FileChangedShell| autocommands or display a warning for
     18829+any files that have changed.  In the GUI this happens when Vim regains input
     18830+focus.
     18831 
     18832                                                        *E321* *E462*
     18833 If you want to automatically reload a file when it has been changed outside of
    2278818834diff -Naur vim74.orig/runtime/doc/eval.txt vim74/runtime/doc/eval.txt
    2278918835--- vim74.orig/runtime/doc/eval.txt     2013-08-10 11:24:53.000000000 +0000
    22790 +++ vim74/runtime/doc/eval.txt  2014-04-27 05:20:57.308415217 +0000
     18836+++ vim74/runtime/doc/eval.txt  2014-06-01 00:42:51.230871971 +0000
    2279118837@@ -1,4 +1,4 @@
    2279218838-*eval.txt*     For Vim version 7.4.  Last change: 2013 Aug 03
    22793 +*eval.txt*     For Vim version 7.4.  Last change: 2014 Apr 06
     18839+*eval.txt*     For Vim version 7.4.  Last change: 2014 May 07
    2279418840 
    2279518841 
     
    2289518941                version 5.0 and 5.1 may have a patch 123, but these are
    2289618942                completely different.
    22897 @@ -1712,6 +1732,7 @@
     18943@@ -1696,6 +1716,8 @@
     18944 append( {lnum}, {list})                Number  append lines {list} below line {lnum}
     18945 argc()                         Number  number of files in the argument list
     18946 argidx()                       Number  current index in the argument list
     18947+arglistid( [{winnr}, [ {tabnr}]])
     18948+                               Number  argument list id
     18949 argv( {nr})                    String  {nr} entry of the argument list
     18950 argv( )                                List    the argument list
     18951 asin( {expr})                  Float   arc sine of {expr}
     18952@@ -1712,6 +1734,7 @@
    2289818953 bufwinnr( {expr})              Number  window number of buffer {expr}
    2289918954 byte2line( {byte})             Number  line number at byte count {byte}
     
    2290318958                                any     call {func} with arguments {arglist}
    2290418959 ceil( {expr})                  Float   round {expr} up
    22905 @@ -1735,7 +1756,7 @@
     18960@@ -1735,7 +1758,7 @@
    2290618961 cursor( {lnum}, {col} [, {coladd}])
    2290718962                                Number  move cursor to {lnum}, {col}, {coladd}
     
    2291218967 did_filetype()                 Number  TRUE if FileType autocommand event used
    2291318968 diff_filler( {lnum})           Number  diff filler lines about {lnum}
    22914 @@ -1745,6 +1766,7 @@
     18969@@ -1745,6 +1768,7 @@
    2291518970 eval( {string})                        any     evaluate {string} into its value
    2291618971 eventhandler( )                        Number  TRUE if inside an event handler
     
    2292018975 extend( {expr1}, {expr2} [, {expr3}])
    2292118976                                List/Dict insert items of {expr2} into {expr1}
    22922 @@ -1797,7 +1819,8 @@
     18977@@ -1784,10 +1808,11 @@
     18978 getcmdline()                   String  return the current command-line
     18979 getcmdpos()                    Number  return cursor position in command-line
     18980 getcmdtype()                   String  return the current command-line type
     18981+getcurpos()                    List    position of the cursor
     18982 getcwd()                       String  the current working directory
     18983+getfontname( [{name}])         String  name of font being used
     18984 getfperm( {fname})             String  file permissions of file {fname}
     18985 getfsize( {fname})             Number  size in bytes of file {fname}
     18986-getfontname( [{name}])         String  name of font being used
     18987 getftime( {fname})             Number  last modification time of file
     18988 getftype( {fname})             String  description of type of file {fname}
     18989 getline( {lnum})               String  line {lnum} of current buffer
     18990@@ -1797,7 +1822,8 @@
    2292318991 getpid()                       Number  process ID of Vim
    2292418992 getpos( {expr})                        List    position of cursor, mark, etc.
     
    2293018998 gettabvar( {nr}, {varname} [, {def}])
    2293118999                                any     variable {varname} in tab {nr} or {def}
    22932 @@ -1968,7 +1991,8 @@
     19000@@ -1809,7 +1835,7 @@
     19001                                any     variable {varname} in window {nr}
     19002 glob( {expr} [, {nosuf} [, {list}]])
     19003                                any     expand file wildcards in {expr}
     19004-globpath( {path}, {expr} [, {flag}])
     19005+globpath( {path}, {expr} [, {nosuf} [, {list}]])
     19006                                String  do glob({expr}) for all dirs in {path}
     19007 has( {feature})                        Number  TRUE if feature {feature} supported
     19008 has_key( {dict}, {key})                Number  TRUE if {dict} has entry {key}
     19009@@ -1968,7 +1994,8 @@
    2293319010                                Number  last index of {needle} in {haystack}
    2293419011 strtrans( {expr})              String  translate string to make it printable
     
    2294019017                                String  all {pat} in {expr} replaced with {sub}
    2294119018 synID( {lnum}, {col}, {trans}) Number  syntax ID at {lnum} and {col}
    22942 @@ -1978,6 +2002,7 @@
     19019@@ -1978,6 +2005,7 @@
    2294319020 synconcealed( {lnum}, {col})   List    info about concealing
    2294419021 synstack( {lnum}, {col})       List    stack of syntax IDs at {lnum} and {col}
     
    2294819025 tabpagenr( [{arg}])            Number  number of current or last tab page
    2294919026 tabpagewinnr( {tabarg}[, {arg}])
    22950 @@ -1995,6 +2020,8 @@
     19027@@ -1995,6 +2023,8 @@
    2295119028 type( {name})                  Number  type of variable {name}
    2295219029 undofile( {name})              String  undo file name for {name}
     
    2295719034 virtcol( {expr})               Number  screen column of cursor or mark
    2295819035 visualmode( [expr])            String  last visual mode used
    22959 @@ -2260,7 +2287,10 @@
     19036@@ -2076,6 +2106,18 @@
     19037 argidx()       The result is the current index in the argument list.  0 is
     19038                the first file.  argc() - 1 is the last one.  See |arglist|.
     19039 
     19040+                                                       *arglistid()*
     19041+arglistid([{winnr}, [ {tabnr} ]])
     19042+               Return the argument list ID.  This is a number which
     19043+               identifies the argument list being used.  Zero is used for the
     19044+               global argument list.
     19045+               Return zero if the arguments are invalid.
     19046+
     19047+               Without arguments use the current window.
     19048+               With {winnr} only use this window in the current tab page.
     19049+               With {winnr} and {tabnr} use the window in the specified tab
     19050+               page.
     19051+
     19052                                                        *argv()*
     19053 argv([{nr}])   The result is the {nr}th file in the argument list of the
     19054                current window.  See |arglist|.  "argv(0)" is the first one.
     19055@@ -2260,7 +2302,10 @@
    2296019056                {expr}.  Use zero for the first character, it returns zero.
    2296119057                This function is only useful when there are multibyte
     
    2296919065                        echo matchstr(str, ".", byteidx(str, 3))
    2297019066 <              will display the fourth character.  Another way to do the
    22971 @@ -2269,7 +2299,20 @@
     19067@@ -2269,7 +2314,20 @@
    2297219068                        echo strpart(s, 0, byteidx(s, 1))
    2297319069 <              If there are less than {nr} characters -1 is returned.
     
    2299119087 call({func}, {arglist} [, {dict}])                     *call()* *E699*
    2299219088                Call function {func} with the items in |List| {arglist} as
    22993 @@ -2671,6 +2714,15 @@
     19089@@ -2544,9 +2602,14 @@
     19090 cursor({list})
     19091                Positions the cursor at the column (byte count) {col} in the
     19092                line {lnum}.  The first column is one.
     19093+
     19094                When there is one argument {list} this is used as a |List|
     19095-               with two or three items {lnum}, {col} and {off}.  This is like
     19096-               the return value of |getpos()|, but without the first item.
     19097+               with two, three or four item:
     19098+                       [{lnum}, {col}, {off}]
     19099+                       [{lnum}, {col}, {off}, {curswant}]
     19100+               This is like the return value of |getpos()| or |getcurpos|,
     19101+               but without the first item.
     19102+
     19103                Does not change the jumplist.
     19104                If {lnum} is greater than the number of lines in the buffer,
     19105                the cursor will be positioned at the last line in the buffer.
     19106@@ -2555,6 +2618,8 @@
     19107                the cursor will be positioned at the last character in the
     19108                line.
     19109                If {col} is zero, the cursor will stay in the current column.
     19110+               If {curswant} is given it is used to set the preferred column
     19111+               for vertical movment.  Otherwise {col} is used.
     19112                When 'virtualedit' is used {off} specifies the offset in
     19113                screen columns from the start of the character.  E.g., a
     19114                position within a <Tab> or after the last character.
     19115@@ -2671,6 +2736,15 @@
    2299419116                        0       does not exist
    2299519117                        -1      not implemented on this system
     
    2300719129 exists({expr}) The result is a Number, which is non-zero if {expr} is
    2300819130                defined, zero otherwise.  The {expr} argument is a string,
    23009 @@ -2789,7 +2841,7 @@
     19131@@ -2683,7 +2757,8 @@
     19132                                        string)
     19133                        *funcname       built-in function (see |functions|)
     19134                                        or user defined function (see
     19135-                                       |user-functions|).
     19136+                                       |user-functions|). Also works for a
     19137+                                       variable that is a Funcref.
     19138                        varname         internal variable (see
     19139                                        |internal-variables|).  Also works
     19140                                        for |curly-braces-names|, |Dictionary|
     19141@@ -2789,7 +2864,7 @@
    2301019142                        <afile>         autocmd file name
    2301119143                        <abuf>          autocmd buffer number (as a String!)
     
    2301619148                        <cword>         word under the cursor
    2301719149                        <cWORD>         WORD under the cursor
    23018 @@ -3175,7 +3227,7 @@
     19150@@ -3175,7 +3250,7 @@
    2301919151                If [expr] is 1, only check if a character is available, it is
    2302019152                        not consumed.  Return zero if no character available.
     
    2302519157                result is a number.  Use nr2char() to convert it to a String.
    2302619158                Otherwise a String is returned with the encoded character.
    23027 @@ -3185,7 +3237,7 @@
     19159@@ -3185,7 +3260,7 @@
    2302819160                String when a modifier (shift, control, alt) was used that is
    2302919161                not included in the character.
     
    2303419166                Use nr2char() to convert it to a String.
    2303519167 
    23036 @@ -3417,7 +3469,7 @@
     19168@@ -3268,6 +3343,17 @@
     19169                Returns an empty string otherwise.
     19170                Also see |getcmdpos()|, |setcmdpos()| and |getcmdline()|.
     19171 
     19172+                                                       *getcurpos()*
     19173+getcurpos()    Get the position of the cursor.  This is like getpos('.'), but
     19174+               includes an extra item in the list:
     19175+                   [bufnum, lnum, col, off, curswant]
     19176+               The "curswant" number is the preferred column when moving the
     19177+               cursor vertically.
     19178+               This can be used to save and restore the cursor position: >
     19179+                       let save_cursor = getcurpos()
     19180+                       MoveTheCursorAround
     19181+                       call setpos('.', save_cursor)
     19182+
     19183                                                        *getcwd()*
     19184 getcwd()       The result is a String, which is the name of the current
     19185                working directory.
     19186@@ -3417,7 +3503,7 @@
    2303719187                        :endfor
    2303819188 
     
    2304319193                {regname}.  Example: >
    2304419194                        :let cliptext = getreg('*')
    23045 @@ -3426,6 +3478,11 @@
     19195@@ -3426,6 +3512,11 @@
    2304619196                getreg('=', 1) returns the expression itself, so that it can
    2304719197                be restored with |setreg()|.  For other registers the extra
     
    2305519205 
    2305619206 
    23057 @@ -3435,7 +3492,7 @@
     19207@@ -3435,7 +3526,7 @@
    2305819208                    "v"                 for |characterwise| text
    2305919209                    "V"                 for |linewise| text
     
    2306419214                If {regname} is not specified, |v:register| is used.
    2306519215 
    23066 @@ -4109,6 +4166,8 @@
     19216@@ -3513,11 +3604,12 @@
     19217                See |expand()| for expanding special Vim variables.  See
     19218                |system()| for getting the raw output of an external command.
     19219 
     19220-globpath({path}, {expr} [, {flag}])                    *globpath()*
     19221+globpath({path}, {expr} [, {nosuf} [, {list}]])                        *globpath()*
     19222                Perform glob() on all directories in {path} and concatenate
     19223                the results.  Example: >
     19224                        :echo globpath(&rtp, "syntax/c.vim")
     19225-<              {path} is a comma-separated list of directory names.  Each
     19226+<
     19227+               {path} is a comma-separated list of directory names.  Each
     19228                directory name is prepended to {expr} and expanded like with
     19229                |glob()|.  A path separator is inserted when needed.
     19230                To add a comma inside a directory name escape it with a
     19231@@ -3525,11 +3617,19 @@
     19232                trailing backslash, remove it if you put a comma after it.
     19233                If the expansion fails for one of the directories, there is no
     19234                error message.
     19235-               Unless the optional {flag} argument is given and is non-zero,
     19236+
     19237+               Unless the optional {nosuf} argument is given and is non-zero,
     19238                the 'suffixes' and 'wildignore' options apply: Names matching
     19239                one of the patterns in 'wildignore' will be skipped and
     19240                'suffixes' affect the ordering of matches.
     19241 
     19242+               When {list} is present and it is non-zero the result is a List
     19243+               with all matching files. The advantage of using a List is, you
     19244+               also get filenames containing newlines correctly. Otherwise
     19245+               the result is a String and when there are several matches,
     19246+               they are separated by <NL> characters.  Example: >
     19247+                       :echo globpath(&rtp, "syntax/c.vim", 0, 1)
     19248+<
     19249                The "**" item can be used to search in a directory tree.
     19250                For example, to find all "README.txt" files in the directories
     19251                in 'runtimepath' and below: >
     19252@@ -4109,6 +4209,8 @@
    2306719253                                     (|mapmode-ic|)
    2306819254                  "sid"      The script local ID, used for <sid> mappings
     
    2307319259                The mappings local to the current buffer are checked first,
    2307419260                then the global mappings.
    23075 @@ -4210,6 +4269,9 @@
     19261@@ -4210,6 +4312,9 @@
    2307619262                "match").  It will be highlighted with {group}.  Returns an
    2307719263                identification number (ID), which can be used to delete the
     
    2308319269                The optional {priority} argument assigns a priority to the
    2308419270                match.  A match with a high priority will have its
    23085 @@ -4419,6 +4481,9 @@
     19271@@ -4408,7 +4513,8 @@
     19272 
     19273                                                        *getpos()*
     19274 getpos({expr}) Get the position for {expr}.  For possible values of {expr}
     19275-               see |line()|.
     19276+               see |line()|.  For getting the cursor position see
     19277+               |getcurpos()|.
     19278                The result is a |List| with four numbers:
     19279                    [bufnum, lnum, col, off]
     19280                "bufnum" is zero, unless a mark like '0 or 'A is used, then it
     19281@@ -4419,11 +4525,14 @@
    2308619282                it is the offset in screen columns from the start of the
    2308719283                character.  E.g., a position within a <Tab> or after the last
    2308819284                character.
     19285-               This can be used to save and restore the cursor position: >
     19286-                       let save_cursor = getpos(".")
     19287-                       MoveTheCursorAround
     19288-                       call setpos('.', save_cursor)
     19289-<              Also see |setpos()|.
    2308919290+               Note that for '< and '> Visual mode matters: when it is "V"
    2309019291+               (visual line mode) the column of '< is zero and the column of
    2309119292+               '> is a large number.
    23092                 This can be used to save and restore the cursor position: >
    23093                         let save_cursor = getpos(".")
    23094                         MoveTheCursorAround
    23095 @@ -5242,6 +5307,10 @@
     19293+               This can be used to save and restore the position of a mark: >
     19294+                       let save_a_mark = getpos("'a")
     19295+                       ...
     19296+                       call setpos(''a', save_a_mark
     19297+<              Also see |getcurpos()| and |setpos()|.
     19298 
     19299 or({expr}, {expr})                                     *or()*
     19300                Bitwise OR on the two arguments.  The arguments are converted
     19301@@ -5223,8 +5332,9 @@
     19302                        .       the cursor
     19303                        'x      mark x
     19304 
     19305-               {list} must be a |List| with four numbers:
     19306+               {list} must be a |List| with four or five numbers:
     19307                    [bufnum, lnum, col, off]
     19308+                   [bufnum, lnum, col, off, curswant]
     19309 
     19310                "bufnum" is the buffer number.  Zero can be used for the
     19311                current buffer.  Setting the cursor is only possible for
     19312@@ -5242,13 +5352,26 @@
    2309619313                character.  E.g., a position within a <Tab> or after the last
    2309719314                character.
    2309819315 
     19316+               The "curswant" number is only used when setting the cursor
     19317+               position.  It sets the preferred column for when moving the
     19318+               cursor vertically.  When the "curswant" number is missing the
     19319+               preferred column is not set.  When it is present and setting a
     19320+               mark position it is not used.
     19321+
    2309919322+               Note that for '< and '> changing the line number may result in
    2310019323+               the marks to be effectively be swapped, so that '< is always
     
    2310419327                An error message is given if {expr} is invalid.
    2310519328 
    23106 @@ -5300,6 +5369,8 @@
     19329-               Also see |getpos()|
     19330+               Also see |getpos()| and |getcurpos()|.
     19331 
     19332                This does not restore the preferred column for moving
     19333-               vertically.  See |winrestview()| for that.
     19334+               vertically; if you set the cursor position with this, |j| and
     19335+               |k| motions will jump to previous columns!  Use |cursor()| to
     19336+               also set the preferred column.  Also see the "curswant" key in
     19337+               |winrestview()|.
     19338 
     19339 
     19340 setqflist({list} [, {action}])                         *setqflist()*
     19341@@ -5300,6 +5423,8 @@
    2310719342                                                        *setreg()*
    2310819343 setreg({regname}, {value} [,{options}])
     
    2311319348                then the value is appended.
    2311419349                {options} can also contain a register type specification:
    23115 @@ -5312,10 +5383,15 @@
     19350@@ -5312,10 +5437,15 @@
    2311619351                in the longest line (counting a <Tab> as 1 character).
    2311719352 
     
    2313319368                Examples: >
    2313419369                        :call setreg(v:register, @*)
    23135 @@ -5323,8 +5399,11 @@
     19370@@ -5323,8 +5453,11 @@
    2313619371                        :call setreg('a', "1\n2\n3", 'b5')
    2313719372 
     
    2314719382                            ....
    2314819383                        :call setreg('a', var_a, var_amode)
    23149 @@ -5390,6 +5469,7 @@
     19384@@ -5390,6 +5523,7 @@
    2315019385 <              This results in a directory listing for the file under the
    2315119386                cursor.  Example of use with |system()|: >
     
    2315519390 
    2315619391 shiftwidth()                                           *shiftwidth()*
    23157 @@ -5449,20 +5529,26 @@
     19392@@ -5449,20 +5583,26 @@
    2315819393 
    2315919394 
     
    2318619421                        func MyCompare(i1, i2)
    2318719422                           return a:i1 == a:i2 ? 0 : a:i1 > a:i2 ? 1 : -1
    23188 @@ -5604,7 +5690,7 @@
     19423@@ -5604,7 +5744,7 @@
    2318919424 
    2319019425 strdisplaywidth({expr}[, {col}])                       *strdisplaywidth()*
     
    2319519430                screen column where to start.  This matters for Tab
    2319619431                characters.
    23197 @@ -5729,12 +5815,23 @@
     19432@@ -5729,12 +5869,23 @@
    2319819433                Ambiguous, this function's return value depends on 'ambiwidth'.
    2319919434                Also see |strlen()|, |strdisplaywidth()| and |strchars()|.
     
    2322019455                        :s/\d\+/\=submatch(0) + 1/
    2322119456 <              This finds the first number in the line and adds one to it.
    23222 @@ -5867,19 +5964,29 @@
     19457@@ -5867,19 +6018,29 @@
    2322319458                valid positions.
    2322419459 
     
    2325919494 <              To make the result more system-independent, the shell output
    2326019495                is filtered to replace <CR> with <NL> for Macintosh, and
    23261 @@ -5906,6 +6013,16 @@
     19496@@ -5906,6 +6067,16 @@
    2326219497                Use |:checktime| to force a check.
    2326319498 
     
    2327619511                The result is a |List|, where each item is the number of the
    2327719512                buffer associated with each window in the current tab page.
    23278 @@ -5928,7 +6045,7 @@
     19513@@ -5928,7 +6099,7 @@
    2327919514                The number can be used with the |:tab| command.
    2328019515 
     
    2328519520                {tabarg} specifies the number of tab page to be used.
    2328619521                {arg} is used like with |winnr()|:
    23287 @@ -6128,6 +6245,14 @@
     19522@@ -6128,6 +6299,14 @@
    2328819523                                blocks.  Each item may again have an "alt"
    2328919524                                item.
     
    2330019535                Return a |List| with all the values of {dict}.  The |List| is
    2330119536                in arbitrary order.
    23302 @@ -6330,13 +6455,23 @@
     19537@@ -6257,6 +6436,16 @@
     19538 winrestview({dict})
     19539                Uses the |Dictionary| returned by |winsaveview()| to restore
     19540                the view of the current window.
     19541+               Note: The {dict} does not have to contain all values, that are
     19542+               returned by |winsaveview()|. If values are missing, those
     19543+               settings won't be restored. So you can use: >
     19544+                   :call winrestview({'curswant': 4})
     19545+<
     19546+               This will only set the curswant value (the column the cursor
     19547+               wants to move on vertical movements) of the cursor to column 5
     19548+               (yes, that is 5), while all other settings will remain the
     19549+               same. This is useful, if you set the cursor position manually.
     19550+
     19551                If you have changed the values the result is unpredictable.
     19552                If the window size changed the result won't be the same.
     19553 
     19554@@ -6271,7 +6460,9 @@
     19555                not opened when moving around.
     19556                The return value includes:
     19557                        lnum            cursor line number
     19558-                       col             cursor column
     19559+                       col             cursor column (Note: the first column
     19560+                                       zero, as opposed to what getpos()
     19561+                                       returns)
     19562                        coladd          cursor column offset for 'virtualedit'
     19563                        curswant        column for vertical movement
     19564                        topline         first line in the window
     19565@@ -6330,13 +6521,24 @@
    2330319566     Example: >
    2330419567        :if has("gui_running")
     
    2331419577-<   Note that it's possible for patch 147 to be omitted even though 148 is
    2331519578+<    Note that it's possible for patch 147 to be omitted even though 148 is
     19579+    included.
     19580+
     19581+4.  Beyond a certain version or at a certain version and including a specific
     19582+    patch.  The "patch-7.4.237" feature means that the Vim version is 7.5 or
     19583+    later, or it is version 7.4 and patch 237 was included.
     19584+    Note that this only works for patch 7.4.237 and later, before that you
     19585+    need to use the example above that checks v:version.  Example: >
     19586+       :if has("patch-7.4.248")
     19587+<    Note that it's possible for patch 147 to be omitted even though 148 is
    2331619588     included.
    2331719589 
    23318 +4.  Beyond a certain version or at a certain version and including a specific
    23319 +    patch.  The "patch-7.4.123" feature means that the Vim version is 7.5 or
    23320 +    later, or it is version 7.4 and patch 123 was included.
    23321 +    The example above can be simplified to: >
    23322 +       :if has("patch-6.2.148")
    23323 +<    Note that it's possible for patch 147 to be omitted even though 148 is
    23324 +    included.
    23325 +
    2332619590+acl                    Compiled with |ACL| support.
    2332719591 all_builtin_terms      Compiled with all builtin terminals enabled.
    2332819592 amiga                  Amiga version of Vim.
    2332919593 arabic                 Compiled with Arabic support |Arabic|.
    23330 @@ -6503,7 +6638,9 @@
     19594@@ -6503,7 +6705,9 @@
    2333119595 writebackup            Compiled with 'writebackup' default on.
    2333219596 xfontset               Compiled with X fontset support |xfontset|.
     
    2333919603 xsmp_interact          Compiled with interactive X session management support.
    2334019604 xterm_clipboard                Compiled with support for xterm clipboard.
    23341 @@ -6580,7 +6717,8 @@
     19605@@ -6553,6 +6757,8 @@
     19606 and autocommands defined in the script.  It is also possible to call the
     19607 function from a mapping defined in the script, but then |<SID>| must be used
     19608 instead of "s:" when the mapping is expanded outside of the script.
     19609+There are only script-local functions, no buffer-local or window-local
     19610+functions.
     19611 
     19612                                        *:fu* *:function* *E128* *E129* *E123*
     19613 :fu[nction]            List all functions and their arguments.
     19614@@ -6576,11 +6782,15 @@
     19615 <
     19616 See |:verbose-cmd| for more information.
     19617 
     19618-                                                       *E124* *E125* *E853*
     19619+                                               *E124* *E125* *E853* *E884*
    2334219620 :fu[nction][!] {name}([arguments]) [range] [abort] [dict]
    2334319621                        Define a new function by the name {name}.  The name
    2334419622                        must be made of alphanumeric characters and '_', and
    2334519623-                       must start with a capital or "s:" (see above).
    23346 +                       must start with a capital or "s:" (see above).  When
    23347 +                       using a capital "g:" be prepended.
     19624+                       must start with a capital or "s:" (see above).  Note
     19625+                       that using "b:" or "g:" is not allowed. (since patch
     19626+                       7.4.260 E884 is given if the function name has a colon
     19627+                       in the name, e.g. for "foo:bar()".  Before that patch
     19628+                       no error was given).
    2334819629 
    2334919630                        {name} can also be a |Dictionary| entry that is a
    2335019631                        |Funcref|: >
    23351 @@ -6599,7 +6737,7 @@
     19632@@ -6599,7 +6809,7 @@
    2335219633 
    2335319634                        For the {arguments} see |function-argument|.
     
    2335819639                        expected to take care of a range itself.  The range is
    2335919640                        passed as "a:firstline" and "a:lastline".  If [range]
    23360 @@ -6608,10 +6746,10 @@
     19641@@ -6608,10 +6818,10 @@
    2336119642                        of each line.  See |function-range-example|.
    2336219643                        The cursor is still moved to the first line of the
     
    2337119652                        be invoked through an entry in a |Dictionary|.  The
    2337219653                        local variable "self" will then be set to the
    23373 @@ -7273,6 +7411,8 @@
     19654@@ -7273,6 +7483,8 @@
    2337419655                        {pattern}, so long as it does not have a special
    2337519656                        meaning (e.g., '|' or '"') and doesn't occur inside
     
    2338019661                        an error message because it may vary in different
    2338119662                        locales.
    23382 @@ -7416,13 +7556,22 @@
     19663@@ -7416,13 +7628,22 @@
    2338319664                        for Vim commands, |shellescape()| for |:!| commands.
    2338419665                        Examples: >
     
    2341019691diff -Naur vim74.orig/runtime/doc/filetype.txt vim74/runtime/doc/filetype.txt
    2341119692--- vim74.orig/runtime/doc/filetype.txt 2013-08-10 11:24:53.000000000 +0000
    23412 +++ vim74/runtime/doc/filetype.txt      2014-04-27 05:20:57.315082050 +0000
     19693+++ vim74/runtime/doc/filetype.txt      2014-06-01 00:42:51.354204990 +0000
    2341319694@@ -1,4 +1,4 @@
    2341419695-*filetype.txt*  For Vim version 7.4.  Last change: 2013 May 25
     
    2344819729diff -Naur vim74.orig/runtime/doc/fold.txt vim74/runtime/doc/fold.txt
    2344919730--- vim74.orig/runtime/doc/fold.txt     2013-08-10 11:24:53.000000000 +0000
    23450 +++ vim74/runtime/doc/fold.txt  2014-04-27 05:20:57.315082050 +0000
     19731+++ vim74/runtime/doc/fold.txt  2014-06-01 00:42:51.370871615 +0000
    2345119732@@ -1,4 +1,4 @@
    2345219733-*fold.txt*      For Vim version 7.4.  Last change: 2010 May 13
     
    2347119752diff -Naur vim74.orig/runtime/doc/gui.txt vim74/runtime/doc/gui.txt
    2347219753--- vim74.orig/runtime/doc/gui.txt      2013-08-10 11:24:53.000000000 +0000
    23473 +++ vim74/runtime/doc/gui.txt   2014-04-27 05:20:57.318415466 +0000
     19754+++ vim74/runtime/doc/gui.txt   2014-06-01 00:42:51.410871513 +0000
    2347419755@@ -1,4 +1,4 @@
    2347519756-*gui.txt*       For Vim version 7.4.  Last change: 2013 Jun 12
     
    2350119782diff -Naur vim74.orig/runtime/doc/gui_x11.txt vim74/runtime/doc/gui_x11.txt
    2350219783--- vim74.orig/runtime/doc/gui_x11.txt  2013-08-10 11:24:54.000000000 +0000
    23503 +++ vim74/runtime/doc/gui_x11.txt       2014-04-27 05:20:57.318415466 +0000
     19784+++ vim74/runtime/doc/gui_x11.txt       2014-06-01 00:42:51.460871386 +0000
    2350419785@@ -1,4 +1,4 @@
    2350519786-*gui_x11.txt*   For Vim version 7.4.  Last change: 2011 Sep 14
     
    2351919800diff -Naur vim74.orig/runtime/doc/if_lua.txt vim74/runtime/doc/if_lua.txt
    2352019801--- vim74.orig/runtime/doc/if_lua.txt   2013-08-10 11:24:55.000000000 +0000
    23521 +++ vim74/runtime/doc/if_lua.txt        2014-04-27 05:20:57.321748882 +0000
     19802+++ vim74/runtime/doc/if_lua.txt        2014-06-01 00:42:51.564204456 +0000
    2352219803@@ -1,4 +1,4 @@
    2352319804-*if_lua.txt*    For Vim version 7.4.  Last change: 2012 Jun 29
     
    2353719818diff -Naur vim74.orig/runtime/doc/if_perl.txt vim74/runtime/doc/if_perl.txt
    2353819819--- vim74.orig/runtime/doc/if_perl.txt  2013-08-10 11:24:55.000000000 +0000
    23539 +++ vim74/runtime/doc/if_perl.txt       2014-04-27 05:20:57.325082297 +0000
     19820+++ vim74/runtime/doc/if_perl.txt       2014-06-01 00:42:51.620870978 +0000
    2354019821@@ -1,4 +1,4 @@
    2354119822-*if_perl.txt*   For Vim version 7.4.  Last change: 2012 Oct 25
     
    2354619827diff -Naur vim74.orig/runtime/doc/indent.txt vim74/runtime/doc/indent.txt
    2354719828--- vim74.orig/runtime/doc/indent.txt   2013-08-10 11:24:56.000000000 +0000
    23548 +++ vim74/runtime/doc/indent.txt        2014-04-27 05:20:57.328415713 +0000
     19829+++ vim74/runtime/doc/indent.txt        2014-06-01 00:42:51.750870647 +0000
    2354919830@@ -1,4 +1,4 @@
    2355019831-*indent.txt*    For Vim version 7.4.  Last change: 2013 Aug 03
    23551 +*indent.txt*    For Vim version 7.4.  Last change: 2013 Nov 05
     19832+*indent.txt*    For Vim version 7.4.  Last change: 2014 Apr 23
    2355219833 
    2355319834 
     
    2363519916 FORTRAN                                                        *ft-fortran-indent*
    2363619917 
     19918@@ -791,7 +812,7 @@
     19919 PHP indenting can be altered in several ways by modifying the values of some
     19920 global variables:
     19921 
     19922-                                                               *php-comment*
     19923+                                       *php-comment* *PHP_autoformatcomment*
     19924 To not enable auto-formating of comments by default (if you want to use your
     19925 own 'formatoptions'): >
     19926     :let g:PHP_autoformatcomment = 0
     19927@@ -800,6 +821,7 @@
     19928 added, see |fo-table| for more information.
     19929 -------------
     19930 
     19931+                                                       *PHP_outdentSLComments*
     19932 To add extra indentation to single-line comments: >
     19933     :let g:PHP_outdentSLComments = N
     19934 
     19935@@ -811,6 +833,7 @@
     19936     /* Comment */
     19937 -------------
     19938 
     19939+                                                       *PHP_default_indenting*
     19940 To add extra indentation to every PHP lines with N being the number of
     19941 'shiftwidth' to add: >
     19942     :let g:PHP_default_indenting = N
     19943@@ -830,14 +853,18 @@
     19944 (Notice the extra indentation between the PHP container markers and the code)
     19945 -------------
     19946 
     19947-To indent PHP tags as the surrounding code: >
     19948-    :let g:PHP_outdentphpescape = 0
     19949+                                                       *PHP_outdentphpescape*
     19950+To indent PHP escape tags as the surrounding non-PHP code (only affects the
     19951+PHP escape tags): >
     19952+:let g:PHP_outdentphpescape = 0
     19953 -------------
     19954 
     19955+                                                       *PHP_removeCRwhenUnix*
     19956 To automatically remove '\r' characters when the 'fileformat' is set to Unix: >
     19957     :let g:PHP_removeCRwhenUnix = 1
     19958 -------------
     19959 
     19960+                                                       *PHP_BracesAtCodeLevel*
     19961 To indent braces at the same level than the code they contain: >
     19962     :let g:PHP_BracesAtCodeLevel = 1
     19963     
     19964@@ -856,6 +883,7 @@
     19965        optimizations won't be available.
     19966 -------------
     19967 
     19968+                                                       *PHP_vintage_case_default_indent*
     19969 To indent 'case:' and 'default:' statements in switch() blocks: >
     19970     :let g:PHP_vintage_case_default_indent = 1
     19971 
    2363719972diff -Naur vim74.orig/runtime/doc/index.txt vim74/runtime/doc/index.txt
    2363819973--- vim74.orig/runtime/doc/index.txt    2013-08-10 11:24:56.000000000 +0000
    23639 +++ vim74/runtime/doc/index.txt 2014-04-27 05:20:57.331749130 +0000
     19974+++ vim74/runtime/doc/index.txt 2014-06-01 00:42:51.770870596 +0000
    2364019975@@ -1,4 +1,4 @@
    2364119976-*index.txt*     For Vim version 7.4.  Last change: 2013 Jul 17
     
    2369720032diff -Naur vim74.orig/runtime/doc/map.txt vim74/runtime/doc/map.txt
    2369820033--- vim74.orig/runtime/doc/map.txt      2013-08-10 11:24:56.000000000 +0000
    23699 +++ vim74/runtime/doc/map.txt   2014-04-27 05:20:57.335082547 +0000
     20034+++ vim74/runtime/doc/map.txt   2014-06-01 00:42:51.837537093 +0000
    2370020035@@ -1,4 +1,4 @@
    2370120036-*map.txt*       For Vim version 7.4.  Last change: 2013 Aug 03
    23702 +*map.txt*       For Vim version 7.4.  Last change: 2013 Aug 22
     20037+*map.txt*       For Vim version 7.4.  Last change: 2014 May 10
    2370320038 
    2370420039 
    2370520040                  VIM REFERENCE MANUAL    by Bram Moolenaar
    23706 @@ -380,7 +380,7 @@
     20041@@ -306,9 +306,21 @@
     20042 to type a count with a zero.
     20043 
     20044                                                *map-overview* *map-modes*
     20045-Overview of which map command works in which mode:
     20046+Overview of which map command works in which mode.  More details below.
     20047+     COMMANDS                    MODES ~
     20048+:map   :noremap  :unmap     Normal, Visual, Select, Operator-pending
     20049+:nmap  :nnoremap :nunmap    Normal
     20050+:vmap  :vnoremap :vunmap    Visual and Select
     20051+:smap  :snoremap :sunmap    Select
     20052+:xmap  :xnoremap :xunmap    Visual
     20053+:omap  :onoremap :ounmap    Operator-pending
     20054+:map!  :noremap! :unmap!    Insert and Command-line
     20055+:imap  :inoremap :iunmap    Insert
     20056+:lmap  :lnoremap :lunmap    Insert, Command-line, Lang-Arg
     20057+:cmap  :cnoremap :cunmap    Command-line
     20058 
     20059-    commands:                                modes: ~
     20060+
     20061+    COMMANDS                                 MODES ~
     20062                                       Normal  Visual+Select  Operator-pending ~
     20063 :map   :noremap   :unmap   :mapclear    yes        yes            yes
     20064 :nmap  :nnoremap  :nunmap  :nmapclear   yes         -              -
     20065@@ -324,7 +336,7 @@
     20066 better to explicitly use :xmap and :smap for printable characters.  Or use
     20067 :sunmap after defining the mapping.
     20068 
     20069-    commands:                                modes: ~
     20070+    COMMANDS                                 MODES ~
     20071                                          Visual    Select ~
     20072 :vmap  :vnoremap  :vunmap  :vmapclear      yes      yes
     20073 :xmap  :xnoremap  :xunmap  :xmapclear      yes       -
     20074@@ -333,7 +345,7 @@
     20075                        *mapmode-ic* *mapmode-i* *mapmode-c* *mapmode-l*
     20076 Some commands work both in Insert mode and Command-line mode, some not:
     20077 
     20078-    commands:                                modes: ~
     20079+    COMMANDS                                 MODES ~
     20080                                          Insert  Command-line  Lang-Arg ~
     20081 :map!  :noremap!  :unmap!  :mapclear!      yes        yes         -
     20082 :imap  :inoremap  :iunmap  :imapclear      yes         -          -
     20083@@ -380,7 +392,7 @@
    2370720084    The simplest way to load a set of related language mappings is by using the
    2370820085 'keymap' option.  See |45.5|.
     
    2371320090 search pattern) the mappings are disabled until a CTRL-^ is typed.  The state
    2371420091 last used is remembered for Insert mode and Search patterns separately.  The
    23715 @@ -593,7 +593,7 @@
     20092@@ -593,7 +605,7 @@
    2371620093 When you have a mapping that contains an Ex command, you need to put a line
    2371720094 terminator after it to have it executed.  The use of <CR> is recommended for
     
    2372220099 To avoid mapping of the characters you type in insert or Command-line mode,
    2372320100 type a CTRL-V first.  The mapping in Insert mode is disabled if the 'paste'
    23724 @@ -1359,6 +1359,8 @@
     20101@@ -1359,6 +1371,8 @@
    2372520102 In the cases of the -count and -register attributes, if the optional argument
    2372620103 is supplied, it is removed from the argument list and is available to the
     
    2373320110diff -Naur vim74.orig/runtime/doc/motion.txt vim74/runtime/doc/motion.txt
    2373420111--- vim74.orig/runtime/doc/motion.txt   2013-08-10 11:24:57.000000000 +0000
    23735 +++ vim74/runtime/doc/motion.txt        2014-04-27 05:20:57.338415962 +0000
     20112+++ vim74/runtime/doc/motion.txt        2014-06-01 00:42:51.920870214 +0000
    2373620113@@ -1,4 +1,4 @@
    2373720114-*motion.txt*    For Vim version 7.4.  Last change: 2013 Jul 17
     
    2375120128diff -Naur vim74.orig/runtime/doc/options.txt vim74/runtime/doc/options.txt
    2375220129--- vim74.orig/runtime/doc/options.txt  2013-08-10 11:24:57.000000000 +0000
    23753 +++ vim74/runtime/doc/options.txt       2014-04-27 05:20:57.345082794 +0000
     20130+++ vim74/runtime/doc/options.txt       2014-06-01 00:42:51.970870087 +0000
    2375420131@@ -1,4 +1,4 @@
    2375520132-*options.txt*  For Vim version 7.4.  Last change: 2013 Jul 09
    23756 +*options.txt*  For Vim version 7.4.  Last change: 2014 Mar 23
     20133+*options.txt*  For Vim version 7.4.  Last change: 2014 May 13
    2375720134 
    2375820135 
     
    2378720164                        global
    2378820165        List of directory names for the swap file, separated with commas.
    23789 @@ -4629,7 +4629,7 @@
     20166@@ -4492,6 +4492,8 @@
     20167        be able to execute Normal mode commands.
     20168        This is the opposite of the 'keymap' option, where characters are
     20169        mapped in Insert mode.
     20170+       This option cannot be set from a |modeline| or in the |sandbox|, for
     20171+       security reasons.
     20172 
     20173        Example (for Greek, in UTF-8):                          *greek*  >
     20174            :set langmap=ΑA,ΒB,ΚC,ΔD,ΕE,ΊF,ΓG,ΗH,ΙI,ΞJ,ΚK,ΛL,ΜM,ΝN,ΟO,ΠP,QQ,ΡR,ΣS,΀T,ΘU,ΩV,WW,ΧX,Î¥Y,ΖZ,αa,βb,ψc,ÎŽd,εe,φf,γg,ηh,ιi,Οj,κk,λl,ÎŒm,Îœn,οo,πp,qq,ρr,σs,τt,Ξu,ωv,ςw,χx,Ï
     20175y,ζz
     20176@@ -4629,7 +4631,7 @@
    2379020177 
    2379120178                                                *'lispwords'* *'lw'*
     
    2379620183                        {not available when compiled without the |+lispindent|
    2379720184                        feature}
    23798 @@ -4757,8 +4757,9 @@
     20185@@ -4757,8 +4759,9 @@
    2379920186                        global or local to buffer |global-local|
    2380020187                        {not in Vi}
     
    2380820195        about including spaces and backslashes.
    2380920196        Note that a '|' must be escaped twice: once for ":set" and once for
    23810 @@ -6555,6 +6556,9 @@
     20197@@ -6251,6 +6254,9 @@
     20198          A     don't give the "ATTENTION" message when an existing swap file
     20199                is found.
     20200          I     don't give the intro message when starting Vim |:intro|.
     20201+         c     don't give |ins-completion-menu| messages.  For example,
     20202+               "-- XXX completion (YYY)", "match 1 of 2", "The only match",
     20203+               "Pattern not found", "Back at original", etc.
     20204 
     20205        This gives you the opportunity to avoid that a change between buffers
     20206        requires you to hit <Enter>, but still gives as useful a message as
     20207@@ -6555,6 +6561,9 @@
    2381120208        region by listing them: "en_us,en_ca" supports both US and Canadian
    2381220209        English, but not words specific for Australia, New Zealand or Great
     
    2381820215        As a special case the name of a .spl file can be given as-is.  The
    2381920216        first "_xx" in the name is removed and used as the region name
    23820 @@ -6878,6 +6882,8 @@
     20217@@ -6615,6 +6624,10 @@
     20218                        top of the suggestion list with the internal methods.
     20219                        Lines without a slash are ignored, use this for
     20220                        comments.
     20221+                       The word in the second column must be correct,
     20222+                       otherwise it will not be used.  Add the word to an
     20223+                       ".add" file if it is currently flagged as a spelling
     20224+                       mistake.
     20225                        The file is used for all languages.
     20226 
     20227        expr:{expr}     Evaluate expression {expr}.  Use a function to avoid
     20228@@ -6878,6 +6891,8 @@
    2382120229        immediately deleted.  When 'swapfile' is set, and 'updatecount' is
    2382220230        non-zero, a swap file is immediately created.
     
    2382720235        This option is used together with 'bufhidden' and 'buftype' to
    2382820236        specify special kinds of buffers.   See |special-buffers|.
    23829 @@ -7594,7 +7600,7 @@
     20237@@ -7498,8 +7513,8 @@
     20238                                "s"  = button state
     20239                                "c"  = column plus 33
     20240                                "r"  = row plus 33
     20241-                       This only works up to 223 columns!  See "dec" for a
     20242-                       solution.
     20243+                       This only works up to 223 columns!  See "dec",
     20244+                       "urxvt", and "sgr" for solutions.
     20245           xterm2       Works like "xterm", but with the xterm reporting the
     20246                        mouse position while the mouse is dragged.  This works
     20247                        much faster and more precise.  Your xterm must at
     20248@@ -7521,29 +7536,35 @@
     20249           pterm        QNX pterm mouse handling.
     20250                                                        *urxvt-mouse*
     20251           urxvt        Mouse handling for the urxvt (rxvt-unicode) terminal.
     20252+                       The mouse works only if the terminal supports this
     20253+                       encoding style, but it does not have 223 columns limit
     20254+                       unlike "xterm" or "xterm2".
     20255                                                        *sgr-mouse*
     20256           sgr          Mouse handling for the terminal that emits SGR-styled
     20257-                       mouse reporting. Works with xterm version 277 or
     20258-                       later.
     20259+                       mouse reporting.  The mouse works even in columns
     20260+                       beyond 223.  This option is backward compatible with
     20261+                       "xterm2" because it can also decode "xterm2" style
     20262+                       mouse codes.
     20263 
     20264        The mouse handling must be enabled at compile time |+mouse_xterm|
     20265-       |+mouse_dec| |+mouse_netterm|.
     20266+       |+mouse_dec| |+mouse_netterm| |+mouse_jsbterm| |+mouse_urxvt|
     20267+       |+mouse_sgr|.
     20268        Only "xterm"(2) is really recognized.  NetTerm mouse codes are always
     20269        recognized, if enabled at compile time.  DEC terminal mouse codes
     20270        are recognized if enabled at compile time, and 'ttymouse' is not
     20271-       "xterm" (because the xterm and dec mouse codes conflict).
     20272+       "xterm", "xterm2", "urxvt" or "sgr" (because dec mouse codes conflict
     20273+       with them).
     20274        This option is automatically set to "xterm", when the 'term' option is
     20275-       set to a name that starts with "xterm", and 'ttymouse' is not "xterm"
     20276-       or "xterm2" already.  The main use of this option is to set it to
     20277-       "xterm", when the terminal name doesn't start with "xterm", but it can
     20278-       handle xterm mouse codes.
     20279-       The "sgr" value will be set if the xterm version is 277 or later.
     20280+       set to a name that starts with "xterm", "mlterm", or "screen", and
     20281+       'ttymouse' is not set already.
     20282+       Additionally, if vim is compiled with the |+termresponse| feature and
     20283+       |t_RV| is set to the escape sequence to request the xterm version
     20284+       number, more intelligent detection process runs.
     20285        The "xterm2" value will be set if the xterm version is reported to be
     20286-       95 or higher.  This only works when compiled with the |+termresponse|
     20287-       feature and if |t_RV| is set to the escape sequence to request the
     20288-       xterm version number.  Otherwise "xterm2" must be set explicitly.
     20289-       If you do not want 'ttymouse' to be set to "xterm2" automatically, set
     20290-       t_RV to an empty string: >
     20291+       from 95 to 276.  The "sgr" value will be set if the xterm version is
     20292+       277 or highter.
     20293+       If you do not want 'ttymouse' to be set to "xterm2" or "sgr"
     20294+       automatically, set t_RV to an empty string: >
     20295                :set t_RV=
     20296 <
     20297                                                *'ttyscroll'* *'tsl'*
     20298@@ -7594,7 +7615,7 @@
    2383020299                                                *'undolevels'* *'ul'*
    2383120300 'undolevels' 'ul'      number  (default 100, 1000 for Unix, VMS,
     
    2383620305        Maximum number of changes that can be undone.  Since undo information
    2383720306        is kept in memory, higher numbers will cause more memory to be used
    23838 @@ -7605,8 +7611,9 @@
     20307@@ -7605,8 +7626,9 @@
    2383920308 <      But you can also get Vi compatibility by including the 'u' flag in
    2384020309        'cpoptions', and still be able to use CTRL-R to repeat undo.
     
    2385020319diff -Naur vim74.orig/runtime/doc/os_vms.txt vim74/runtime/doc/os_vms.txt
    2385120320--- vim74.orig/runtime/doc/os_vms.txt   2013-08-10 11:24:59.000000000 +0000
    23852 +++ vim74/runtime/doc/os_vms.txt        2014-04-27 05:20:57.351749627 +0000
     20321+++ vim74/runtime/doc/os_vms.txt        2014-06-01 00:42:52.130869680 +0000
    2385320322@@ -1,4 +1,4 @@
    2385420323-*os_vms.txt*    For Vim version 7.4.  Last change: 2011 Aug 14
     
    2389120360diff -Naur vim74.orig/runtime/doc/os_win32.txt vim74/runtime/doc/os_win32.txt
    2389220361--- vim74.orig/runtime/doc/os_win32.txt 2013-08-10 11:24:59.000000000 +0000
    23893 +++ vim74/runtime/doc/os_win32.txt      2014-04-27 05:20:57.351749627 +0000
     20362+++ vim74/runtime/doc/os_win32.txt      2014-06-01 00:42:52.144202979 +0000
    2389420363@@ -93,7 +93,7 @@
    2389520364 $PATH                                                  *win32-PATH*
     
    2390320372diff -Naur vim74.orig/runtime/doc/pattern.txt vim74/runtime/doc/pattern.txt
    2390420373--- vim74.orig/runtime/doc/pattern.txt  2013-08-10 11:24:59.000000000 +0000
    23905 +++ vim74/runtime/doc/pattern.txt       2014-04-27 05:20:57.351749627 +0000
     20374+++ vim74/runtime/doc/pattern.txt       2014-06-01 00:42:52.164202928 +0000
    2390620375@@ -1,4 +1,4 @@
    2390720376-*pattern.txt*   For Vim version 7.4.  Last change: 2013 Jul 06
    23908 +*pattern.txt*   For Vim version 7.4.  Last change: 2014 Feb 08
     20377+*pattern.txt*   For Vim version 7.4.  Last change: 2014 May 13
    2390920378 
    2391020379 
     
    2392320392                        etc.
    2392420393 <
     20394@@ -545,6 +545,7 @@
     20395 |/\%u| \%u     \%u     match specified multibyte character (eg \%u20ac)
     20396 |/\%U| \%U     \%U     match specified large multibyte character (eg
     20397                        \%U12345678)
     20398+|/\%C| \%C     \%C     match any composing characters
     20399 
     20400 Example                        matches ~
     20401 \<\I\i*                or
     20402@@ -1207,12 +1208,18 @@
     20403 8. Composing characters                                        *patterns-composing*
     20404 
     20405                                                        */\Z*
     20406-When "\Z" appears anywhere in the pattern, composing characters are ignored.
     20407-Thus only the base characters need to match, the composing characters may be
     20408-different and the number of composing characters may differ.  Only relevant
     20409-when 'encoding' is "utf-8".
     20410+When "\Z" appears anywhere in the pattern, all composing characters are
     20411+ignored.  Thus only the base characters need to match, the composing
     20412+characters may be different and the number of composing characters may differ.
     20413+Only relevant when 'encoding' is "utf-8".
     20414 Exception: If the pattern starts with one or more composing characters, these
     20415 must match.
     20416+                                                       */\%C*
     20417+Use "\%C" to skip any composing characters.  For example, the pattern "a" does
     20418+not match in "càt" (where the a has the composing character 0x0300), but
     20419+"a\%C" does.  Note that this does not match "cát" (where the á is character
     20420+0xe1, it does not have a compositing character).  It does match "cat" (where
     20421+the a is just an a).
     20422 
     20423 When a composing character appears at the start of the pattern of after an
     20424 item that doesn't include the composing character, a match is found at any
    2392520425diff -Naur vim74.orig/runtime/doc/pi_getscript.txt vim74/runtime/doc/pi_getscript.txt
    2392620426--- vim74.orig/runtime/doc/pi_getscript.txt     2013-08-10 11:24:59.000000000 +0000
    23927 +++ vim74/runtime/doc/pi_getscript.txt  2014-04-27 05:20:57.355083042 +0000
     20427+++ vim74/runtime/doc/pi_getscript.txt  2014-06-01 00:42:52.197536177 +0000
    2392820428@@ -1,4 +1,4 @@
    2392920429-*pi_getscript.txt*  For Vim version 7.4.  Last change: 2012 Apr 07
     
    2394520445diff -Naur vim74.orig/runtime/doc/pi_netrw.txt vim74/runtime/doc/pi_netrw.txt
    2394620446--- vim74.orig/runtime/doc/pi_netrw.txt 2013-08-10 11:24:59.000000000 +0000
    23947 +++ vim74/runtime/doc/pi_netrw.txt      2014-04-27 05:20:57.358416459 +0000
     20447+++ vim74/runtime/doc/pi_netrw.txt      2014-06-01 00:42:52.234202750 +0000
    2394820448@@ -1,4 +1,4 @@
    2394920449-*pi_netrw.txt*  For Vim version 7.4.  Last change: 2013 May 18
    23950 +*pi_netrw.txt*  For Vim version 7.4.  Last change: 2014 Mar 20
     20450+*pi_netrw.txt*  For Vim version 7.4.  Last change: 2014 May 13
    2395120451 
    2395220452            ------------------------------------------------
     
    2396920469       Browsing With A New Tab.............................|netrw-t|
    2397020470       Browsing With A Vertically Split Window.............|netrw-v|
     20471@@ -172,7 +173,7 @@
     20472 next section, |netrw-externapp|, on how to use these external applications with
     20473 netrw and vim.
     20474 
     20475-PREVENTING LOADING                                             *netrw-noload*
     20476+PREVENTING LOADING                                     *netrw-noload*
     20477 
     20478 If you want to use plugins, but for some reason don't wish to use netrw, then
     20479 you need to avoid loading both the plugin and the autoload portions of netrw.
     20480@@ -183,7 +184,7 @@
     20481 <
     20482 
     20483 ==============================================================================
     20484-3. Netrw Reference                                             *netrw-ref* {{{1
     20485+3. Netrw Reference                                     *netrw-ref* {{{1
     20486 
     20487    Netrw supports several protocols in addition to scp and ftp as mentioned
     20488    in |netrw-start|.  These include dav, fetch, http,... well, just look
    2397120489@@ -192,21 +193,22 @@
    2397220490 
     
    2401720535 READING                                                *netrw-read* *netrw-nread* {{{2
    2401820536 
    24019 @@ -816,8 +821,7 @@
     20537@@ -286,7 +291,7 @@
     20538        :Nsource "scp://[user@]machine[[:#]port]/path"  uses scp
     20539        :Nsource "sftp://[user@]machine/path"           uses sftp
     20540 
     20541-DIRECTORY LISTING                      *netrw-trailingslash* *netrw-dirlist* {{{2
     20542+DIRECTORY LISTING              *netrw-trailingslash* *netrw-dirlist* {{{2
     20543 
     20544        One may browse a directory to get a listing by simply attempting to
     20545        edit the directory: >
     20546@@ -343,9 +348,9 @@
     20547  *g:netrw_bufsettings* the settings that netrw buffers have
     20548                        (default) noma nomod nonu nowrap ro nobl
     20549 
     20550- *g:netrw_chgwin*      specifies a window number where file edits will take
     20551-                       place.  (also see |netrw-C|)
     20552-                       (default) not defined
     20553+ *g:netrw_chgwin*      specifies a window number where subsequent file edits
     20554+                       will take place.  (also see |netrw-C|)
     20555+                       (default) -1
     20556 
     20557  *g:Netrw_funcref*     specifies a function (or functions) to be called when
     20558                        netrw edits a file.  The file is first edited, and
     20559@@ -366,9 +371,9 @@
     20560                           value of this variable to see if the alternate ftp
     20561                           method works for your setup.
     20562 
     20563- *g:netrw_ftp_options*     Chosen by default, these options are supposed to turn
     20564-                        interactive prompting off and to restrain ftp from
     20565-                        attempting auto-login upon initial connection.
     20566+ *g:netrw_ftp_options*     Chosen by default, these options are supposed to
     20567+                        turn interactive prompting off and to restrain ftp
     20568+                        from attempting auto-login upon initial connection.
     20569                         However, it appears that not all ftp implementations
     20570                         support this (ex. ncftp).
     20571                        ="-i -n"
     20572@@ -399,8 +404,8 @@
     20573  *g:netrw_preview*     =0 (default) preview window shown in a horizontally
     20574                           split window
     20575                        =1 preview window shown in a vertically split window.
     20576-                          Also affects the "previous window" (see |netrw-P|) in
     20577-                          the same way.
     20578+                          Also affects the "previous window" (see |netrw-P|)
     20579+                          in the same way.
     20580 
     20581  *g:netrw_scpport*     = "-P" : option to use to set port for scp
     20582  *g:netrw_sshport*     = "-p" : option to use to set port for ssh
     20583@@ -538,15 +543,17 @@
     20584 starts.  You may use this feature to enter a user and password for one site: >
     20585        userid
     20586        password
     20587-<                                      *netrw-windows-netrc*  *netrw-windows-s*
     20588-If |g:netrw_ftp_cmd| contains -s:[path/]MACHINE, then (on Windows machines only)
     20589-netrw will substitute the current machine name requested for ftp connections
     20590-for MACHINE.  Hence one can have multiple machine.ftp files containing login
     20591-and password for ftp.  Example: >
     20592+<                              *netrw-windows-netrc*  *netrw-windows-s*
     20593+If |g:netrw_ftp_cmd| contains -s:[path/]MACHINE, then (on Windows machines
     20594+only) netrw will substitute the current machine name requested for ftp
     20595+connections for MACHINE.  Hence one can have multiple machine.ftp files
     20596+containing login and password for ftp.  Example: >
     20597 
     20598     let g:netrw_ftp_cmd= 'c:\Windows\System32\ftp -s:C:\Users\Myself\MACHINE'
     20599     vim ftp://myhost.somewhere.net/
     20600+
     20601 will use a file >
     20602+
     20603        C:\Users\Myself\myhost.ftp
     20604 <
     20605 Often, ftp will need to query the user for the userid and password.
     20606@@ -676,7 +683,7 @@
     20607 <
     20608 
     20609 ==============================================================================
     20610-6. Transparent Remote File Editing                     *netrw-transparent* {{{1
     20611+6. Transparent Remote File Editing             *netrw-transparent* {{{1
     20612 
     20613 Transparent file transfers occur whenever a regular file read or write
     20614 (invoked via an |:autocmd| for |BufReadCmd|, |BufWriteCmd|, or |SourceCmd|
     20615@@ -750,7 +757,7 @@
     20616 
     20617 
     20618 ==============================================================================
     20619-8. Variables and Options                       *netrw-var* *netrw-settings* {{{1
     20620+8. Variables and Options               *netrw-var* *netrw-settings* {{{1
     20621 
     20622 (also see: |netrw-options| |netrw-variables| |netrw-protocol|
     20623            |netrw-browser-settings| |netrw-browser-options| )
     20624@@ -790,7 +797,7 @@
     20625                                 =1 use default method to do ftp >
     20626        -----------------------------------------------------------------------
     20627 <
     20628-                                                       *netrw-internal-variables*
     20629+                                               *netrw-internal-variables*
     20630 The script will also make use of the following variables internally, albeit
     20631 temporarily.
     20632 >
     20633@@ -816,8 +823,7 @@
    2402020634                           ------------------------
    2402120635     Option            Type        Setting         Meaning
     
    2402720641                                   =1              userid set by "userid"
    2402820642     NetReadFixup      function    =doesn't exist  no change
    24029 @@ -825,17 +829,18 @@
     20643@@ -825,17 +831,18 @@
    2403020644                                                   read via ftp automatically
    2403120645                                                   transformed however they wish
     
    2405720671 <
    2405820672                                                                *netrw-ftp*
    24059 @@ -1097,16 +1102,20 @@
     20673@@ -1037,8 +1044,8 @@
     20674         <del>  Netrw will attempt to remove the file/directory      |netrw-del|
     20675           -    Makes Netrw go up one directory                      |netrw--|
     20676           a    Toggles between normal display,                      |netrw-a|
     20677-               hiding (suppress display of files matching g:netrw_list_hide)
     20678-               showing (display only files which match g:netrw_list_hide)
     20679+               hiding (suppress display of files matching g:netrw_list_hide)
     20680+               showing (display only files which match g:netrw_list_hide)
     20681           c    Make browsing directory the current directory        |netrw-c|
     20682           C    Setting the editing window                           |netrw-C|
     20683           d    Make a directory                                     |netrw-d|
     20684@@ -1063,7 +1070,7 @@
     20685           mx   Apply arbitrary shell command to marked files        |netrw-mx|
     20686           mz   Compress/decompress marked files                     |netrw-mz|
     20687           o    Enter the file/directory under the cursor in a new   |netrw-o|
     20688-               browser window.  A horizontal split is used.
     20689+               browser window.  A horizontal split is used.
     20690           O    Obtain a file specified by cursor                    |netrw-O|
     20691           p    Preview the file                                     |netrw-p|
     20692           P    Browse in the previously used window                 |netrw-P|
     20693@@ -1077,7 +1084,7 @@
     20694           u    Change to recently-visited directory                 |netrw-u|
     20695           U    Change to subsequently-visited directory             |netrw-U|
     20696           v    Enter the file/directory under the cursor in a new   |netrw-v|
     20697-               browser window.  A vertical split is used.
     20698+               browser window.  A vertical split is used.
     20699           x    View file with an associated program                 |netrw-x|
     20700           X    Execute filename under cursor via |system()|           |netrw-X|
     20701 
     20702@@ -1091,22 +1098,26 @@
     20703        <rightmouse>    (gvim only) delete file/directory using word under
     20704                        mouse
     20705        <2-leftmouse>   (gvim only) when:
     20706-                        * in a netrw-selected file, AND
     20707-                        * |g:netrw_retmap| == 1     AND
     20708-                        * the user doesn't already have a <2-leftmouse>
     20709+                        * in a netrw-selected file, AND
     20710+                        * |g:netrw_retmap| == 1     AND
     20711+                        * the user doesn't already have a <2-leftmouse>
    2406020712                           mapping defined before netrw is autoloaded,
    2406120713                        then a double clicked leftmouse button will return
     
    2408120733      :Pexplore[!] [dir] Vertical Split & Explore...............|netrw-explore|
    2408220734      :Rexplore          Return to Explorer.....................|netrw-explore|
    24083 @@ -1171,6 +1180,12 @@
     20735@@ -1171,6 +1182,12 @@
    2408420736 always refresh directory listing buffers by pressing ctrl-L (see
    2408520737 |netrw-ctrl-l|).
     
    2409420746 Related topics: |netrw-o| |netrw-p| |netrw-P| |netrw-t| |netrw-v|
    2409520747 Associated setting variables: |g:netrw_browse_split|      |g:netrw_fastbrowse|
    24096 @@ -1321,6 +1336,17 @@
     20748@@ -1219,9 +1236,7 @@
     20749 There is only one tree listing buffer; using "v" on a displayed subdirectory
     20750 will split the screen, but the same buffer will be shown twice.
     20751 
     20752-Associated setting variable: |g:netrw_altv| |g:netrw_winsize|
     20753-
     20754-Related Actions |netrw-cr| |netrw-o| |netrw-t| |netrw-v|
     20755+Related Actions: |netrw-cr| |netrw-o| |netrw-t| |netrw-v|
     20756 Associated setting variables:
     20757    |g:netrw_altv|    control right/left splitting
     20758    |g:netrw_winsize| control initial sizing
     20759@@ -1243,11 +1258,12 @@
     20760 filenames; when using that format, netrw won't be able to recognize or use
     20761 filenames which have two or more contiguous spaces embedded in the name or any
     20762 trailing spaces.  The thin listing format will, however, work with such files.
     20763-This listing format is the most compact.
     20764+The wide listing format is the most compact.
     20765 
     20766 The tree listing format has a top directory followed by files and directories
     20767-preceded by a "|".  One may open and close directories by pressing the <cr>
     20768-key while atop the directory name.
     20769+preceded by one or more "|"s, which indicate the directory depth.  One may
     20770+open and close directories by pressing the <cr> key while atop the directory
     20771+name.
     20772 
     20773 One may make a preferred listing style your default; see |g:netrw_liststyle|.
     20774 As an example, by putting the following line in your .vimrc, >
     20775@@ -1321,6 +1337,17 @@
    2409720776 slots.
    2409820777 
     
    2411220791 
    2411320792 With :NetrwClean one may easily remove netrw from one's home directory;
    24114 @@ -1458,35 +1484,52 @@
     20793@@ -1436,8 +1463,16 @@
     20794     Marked files (and empty directories) will be deleted; again, you'll be
     20795     asked to confirm the deletion before it actually takes place.
     20796 
     20797+A further approach is to delete files which match a pattern.
     20798+
     20799+    * use  :MF pattern  (see |netrw-:MF|); then press "D".
     20800+
     20801+    * use mr (see |netrw-mr|) which will prompt you for pattern.
     20802+      This will cause the matching files to be marked.  Then,
     20803+      press "D".
     20804+
     20805 The |g:netrw_rm_cmd|, |g:netrw_rmf_cmd|, and |g:netrw_rmdir_cmd| variables are
     20806-used to control the attempts to remove files and directories.  The
     20807+used to control the attempts to remove remote files and directories.  The
     20808 g:netrw_rm_cmd is used with files, and its default value is:
     20809 
     20810        g:netrw_rm_cmd: ssh HOSTNAME rm
     20811@@ -1445,12 +1480,12 @@
     20812 The g:netrw_rmdir_cmd variable is used to support the removal of directories.
     20813 Its default value is:
     20814 
     20815-       g:netrw_rmdir_cmd: ssh HOSTNAME rmdir
     20816+       |g:netrw_rmdir_cmd|: ssh HOSTNAME rmdir
     20817 
     20818 If removing a directory fails with g:netrw_rmdir_cmd, netrw then will attempt
     20819 to remove it again using the g:netrw_rmf_cmd variable.  Its default value is:
     20820 
     20821-       g:netrw_rmf_cmd: ssh HOSTNAME rm -f
     20822+       |g:netrw_rmf_cmd|: ssh HOSTNAME rm -f
     20823 
     20824 Related topics: |netrw-d|
     20825 Associated setting variable: |g:netrw_localrmdir| |g:netrw_rm_cmd|
     20826@@ -1458,35 +1493,52 @@
    2411520827 
    2411620828 
     
    2416820880 By default, these commands use the current file's directory.  However, one may
    2416920881 explicitly provide a directory (path) to use.
    24170 @@ -1498,12 +1541,24 @@
     20882@@ -1498,12 +1550,25 @@
    2417120883 user, is used to control the quantity of rows and/or columns new explorer
    2417220884 windows should have.
     
    2418520897+          When one edits a file, for example by pressing <cr> when the
    2418620898+          cursor is atop a file in a netrw browser window, :Rexplore will
    24187 +          return the display to that of the last netrw browser window.
     20899+          return the display to that of the last netrw browser display
     20900+          in that window.
    2418820901+
    2418920902+          Return from Explorer~
    2419020903+          Conversely, when one is editing a directory, issuing a :Rexplore
    24191 +          will return to editing the last file being edited in that
     20904+          will return to editing the file that was last edited in that
    2419220905+          window.
    2419320906+
     
    2419920912 
    2420020913 *netrw-star* *netrw-starpat* *netrw-starstar* *netrw-starstarpat*
    24201 @@ -1547,11 +1602,12 @@
     20914@@ -1547,11 +1612,12 @@
    2420220915 The status line will show, on the right hand side of the status line, a
    2420320916 message like "Match 3 of 20".
     
    2421720930 
    2421820931 DISPLAYING INFORMATION ABOUT FILE                              *netrw-qf* {{{2
    24219 @@ -1641,10 +1697,10 @@
     20932@@ -1641,10 +1707,10 @@
    2422020933 
    2422120934 Netrw will use the command in |g:netrw_list_cmd| to perform the directory
     
    2423020943 read.  Naturally, the user may override this command with whatever is
    2423120944 preferred.  The NetList function which implements remote browsing
    24232 @@ -1696,9 +1752,36 @@
     20945@@ -1696,9 +1762,36 @@
    2423320946 to toggle between hiding files which begin with a period (dot) and not hiding
    2423420947 them.
     
    2426820981 
    2426920982 Especially with the remote directory browser, constantly entering the password
    24270 @@ -1778,6 +1861,15 @@
     20983@@ -1778,6 +1871,15 @@
    2427120984     http://sial.org/howto/openssh/publickey-auth/
    2427220985 
     
    2428420997 
    2428520998 Pressing "qb" (query bookmarks) will list both the bookmarked directories and
    24286 @@ -1800,8 +1892,8 @@
     20999@@ -1800,8 +1902,8 @@
    2428721000 a file or a directory) will be detected, reported on, and ignored.
    2428821001 
     
    2429521008 
    2429621009 MAKING THE BROWSING DIRECTORY THE CURRENT DIRECTORY    *netrw-c* {{{2
    24297 @@ -1821,12 +1913,27 @@
     21010@@ -1821,12 +1923,29 @@
    2429821011 
    2429921012 Associated setting variable: |g:netrw_keepdir|
     
    2430921022+
    2431021023+       * One may mark files with the cursor atop a filename and
    24311 +       then pressing "mf".
     21024+         then pressing "mf".
    2431221025+
    2431321026+       * With gvim, in addition one may mark files with
    24314 +       <s-leftmouse>.
     21027+         <s-leftmouse>. (see |netrw-mouse|)
    2431521028+
    2431621029+       * One may use the :MF command, which takes a list of
    24317 +       files (for local directories, the list may include
    24318 +       wildcards -- see |glob()|) >
     21030+         files (for local directories, the list may include
     21031+         wildcards -- see |glob()|) >
    2431921032+
    2432021033+               :MF *.c
    2432121034+<
    2432221035+       * Note that :MF uses |<f-args>| to break the line
    24323 +       at spaces.
     21036+         at spaces.
     21037+
     21038+       * Mark files based upon the quickfix list (|netrw-qF|)
    2432421039+
    2432521040+The following netrw maps make use of marked files:
     
    2432721042     |netrw-a|  Hide marked files/directories
    2432821043     |netrw-D|  Delete marked files/directories
    24329 @@ -1835,7 +1942,7 @@
     21044@@ -1835,13 +1954,12 @@
    2433021045     |netrw-me| Edit marked files
    2433121046     |netrw-mF| Unmark marked files
     
    2433621051     |netrw-mt| Set target for |netrw-mm| and |netrw-mc|
    2433721052     |netrw-mT| Generate tags using marked files
    24338 @@ -1860,6 +1967,10 @@
     21053     |netrw-mx| Apply shell command to marked files
     21054     |netrw-mz| Compress/Decompress marked files
     21055-    |netrw-qF| Mark files using quickfix list
     21056     |netrw-O|  Obtain marked files
     21057     |netrw-R|  Rename marked files
     21058 
     21059@@ -1860,6 +1978,10 @@
    2433921060 <
    2434021061 into $HOME/.vim/after/syntax/netrw.vim .
     
    2434721068 All marked files are entered onto the global marked file list; there is only
    2434821069 one such list.  In addition, every netrw buffer also has its own local marked
    24349 @@ -1868,6 +1979,12 @@
     21070@@ -1868,6 +1990,12 @@
    2435021071 commands which operate on marked files use one or the other of the marked file
    2435121072 lists.
     
    2436021081 UNMARKING FILES                                                        *netrw-mF* {{{2
    2436121082        (also see |netrw-mf|)
    24362 @@ -2025,6 +2142,10 @@
     21083@@ -2025,6 +2153,10 @@
    2436321084   * However, if the cursor is atop a directory name, then that directory is
    2436421085     used for the copy/move-to target
     
    2437121092 script variable (see |s:var|) and is shared between all netrw windows (in an
    2437221093 instance of vim).
    24373 @@ -2055,9 +2176,9 @@
     21094@@ -2055,9 +2187,9 @@
    2437421095 in my <.vimrc>.
    2437521096 
     
    2438321104 uses one of the go to tag actions (|tags|), the url will be used by netrw to
    2438421105 edit the desired file and go to the tag.
    24385 @@ -2066,34 +2187,38 @@
     21106@@ -2066,34 +2198,38 @@
    2438621107 
    2438721108 MARKED FILES: TARGET DIRECTORY USING BOOKMARKS                 *netrw-Tb* {{{2
     
    2442421145 
    2442521146 MARKED FILES: UNMARKING                                                *netrw-mu* {{{2
    24426 @@ -2114,7 +2239,15 @@
     21147@@ -2114,7 +2250,15 @@
    2442721148    ---                         -----------
    2442821149    Var                         Explanation
     
    2444121162                                 default: =&sb           (see |'sb'|)
    2444221163 
    24443 @@ -2142,6 +2275,10 @@
     21164@@ -2142,6 +2286,10 @@
    2444421165                                    to get vertical splitting instead of
    2444521166                                    horizontal splitting.
     
    2445221173                                        "kfmclient exec"
    2445321174                                        "gnome-open"
    24454 @@ -2205,6 +2342,7 @@
     21175@@ -2205,6 +2353,7 @@
    2445521176   *g:netrw_dynamic_maxfilenamelen* =32: enables dynamic determination of
    2445621177                                    |g:netrw_maxfilenamelen|, which affects
     
    2446021181                                    this are permitted to be displayed
    2446121182                                    0: notes
    24462 @@ -2303,10 +2441,19 @@
     21183@@ -2212,7 +2361,7 @@
     21184                                    2: errors
     21185 
     21186   *g:netrw_fastbrowse*         =0: slow speed directory browsing;
     21187-                                   never re-uses directory listings,
     21188+                                   never re-uses directory listings;
     21189                                    always obtains directory listings.
     21190                                =1: medium speed directory browsing;
     21191                                    re-use directory listings only
     21192@@ -2235,6 +2384,11 @@
     21193                                trading off accuracy (ie. up-to-date listing)
     21194                                versus speed.
     21195 
     21196+  *g:netrw_ffkeep*             (default: doesn't exist)
     21197+                               If this variable exists and is zero, then
     21198+                               netrw will not do a save and restore for
     21199+                               |'fileformat'|.
     21200+
     21201   *g:netrw_fname_escape*       =' ?&;%'
     21202                                Used on filenames before remote reading/writing
     21203 
     21204@@ -2303,10 +2457,19 @@
    2446321205                                     stamp information and file size)
    2446421206                                = 2: wide listing (multiple files in columns)
     
    2448221224   *g:netrw_localcopycmd*       ="cp" Linux/Unix/MacOS/Cygwin
    2448321225                                ="copy" Windows
    24484 @@ -2348,7 +2495,7 @@
     21226@@ -2348,7 +2511,7 @@
    2448521227                                evaluation will be suppressed
    2448621228                                (see |'ballooneval'|)
     
    2449121233                                 default: "mkdir"
    2449221234 
    24493 @@ -2396,7 +2543,7 @@
     21235@@ -2371,13 +2534,13 @@
     21236 
     21237                                  default: =0
     21238 
     21239-  *g:netrw_rm_cmd*             command for removing files
     21240+  *g:netrw_rm_cmd*             command for removing remote files
     21241                                 default: "ssh USEPORT HOSTNAME rm"
     21242 
     21243-  *g:netrw_rmdir_cmd*          command for removing directories
     21244+  *g:netrw_rmdir_cmd*          command for removing remote directories
     21245                                 default: "ssh USEPORT HOSTNAME rmdir"
     21246 
     21247-  *g:netrw_rmf_cmd*            command for removing softlinks
     21248+  *g:netrw_rmf_cmd*            command for removing remote softlinks
     21249                                 default: "ssh USEPORT HOSTNAME rm -f"
     21250 
     21251   *g:netrw_sort_by*            sort by "name", "time", or "size"
     21252@@ -2396,7 +2559,7 @@
    2449421253 
    2449521254   *g:netrw_sort_sequence*      when sorting by name, first sort by the
     
    2450021259                                 default: '[\/]$,*,\.bak$,\.o$,\.h$,
    2450121260                                           \.info$,\.swp$,\.obj$'
    24502 @@ -2412,7 +2559,7 @@
     21261@@ -2412,7 +2575,7 @@
    2450321262                                        netrwMakefile: [mM]akefile *.mak
    2450421263                                        netrwObj     : *.o *.obj
     
    2450921268 
    2451021269                                These syntax highlighting groups are linked
    24511 @@ -2421,8 +2568,27 @@
     21270@@ -2421,8 +2584,27 @@
    2451221271                                one may put lines like >
    2451321272                                        hi link netrwCompress Visual
     
    2453921298                                messages, banners, and whatnot that one doesn't
    2454021299                                want masquerading as "directories" and "files".
    24541 @@ -2457,6 +2623,7 @@
     21300@@ -2457,6 +2639,7 @@
    2454221301                                ml_get errors, try putting
    2454321302                                  let g:netrw_use_noswf= 0
     
    2454721306   *g:netrw_winsize*            specify initial size of new windows made with
    2454821307                                "o" (see |netrw-o|), "v" (see |netrw-v|),
    24549 @@ -2496,7 +2663,7 @@
     21308@@ -2467,6 +2650,9 @@
     21309                                 If g:netrw_winsize is less than zero, then
     21310                                the absolute value of g:netrw_winsize lines
     21311                                or columns will be used for the new window.
     21312+                                If g:netrw_winsize is zero, then a normal
     21313+                               split will be made (ie. |'equalalways'| will
     21314+                               take effect, for example).
     21315                                 default: 50  (for 50%)
     21316 
     21317   *g:netrw_xstrlen*            Controls how netrw computes string lengths,
     21318@@ -2496,7 +2682,7 @@
    2455021319 options to something that's compatible with netrw's needs, and then restoring
    2455121320 them.  However, the autochdir option: >
     
    2455621325 autochdir sets the current directory to that containing the "file" (even if
    2455721326 that "file" is itself a directory).
    24558 @@ -2547,9 +2714,11 @@
     21327@@ -2547,9 +2733,11 @@
    2455921328                                                        *netrw-createfile*
    2456021329 OPEN A NEW FILE IN NETRW'S CURRENT DIRECTORY           *netrw-%*
     
    2457121340 
    2457221341 PREVIEW WINDOW                         *netrw-p* *netrw-preview* {{{2
    24573 @@ -2573,6 +2742,9 @@
     21342@@ -2573,6 +2761,9 @@
    2457421343           will use only 30% of the columns available; the rest of the window
    2457521344           is used for the preview window.
     
    2458121350 
    2458221351 To edit a file or directory in the previously used (last accessed) window (see
    24583 @@ -2592,6 +2764,8 @@
     21352@@ -2592,6 +2783,8 @@
    2458421353    |g:netrw_preview| control horizontal vs vertical splitting
    2458521354    |g:netrw_winsize| control initial sizing
     
    2459021359 REFRESHING THE LISTING                 *netrw-ctrl-l* *netrw-ctrl_l* {{{2
    2459121360 
    24592 @@ -2629,6 +2803,7 @@
     21361@@ -2629,6 +2822,7 @@
    2459321362     Note that moving files is a dangerous operation; copies are safer.  That's
    2459421363     because a "move" for remote files is actually a copy + delete -- and if
     
    2459821367 The g:netrw_rename_cmd variable is used to implement renaming.  By default its
    2459921368 value is:
    24600 @@ -2655,7 +2830,7 @@
     21369@@ -2655,7 +2849,16 @@
    2460121370 g:netrw_chgwin to the selected window number.  Subsequent selection of a file
    2460221371 to edit (|netrw-cr|) will use that window.
    2460321372 
    2460421373-Related topics:                        |netrw-cr|
     21374+       * C  by itself, will select the current window for editing via
     21375+         |netrw-cr|
     21376+
     21377+       * [count]C the count will be used as the window number to be used
     21378+         for editing via |netrw-cr|.
     21379+Using >
     21380+       let g:netrw_chgwin= -1
     21381+will restore the default editing behavior (ie. use the current window).
     21382+
    2460521383+Related topics:                        |netrw-cr| |g:netrw_browse_split|
    2460621384 Associated setting variables:  |g:netrw_chgwin|
    2460721385 
    2460821386 
    24609 @@ -2742,7 +2917,7 @@
     21387@@ -2742,7 +2945,7 @@
    2461021388 
    2461121389                (taken from an answer provided by Wu Yongwei on the vim
     
    2461621394                current code page, as are many other applications that do not
    2461721395                use the Unicode version of Windows APIs. This is an OS-related
    24618 @@ -2950,9 +3125,6 @@
     21396@@ -2943,6 +3146,15 @@
     21397             all netrw's mouse mappings, not just the <leftmouse> one.
     21398             (see |g:netrw_mousemaps|)
     21399 
     21400+                                                               *netrw-p16*
     21401+       P16. When editing remote files (ex. :e ftp://hostname/path/file),
     21402+            under Windows I get an |E303| message complaining that its unable
     21403+            to open a swap file.
     21404+
     21405+            (romainl) It looks like you are starting Vim from a protected
     21406+            directory.  Start if from your $HOME or another writable
     21407+            directory.
     21408+
     21409 ==============================================================================
     21410 11. Debugging Netrw Itself                             *netrw-debug* {{{1
     21411 
     21412@@ -2950,9 +3162,6 @@
    2461921413 >
    2462021414        /usr/local/share/vim/vim7x/plugin/netrwPlugin.vim
     
    2462621420 which is loaded automatically at startup (assuming :set nocp).
    2462721421 
    24628 @@ -2962,9 +3134,7 @@
     21422@@ -2962,9 +3171,7 @@
    2462921423           or
    2463021424             http://vim.sourceforge.net/scripts/script.php?script_id=120
     
    2463721431        2. Edit the <netrw.vim> file by typing: >
    2463821432 
    24639 @@ -2988,15 +3158,127 @@
     21433@@ -2988,15 +3195,153 @@
    2464021434           read/write your file over the network in a separate tab.
    2464121435 
     
    2466121455 12. History                                            *netrw-history* {{{1
    2466221456 
     21457+       v152:   Apr 08, 2014    * uses the |'noswapfile'| option (requires
     21458+                                 vim 7.4 with patch 213)
     21459+                               * (Enno Nagel) turn |'rnu'| off in netrw
     21460+                                 buffers.
     21461+                               * (Quinn Strahl) suggested that netrw
     21462+                                 allow regular window splitting to occur,
     21463+                                 thereby allowing |'equalalways'| to take
     21464+                                 effect.
     21465+                               * (qingtian zhao) normally, netrw will
     21466+                                 save and restore the |'fileformat'|;
     21467+                                 however, sometimes that isn't wanted
     21468+               Apr 14, 2014    * whenever netrw marks a buffer as ro,
     21469+                                 it will also mark it as nomod.
     21470+               Apr 16, 2014    * sftp protocol now supported by
     21471+                                 netrw#Obtain(); this means that one
     21472+                                 may use "mc" to copy a remote file
     21473+                                 to a local file using sftp, and that
     21474+                                 the |netrw-O| command can obtain remote
     21475+                                 files via sftp.
     21476+                               * added [count]C support (see |netrw-C|)
     21477+               Apr 18, 2014    * when |g:netrw_chgwin| is one more than
     21478+                                 the last window, then vertically split
     21479+                                 the last window and use it as the
     21480+                                 chgwin window.
     21481+               May 09, 2014    * SavePosn was "saving filename under cursor"
     21482+                                 from a non-netrw window when using :Rex.
    2466321483+       v151:   Jan 22, 2014    * extended :Rexplore to return to buffer
    2466421484+                                 prior to Explore or editing a directory
     
    2476621586                                  w and b to move to next/previous file
    2476721587                Apr 26, 2013    * one may now copy files in the same
    24768 @@ -3009,7 +3291,8 @@
     21588@@ -3009,7 +3354,8 @@
    2476921589                May 01, 2013    * :Explore ftp://... wasn't working.  Fixed.
    2477021590                May 02, 2013    * introduced |g:netrw_bannerbackslash| as
     
    2477821598diff -Naur vim74.orig/runtime/doc/pi_vimball.txt vim74/runtime/doc/pi_vimball.txt
    2477921599--- vim74.orig/runtime/doc/pi_vimball.txt       2013-08-10 11:25:00.000000000 +0000
    24780 +++ vim74/runtime/doc/pi_vimball.txt    2014-04-27 05:20:57.361749875 +0000
     21600+++ vim74/runtime/doc/pi_vimball.txt    2014-06-01 00:42:52.307535896 +0000
    2478121601@@ -188,7 +188,7 @@
    2478221602                          * Changed silent! to sil! (shorter)
     
    2479021610diff -Naur vim74.orig/runtime/doc/quickfix.txt vim74/runtime/doc/quickfix.txt
    2479121611--- vim74.orig/runtime/doc/quickfix.txt 2013-08-10 11:25:00.000000000 +0000
    24792 +++ vim74/runtime/doc/quickfix.txt      2014-04-27 05:20:57.361749875 +0000
     21612+++ vim74/runtime/doc/quickfix.txt      2014-06-01 00:42:52.350869119 +0000
    2479321613@@ -1,4 +1,4 @@
    2479421614-*quickfix.txt*  For Vim version 7.4.  Last change: 2013 Aug 03
     
    2487221692diff -Naur vim74.orig/runtime/doc/recover.txt vim74/runtime/doc/recover.txt
    2487321693--- vim74.orig/runtime/doc/recover.txt  2013-08-10 11:25:00.000000000 +0000
    24874 +++ vim74/runtime/doc/recover.txt       2014-04-27 05:20:57.365083291 +0000
     21694+++ vim74/runtime/doc/recover.txt       2014-06-01 00:42:52.410868967 +0000
    2487521695@@ -1,4 +1,4 @@
    2487621696-*recover.txt*   For Vim version 7.4.  Last change: 2010 Jul 20
     
    2489721717diff -Naur vim74.orig/runtime/doc/repeat.txt vim74/runtime/doc/repeat.txt
    2489821718--- vim74.orig/runtime/doc/repeat.txt   2013-08-10 11:25:00.000000000 +0000
    24899 +++ vim74/runtime/doc/repeat.txt        2014-04-27 05:20:57.368416707 +0000
     21719+++ vim74/runtime/doc/repeat.txt        2014-06-01 00:42:52.434202241 +0000
    2490021720@@ -1,4 +1,4 @@
    2490121721-*repeat.txt*    For Vim version 7.4.  Last change: 2013 Jul 25
     
    2495121771diff -Naur vim74.orig/runtime/doc/sign.txt vim74/runtime/doc/sign.txt
    2495221772--- vim74.orig/runtime/doc/sign.txt     2013-08-10 11:25:01.000000000 +0000
    24953 +++ vim74/runtime/doc/sign.txt  2014-04-27 05:20:57.368416707 +0000
     21773+++ vim74/runtime/doc/sign.txt  2014-06-01 00:42:52.494202088 +0000
    2495421774@@ -1,4 +1,4 @@
    2495521775-*sign.txt*      For Vim version 7.4.  Last change: 2012 Jul 10
    24956 +*sign.txt*      For Vim version 7.4.  Last change: 2013 Nov 17
     21776+*sign.txt*      For Vim version 7.4.  Last change: 2014 May 07
    2495721777 
    2495821778 
    2495921779                  VIM REFERENCE MANUAL    by Gordon Prieur
    24960 @@ -173,7 +173,7 @@
     21780@@ -137,6 +137,7 @@
     21781 :sign place {id} line={lnum} name={name} buffer={nr}
     21782                Same, but use buffer {nr}.
     21783 
     21784+                                                       *E885*
     21785 :sign place {id} name={name} file={fname}
     21786                Change the placed sign {id} in file {fname} to use the defined
     21787                sign {name}.  See remark above about {fname} |:sign-fname|.
     21788@@ -173,7 +174,7 @@
    2496121789                Remove the placed sign at the cursor position.
    2496221790 
     
    2496921797diff -Naur vim74.orig/runtime/doc/spell.txt vim74/runtime/doc/spell.txt
    2497021798--- vim74.orig/runtime/doc/spell.txt    2013-08-10 11:25:01.000000000 +0000
    24971 +++ vim74/runtime/doc/spell.txt 2014-04-27 05:20:57.371750123 +0000
     21799+++ vim74/runtime/doc/spell.txt 2014-06-01 00:42:52.504202062 +0000
    2497221800@@ -1,4 +1,4 @@
    2497321801-*spell.txt*    For Vim version 7.4.  Last change: 2013 Jul 17
     
    2499221820diff -Naur vim74.orig/runtime/doc/starting.txt vim74/runtime/doc/starting.txt
    2499321821--- vim74.orig/runtime/doc/starting.txt 2013-08-10 11:25:01.000000000 +0000
    24994 +++ vim74/runtime/doc/starting.txt      2014-04-27 05:20:57.371750123 +0000
     21822+++ vim74/runtime/doc/starting.txt      2014-06-01 00:42:52.540868636 +0000
    2499521823@@ -1,4 +1,4 @@
    2499621824-*starting.txt*  For Vim version 7.4.  Last change: 2013 Jul 20
     
    2501421842diff -Naur vim74.orig/runtime/doc/syntax.txt vim74/runtime/doc/syntax.txt
    2501521843--- vim74.orig/runtime/doc/syntax.txt   2013-08-10 11:25:01.000000000 +0000
    25016 +++ vim74/runtime/doc/syntax.txt        2014-04-27 05:20:57.375083540 +0000
     21844+++ vim74/runtime/doc/syntax.txt        2014-06-01 00:42:52.604201808 +0000
    2501721845@@ -1,4 +1,4 @@
    2501821846-*syntax.txt*   For Vim version 7.4.  Last change: 2013 Jul 05
     
    2511621944diff -Naur vim74.orig/runtime/doc/tags vim74/runtime/doc/tags
    2511721945--- vim74.orig/runtime/doc/tags 2013-08-10 12:23:34.000000000 +0000
    25118 +++ vim74/runtime/doc/tags      2014-04-27 05:20:57.378416956 +0000
     21946+++ vim74/runtime/doc/tags      2014-06-01 00:42:52.630868407 +0000
    2511921947@@ -12,6 +12,7 @@
    2512021948 %      motion.txt      /*%*
     
    2513321961 +autocmd       various.txt     /*+autocmd*
    2513421962 +balloon_eval  various.txt     /*+balloon_eval*
    25135 @@ -1262,6 +1264,7 @@
     21963@@ -1199,6 +1201,7 @@
     21964 +mouse various.txt     /*+mouse*
     21965 +mouse_dec     various.txt     /*+mouse_dec*
     21966 +mouse_gpm     various.txt     /*+mouse_gpm*
     21967++mouse_jsbterm various.txt     /*+mouse_jsbterm*
     21968 +mouse_netterm various.txt     /*+mouse_netterm*
     21969 +mouse_pterm   various.txt     /*+mouse_pterm*
     21970 +mouse_sgr     various.txt     /*+mouse_sgr*
     21971@@ -1262,6 +1265,7 @@
    2513621972 +writebackup   various.txt     /*+writebackup*
    2513721973 +xfontset      various.txt     /*+xfontset*
     
    2514121977 +xsmp  various.txt     /*+xsmp*
    2514221978 +xsmp_interact various.txt     /*+xsmp_interact*
    25143 @@ -1786,6 +1789,7 @@
     21979@@ -1412,6 +1416,7 @@
     21980 /\%>c  pattern.txt     /*\/\\%>c*
     21981 /\%>l  pattern.txt     /*\/\\%>l*
     21982 /\%>v  pattern.txt     /*\/\\%>v*
     21983+/\%C   pattern.txt     /*\/\\%C*
     21984 /\%U   pattern.txt     /*\/\\%U*
     21985 /\%V   pattern.txt     /*\/\\%V*
     21986 /\%[]  pattern.txt     /*\/\\%[]*
     21987@@ -1786,6 +1791,7 @@
    2514421988 :3match        pattern.txt     /*:3match*
    2514521989 ::.    cmdline.txt     /*::.*
     
    2514921993 ::gs   cmdline.txt     /*::gs*
    2515021994 ::h    cmdline.txt     /*::h*
    25151 @@ -1825,6 +1829,7 @@
     21995@@ -1825,6 +1831,7 @@
    2515221996 :GnatPretty    ft_ada.txt      /*:GnatPretty*
    2515321997 :GnatTags      ft_ada.txt      /*:GnatTags*
     
    2515722001 :MkVimball     pi_vimball.txt  /*:MkVimball*
    2515822002 :N     editing.txt     /*:N*
    25159 @@ -1836,6 +1841,7 @@
     22003@@ -1836,6 +1843,7 @@
    2516022004 :Nread pi_netrw.txt    /*:Nread*
    2516122005 :Ns    pi_netrw.txt    /*:Ns*
     
    2516522009 :Nwrite        pi_netrw.txt    /*:Nwrite*
    2516622010 :P     various.txt     /*:P*
    25167 @@ -1967,8 +1973,8 @@
     22011@@ -1967,8 +1975,8 @@
    2516822012 :cabc  map.txt /*:cabc*
    2516922013 :cabclear      map.txt /*:cabclear*
     
    2517522019 :caddf quickfix.txt    /*:caddf*
    2517622020 :caddfile      quickfix.txt    /*:caddfile*
    25177 @@ -2212,6 +2218,9 @@
     22021@@ -2212,6 +2220,9 @@
    2517822022 :foldopen      fold.txt        /*:foldopen*
    2517922023 :for   eval.txt        /*:for*
     
    2518522029 :function-verbose      eval.txt        /*:function-verbose*
    2518622030 :g     repeat.txt      /*:g*
    25187 @@ -2298,6 +2307,8 @@
     22031@@ -2298,6 +2309,8 @@
    2518822032 :keepj motion.txt      /*:keepj*
    2518922033 :keepjumps     motion.txt      /*:keepjumps*
     
    2519422038 :lN    quickfix.txt    /*:lN*
    2519522039 :lNext quickfix.txt    /*:lNext*
    25196 @@ -2489,6 +2500,7 @@
     22040@@ -2489,6 +2502,7 @@
    2519722041 :nbkey netbeans.txt    /*:nbkey*
    2519822042 :nbstart       netbeans.txt    /*:nbstart*
     
    2520222046 :next  editing.txt     /*:next*
    2520322047 :next_f        editing.txt     /*:next_f*
    25204 @@ -2518,6 +2530,8 @@
     22048@@ -2518,6 +2532,8 @@
    2520522049 :norm  various.txt     /*:norm*
    2520622050 :normal        various.txt     /*:normal*
     
    2521122055 :number        various.txt     /*:number*
    2521222056 :nun   map.txt /*:nun*
    25213 @@ -2738,6 +2752,7 @@
     22057@@ -2738,6 +2754,7 @@
    2521422058 :sign-jump     sign.txt        /*:sign-jump*
    2521522059 :sign-list     sign.txt        /*:sign-list*
     
    2521922063 :sign-unplace  sign.txt        /*:sign-unplace*
    2522022064 :sil   various.txt     /*:sil*
    25221 @@ -4294,6 +4309,9 @@
     22065@@ -4294,6 +4311,11 @@
    2522222066 E879   syntax.txt      /*E879*
    2522322067 E88    windows.txt     /*E88*
     
    2522622070+E882   eval.txt        /*E882*
    2522722071+E883   eval.txt        /*E883*
     22072+E884   eval.txt        /*E884*
     22073+E885   sign.txt        /*E885*
    2522822074 E89    message.txt     /*E89*
    2522922075 E90    message.txt     /*E90*
    2523022076 E91    options.txt     /*E91*
    25231 @@ -4900,6 +4918,7 @@
     22077@@ -4423,6 +4445,13 @@
     22078 OverTheSpot    mbyte.txt       /*OverTheSpot*
     22079 P      change.txt      /*P*
     22080 PATHEXT        eval.txt        /*PATHEXT*
     22081+PHP_BracesAtCodeLevel  indent.txt      /*PHP_BracesAtCodeLevel*
     22082+PHP_autoformatcomment  indent.txt      /*PHP_autoformatcomment*
     22083+PHP_default_indenting  indent.txt      /*PHP_default_indenting*
     22084+PHP_outdentSLComments  indent.txt      /*PHP_outdentSLComments*
     22085+PHP_outdentphpescape   indent.txt      /*PHP_outdentphpescape*
     22086+PHP_removeCRwhenUnix   indent.txt      /*PHP_removeCRwhenUnix*
     22087+PHP_vintage_case_default_indent        indent.txt      /*PHP_vintage_case_default_indent*
     22088 Pattern        pattern.txt     /*Pattern*
     22089 Perl   if_perl.txt     /*Perl*
     22090 Posix  intro.txt       /*Posix*
     22091@@ -4900,6 +4929,7 @@
    2523222092 byte-count     editing.txt     /*byte-count*
    2523322093 byte2line()    eval.txt        /*byte2line()*
     
    2523722097 c      change.txt      /*c*
    2523822098 c.vim  syntax.txt      /*c.vim*
    25239 @@ -5350,6 +5369,7 @@
     22099@@ -5350,6 +5380,7 @@
    2524022100 dialog gui_w32.txt     /*dialog*
    2524122101 dialogs-added  version5.txt    /*dialogs-added*
     
    2524522105 dict-identity  eval.txt        /*dict-identity*
    2524622106 dict-modification      eval.txt        /*dict-modification*
    25247 @@ -5458,6 +5478,8 @@
     22107@@ -5458,6 +5489,8 @@
    2524822108 escape intro.txt       /*escape*
    2524922109 escape()       eval.txt        /*escape()*
     
    2525422114 eval() eval.txt        /*eval()*
    2525522115 eval-examples  eval.txt        /*eval-examples*
    25256 @@ -5492,6 +5514,7 @@
     22116@@ -5492,6 +5525,7 @@
    2525722117 exclusive-linewise     motion.txt      /*exclusive-linewise*
    2525822118 executable()   eval.txt        /*executable()*
     
    2526222122 exists()       eval.txt        /*exists()*
    2526322123 exp()  eval.txt        /*exp()*
    25264 @@ -5708,6 +5731,7 @@
     22124@@ -5708,6 +5742,7 @@
    2526522125 ft-changelog-syntax    syntax.txt      /*ft-changelog-syntax*
    2526622126 ft-chill-syntax        syntax.txt      /*ft-chill-syntax*
     
    2527022130 ft-coldfusion-syntax   syntax.txt      /*ft-coldfusion-syntax*
    2527122131 ft-cpp-syntax  syntax.txt      /*ft-cpp-syntax*
    25272 @@ -5724,6 +5748,7 @@
     22132@@ -5724,6 +5759,7 @@
    2527322133 ft-dtd-syntax  syntax.txt      /*ft-dtd-syntax*
    2527422134 ft-eiffel-syntax       syntax.txt      /*ft-eiffel-syntax*
     
    2527822138 ft-form-syntax syntax.txt      /*ft-form-syntax*
    2527922139 ft-fortran-indent      indent.txt      /*ft-fortran-indent*
    25280 @@ -5876,6 +5901,8 @@
     22140@@ -5876,6 +5912,8 @@
    2528122141 g:ada_with_gnat_project_files  ft_ada.txt      /*g:ada_with_gnat_project_files*
    2528222142 g:ada_withuse_ordinary ft_ada.txt      /*g:ada_withuse_ordinary*
     
    2528722147 g:clojure_fuzzy_indent_blacklist       indent.txt      /*g:clojure_fuzzy_indent_blacklist*
    2528822148 g:clojure_fuzzy_indent_patterns        indent.txt      /*g:clojure_fuzzy_indent_patterns*
    25289 @@ -5924,6 +5951,7 @@
     22149@@ -5924,6 +5962,7 @@
    2529022150 g:html_use_encoding    syntax.txt      /*g:html_use_encoding*
    2529122151 g:html_use_xhtml       syntax.txt      /*g:html_use_xhtml*
     
    2529522155 g:netrw_altv   pi_netrw.txt    /*g:netrw_altv*
    2529622156 g:netrw_banner pi_netrw.txt    /*g:netrw_banner*
    25297 @@ -5958,6 +5986,7 @@
     22157@@ -5944,6 +5983,7 @@
     22158 g:netrw_errorlvl       pi_netrw.txt    /*g:netrw_errorlvl*
     22159 g:netrw_fastbrowse     pi_netrw.txt    /*g:netrw_fastbrowse*
     22160 g:netrw_fetch_cmd      pi_netrw.txt    /*g:netrw_fetch_cmd*
     22161+g:netrw_ffkeep pi_netrw.txt    /*g:netrw_ffkeep*
     22162 g:netrw_fname_escape   pi_netrw.txt    /*g:netrw_fname_escape*
     22163 g:netrw_ftp    pi_netrw.txt    /*g:netrw_ftp*
     22164 g:netrw_ftp_browse_reject      pi_netrw.txt    /*g:netrw_ftp_browse_reject*
     22165@@ -5958,6 +5998,7 @@
    2529822166 g:netrw_hide   pi_netrw.txt    /*g:netrw_hide*
    2529922167 g:netrw_home   pi_netrw.txt    /*g:netrw_home*
     
    2530322171 g:netrw_ignorenetrc    pi_netrw.txt    /*g:netrw_ignorenetrc*
    2530422172 g:netrw_keepdir        pi_netrw.txt    /*g:netrw_keepdir*
    25305 @@ -6358,6 +6387,7 @@
     22173@@ -6358,6 +6399,7 @@
    2530622174 hl-WildMenu    syntax.txt      /*hl-WildMenu*
    2530722175 hlID() eval.txt        /*hlID()*
     
    2531122179 home   intro.txt       /*home*
    2531222180 home-replace   editing.txt     /*home-replace*
    25313 @@ -6669,6 +6699,7 @@
     22181@@ -6669,6 +6711,7 @@
    2531422182 linewise-visual        visual.txt      /*linewise-visual*
    2531522183 lisp.vim       syntax.txt      /*lisp.vim*
     
    2531922187 list-identity  eval.txt        /*list-identity*
    2532022188 list-index     eval.txt        /*list-index*
    25321 @@ -6921,6 +6952,15 @@
     22189@@ -6921,6 +6964,15 @@
    2532222190 netrw  pi_netrw.txt    /*netrw*
    2532322191 netrw-%        pi_netrw.txt    /*netrw-%*
     
    2533522203 netrw-D        pi_netrw.txt    /*netrw-D*
    2533622204 netrw-O        pi_netrw.txt    /*netrw-O*
    25337 @@ -6978,6 +7018,7 @@
     22205@@ -6978,6 +7030,7 @@
    2533822206 netrw-getftype pi_netrw.txt    /*netrw-getftype*
    2533922207 netrw-gf       pi_netrw.txt    /*netrw-gf*
     
    2534322211 netrw-gx       pi_netrw.txt    /*netrw-gx*
    2534422212 netrw-handler  pi_netrw.txt    /*netrw-handler*
    25345 @@ -6992,6 +7033,7 @@
     22213@@ -6992,6 +7045,7 @@
    2534622214 netrw-internal-variables       pi_netrw.txt    /*netrw-internal-variables*
    2534722215 netrw-intro-browse     pi_netrw.txt    /*netrw-intro-browse*
     
    2535122219 netrw-listbookmark     pi_netrw.txt    /*netrw-listbookmark*
    2535222220 netrw-listhack pi_netrw.txt    /*netrw-listhack*
    25353 @@ -7022,6 +7064,7 @@
     22221@@ -7022,6 +7076,7 @@
    2535422222 netrw-nexplore pi_netrw.txt    /*netrw-nexplore*
    2535522223 netrw-noload   pi_netrw.txt    /*netrw-noload*
     
    2535922227 netrw-o        pi_netrw.txt    /*netrw-o*
    2536022228 netrw-options  pi_netrw.txt    /*netrw-options*
    25361 @@ -7374,6 +7417,7 @@
     22229@@ -7033,6 +7088,7 @@
     22230 netrw-p13      pi_netrw.txt    /*netrw-p13*
     22231 netrw-p14      pi_netrw.txt    /*netrw-p14*
     22232 netrw-p15      pi_netrw.txt    /*netrw-p15*
     22233+netrw-p16      pi_netrw.txt    /*netrw-p16*
     22234 netrw-p2       pi_netrw.txt    /*netrw-p2*
     22235 netrw-p3       pi_netrw.txt    /*netrw-p3*
     22236 netrw-p4       pi_netrw.txt    /*netrw-p4*
     22237@@ -7374,6 +7430,7 @@
    2536222238 profiling      repeat.txt      /*profiling*
    2536322239 profiling-variable     eval.txt        /*profiling-variable*
     
    2536722243 pronounce      intro.txt       /*pronounce*
    2536822244 psql   ft_sql.txt      /*psql*
    25369 @@ -7577,6 +7621,7 @@
     22245@@ -7577,6 +7634,7 @@
    2537022246 s/\3   change.txt      /*s\/\\3*
    2537122247 s/\9   change.txt      /*s\/\\9*
     
    2537522251 s/\L   change.txt      /*s\/\\L*
    2537622252 s/\U   change.txt      /*s\/\\U*
    25377 @@ -7787,6 +7832,7 @@
     22253@@ -7787,6 +7845,7 @@
    2537822254 spell-affix-mbyte      spell.txt       /*spell-affix-mbyte*
    2537922255 spell-affix-not-supported      spell.txt       /*spell-affix-not-supported*
     
    2538322259 spell-dic-format       spell.txt       /*spell-dic-format*
    2538422260 spell-double-scoring   spell.txt       /*spell-double-scoring*
    25385 @@ -7872,6 +7918,7 @@
     22261@@ -7872,6 +7931,7 @@
    2538622262 strdisplaywidth()      eval.txt        /*strdisplaywidth()*
    2538722263 strftime()     eval.txt        /*strftime()*
     
    2539122267 string-functions       usr_41.txt      /*string-functions*
    2539222268 string-match   eval.txt        /*string-match*
    25393 @@ -7936,6 +7983,7 @@
     22269@@ -7936,6 +7996,7 @@
    2539422270 system()       eval.txt        /*system()*
    2539522271 system-functions       usr_41.txt      /*system-functions*
     
    2539922275 t      motion.txt      /*t*
    2540022276 t:     eval.txt        /*t:*
    25401 @@ -8280,6 +8328,7 @@
     22277@@ -8280,6 +8341,7 @@
    2540222278 undofile()     eval.txt        /*undofile()*
    2540322279 undotree()     eval.txt        /*undotree()*
     
    2540722283 unlisted-buffer        windows.txt     /*unlisted-buffer*
    2540822284 up-down-motions        motion.txt      /*up-down-motions*
    25409 @@ -8364,6 +8413,7 @@
     22285@@ -8364,6 +8426,7 @@
    2541022286 v:foldend      eval.txt        /*v:foldend*
    2541122287 v:foldlevel    eval.txt        /*v:foldlevel*
     
    2541522291 v:key  eval.txt        /*v:key*
    2541622292 v:lang eval.txt        /*v:lang*
    25417 @@ -8377,6 +8427,7 @@
     22293@@ -8377,6 +8440,7 @@
    2541822294 v:prevcount    eval.txt        /*v:prevcount*
    2541922295 v:profiling    eval.txt        /*v:profiling*
     
    2542522301diff -Naur vim74.orig/runtime/doc/tagsrch.txt vim74/runtime/doc/tagsrch.txt
    2542622302--- vim74.orig/runtime/doc/tagsrch.txt  2013-08-10 11:25:02.000000000 +0000
    25427 +++ vim74/runtime/doc/tagsrch.txt       2014-04-27 05:20:57.381750371 +0000
     22303+++ vim74/runtime/doc/tagsrch.txt       2014-06-01 00:42:52.637535056 +0000
    2542822304@@ -1,4 +1,4 @@
    2542922305-*tagsrch.txt*   For Vim version 7.4.  Last change: 2013 Jul 28
     
    2544722323                                                        *[_CTRL-D*
    2544822324 [ CTRL-D               Jump to the first macro definition that contains the
     22325diff -Naur vim74.orig/runtime/doc/term.txt vim74/runtime/doc/term.txt
     22326--- vim74.orig/runtime/doc/term.txt     2013-08-10 11:25:02.000000000 +0000
     22327+++ vim74/runtime/doc/term.txt  2014-06-01 00:42:52.644201706 +0000
     22328@@ -1,4 +1,4 @@
     22329-*term.txt*      For Vim version 7.4.  Last change: 2013 Mar 13
     22330+*term.txt*      For Vim version 7.4.  Last change: 2014 May 13
     22331 
     22332 
     22333                  VIM REFERENCE MANUAL    by Bram Moolenaar
     22334@@ -666,8 +666,8 @@
     22335 
     22336                                                        *xterm-copy-paste*
     22337 NOTE: In some (older) xterms, it's not possible to move the cursor past column
     22338-95.  This is an xterm problem, not Vim's.  Get a newer xterm |color-xterm|.
     22339-Now the limit is 223 columns.
     22340+95 or 223.  This is an xterm problem, not Vim's.  Get a newer xterm
     22341+|color-xterm|.  Also see |'ttymouse'|.
     22342 
     22343 Copy/paste in xterm with (current mode NOT included in 'mouse'):
     22344 1. Press left mouse button on first letter of text, move mouse pointer to last
    2544922345diff -Naur vim74.orig/runtime/doc/todo.txt vim74/runtime/doc/todo.txt
    2545022346--- vim74.orig/runtime/doc/todo.txt     2013-08-10 11:25:02.000000000 +0000
    25451 +++ vim74/runtime/doc/todo.txt  2014-04-27 05:20:57.388417204 +0000
     22347+++ vim74/runtime/doc/todo.txt  2014-06-01 00:42:52.700868228 +0000
    2545222348@@ -1,4 +1,4 @@
    2545322349-*todo.txt*      For Vim version 7.4.  Last change: 2013 Aug 10
    25454 +*todo.txt*      For Vim version 7.4.  Last change: 2014 Apr 05
     22350+*todo.txt*      For Vim version 7.4.  Last change: 2014 May 22
    2545522351 
    2545622352 
    2545722353                  VIM REFERENCE MANUAL    by Bram Moolenaar
    25458 @@ -34,38 +34,232 @@
     22354@@ -34,38 +34,242 @@
    2545922355                                                        *known-bugs*
    2546022356 -------------------- Known bugs and current work -----------------------
    2546122357 
    2546222358+Regexp problems:
    25463 +- Crash when using cpp syntax file with raw string. (Havard Garnes)
    25464 +  Edit "~/tmp/test.cc" and source "~/tmp/cpp.vim".
    25465 +- NFA regexp doesn't count tab matches correctly. (Urtica Dioica / gaultheria
    25466 +  Shallon, 2013 Nov 18)
    25467 +- After patch 7.4.100 there is still a difference between NFA and old engine.
    25468 +  25 a's with pattern \v^(aa+)\1+$  (Urtica Dioica, 2013 Nov 21) Also: 9 a's
    25469 +  with pattern  \v^(a{-2,})\1+$ (Nov 23)
    25470 +- NFA engine combining character mismatch. (glts, 2013 Aug 27)
    25471 +  Remark from Dominique, Aug 27
     22359+- Bug with pattern: '\vblock (\d+)\.\n.*\d+%(\1)@<!\.$'
     22360+  (Lech Lorens, 2014 Feb 3)
    2547222361+- Issue 164: freeze on regexp search.
    25473 +- NFA problem with non-greedy match and branches. (Ingo Karkat, 2013 Nov 29)
    2547422362+- Ignorecase not handled properly for multi-byte characters. (Axel Bender,
    2547522363+  2013 Dec 11)
    2547622364+- Using \@> and \?. (Brett Stahlman, 2013 Dec 21) Remark from Marcin Szamotulski
    2547722365+  Remark from Brett 2014 Jan 6 and 7.
    25478 +- Bug with back references. (Lech Lorens, 2014 Feb 3)
    2547922366+- Bug when using \>. (Ramel, 2014 Feb 2) (Aaron Bohannon, 2014 Feb 13)
     22367+- NFA regexp doesn't handle \%<v correctly. (Ingo Karkat, 2014 May 12)
     22368+- Does not work with NFA regexp engine:
     22369+  \%u, \%x, \%o, \%d followed by a composing character
    2548022370+
    2548122371+Problem that a previous silent ":throw" causes a following try/catch not to
     
    2548522375+directory exists. (Sergio Gallelli, 2013 Dec 29)
    2548622376+
    25487 +It is possible to define a function with a colon in the name.
    25488 +"g:" is not recognized as it should.  (zyx, 2014 Mar 16)
    25489 +Do some plugins use names with a colon?  Disallow it, but ignore the error
    25490 +when an option is set?
    25491 +
    25492 +":lunmap" cannot be abbrevated to ":lu". (ZyX)
    25493 +
    2549422377+Problem using ":try" inside ":execute". (ZyX, 2013 Sep 15)
    2549522378+
     22379+Setting 'ttymouse' empty causes Dec mouse to be detected. (Elijah Griffin,
     22380+2014 May 13)
     22381+
    2549622382 Python: ":py raw_input('prompt')" doesn't work. (Manu Hack)
    2549722383 
    2549822384-Patch to add "acl" and "xpm" as a feature. (Ken Takata, 2013 Jul 8)
    25499 +Crash in setqflist(). (Benoit Mortgat, 2010 Nov 18)
    25500 +
    2550122385+MS-Windows: Crash opening very long file name starting with "\\".
    2550222386+(Christian Brock, 2012 Jun 29)
    2550322387+
    25504 +Crash in autocmd that unloads buffers in a BufUnload event. (Andrew Pimlott,
    25505 +2012 Aug 11)  Disallow :new when BufUnload is being handled?
    25506 +
    25507 +Spell files use a latin single quote.  Unicode also has another single quote.
    25508 +Adjust spell file scripts to duplicate words to support both quotes.
    25509 +(Ron Aaron, 2014 Apr 4)
    25510 +
    25511 +Problem with 'spellsuggest' file, only works for some words.
    25512 +(Cesar Romani, 2013 Aug 20)  Depends on file name? (Aug 24)
    25513 +Additional remark by glts: the suggested words are marked bad?
    25514 +
    2551522388+Syntax highlighting slow (hangs) in SASS file. (Niek Bosch, 2013 Aug 21)
    2551622389+
     
    2552922402+
    2553022403+PHP syntax is extremely slow. (Anhad Jai Singh, 2014 Jan 19)
     22404+
     22405+Spell files use a latin single quote. Unicode also has another single quote:
     22406+0x2019.  (Ron Aaron, 2014 Apr 4)
     22407+New OpenOffice spell files support this with ICONV.  But they are not
     22408+compatible with Vim spell files.  The old files can no longer be downloaded.
    2553122409+
    2553222410+Win32: use different args for SearchPath()? (Yasuhiro Matsumoto, 2009 Jan 30)
     
    2553422412+Update from Ken Takata, 2014 Jan 10. Newer 2014 Apr 3.
    2553522413+
     22414+Win32: use 64 bit stat() if possible. (Ken Takata, 2014 May 12)
     22415+More tests May 14.
     22416+
     22417+Idea: For a window in the middle (has window above and below it), use
     22418+right-mouse-drag on the status line to move a window up/down without changing
     22419+it's height?  It's like dragging the status bar above it at the same time.
     22420+
    2553622421+Can we make ":unlet $VAR" use unsetenv() to delete the env var?
    2553722422+What for systems that don't have unsetenv()?
     22423+
     22424+Patch to make getchar() work for typing Esc. (Yasuhiro Matsumoto, 2014 May 13)
     22425+
     22426+Patch for problem that v:register is set to '_' after deleting into the black
     22427+hole register.
    2553822428+
    2553922429+This does not give an error: (Andre Sihera, 2014 Mar 21)
     
    2554522435+Change 'viewdir' to "$HOME/vimfiles/view" and use 'viewdiralt' to also read
    2554622436+from?
     22437+
     22438+Patch to add arglistid(), get the ID of the currently used argument list.
     22439+(Marcin Szamotulski, 2014 Apr 27)
    2554722440+
    2554822441+Include a plugin manager with Vim? Neobundle seems to be the best currently.
     
    2558322476+normal spell file. (Enno Nagel, 2014 Mar 29)
    2558422477+
     22478+-   Patch for 'breakindent' option: repeat indent for wrapped line. (Vaclav
     22479+    Smilauer, 2004 Sep 13, fix Oct 31, update 2007 May 30)
     22480+    Version for latest MacVim: Tobia Conforto, 2009 Nov 23
     22481+    More recent version: https://retracile.net/wiki/VimBreakIndent
     22482+    Posted to vim-dev by Taylor Hedberg, 2011 Nov 25
     22483+    Update by Taylor Hedberg, 2013 May 30.
     22484+    Updated for Vim 7.4 by Ken Takata, 2013 Oct 5.
     22485+    Update by Christian Brabandt, 2014 May 9.  Remarks by Ken Takata.
     22486+    Update by Christian 2014 May 12, github link on May 15
     22487+
     22488+When typing the first character of a command, e.g. "f", then using a menu, the
     22489+menu item doesn't work.  Clear typeahead when using a menu?
     22490+
    2558522491+Editing an ascii file as ucs-2 or ucs-4 causes display errors.
    2558622492+(ZyX, 2014 Mar 30)
     
    2559122497+VMS: Select() doesn't work properly, typing ESC may hang Vim.  Use sys$qiow
    2559222498+instead. (Samuel Ferencik, 2013 Sep 28)
    25593 +
     22499 
     22500-Patch to make has() check for Vim version and patch at the same time.
     22501-(Marc Weber, 2013 Jun 7)
    2559422502+Patch for XDG base directory support. (Jean François Bignolles, 2014 Mar 4)
    2559522503+
     
    2560022508+
    2560122509+Patch to make test 100 work on MS-Windows. (Taro Muraoka, 2013 Dec 12)
    25602  
    25603 -Patch to make has() check for Vim version and patch at the same time.
    25604 -(Marc Weber, 2013 Jun 7)
     22510+
    2560522511+Patch to define macros for hardcoded values. (Elias Diem, 2013 Dec 14)
    2560622512+
     
    2562322529+
    2562422530+Include Haiku port? (Adrien Destugues, Siarzhuk Zharski, 2013 Oct 24)
    25625 +
     22531 
     22532-Several Win32 functions are not using Unicode.
     22533-Patches to fix this. (Ken Takata, 2013 Aug 9)
    2562622534+Updated spec ftplugin. (Matěj Cepl, 2013 Oct 16)
    2562722535+
     
    2563022538+
    2563122539+Patch to right-align signs. (James Kolb (email james), 2013 Sep 23)
    25632  
    25633 -Several Win32 functions are not using Unicode.
    25634 -Patches to fix this. (Ken Takata, 2013 Aug 9)
     22540+
    2563522541+Patch to handle integer overflow. (Aaron Burrow, 2013 Dec 12)
    2563622542+
     
    2566122567+Patch to add funcref to Lua.  (Luis Carvalho, 2013 Sep 4)
    2566222568+With tests: Sep 5.
    25663 +
     22569 
     22570-Patch to make external commands work with multi-byte characters on Win32 when
     22571-'encoding' differs from the active codepage. (Yasuhiro Matsumoto, 2013 Aug 5)
    2566422572+Patch to fix that on suckless Terminal mousewheel up does not work.
    2566522573+(Ralph Eastwood, 2013 Nov 25)
    25666  
    25667 -Patch to make external commands work with multi-byte characters on Win32 when
    25668 -'encoding' differs from the active codepage. (Yasuhiro Matsumoto, 2013 Aug 5)
     22574+
    2566922575+Discussion about canonicalization of Hebrew. (Ron Aaron, 2011 April 10)
    2567022576 
     
    2569822604 
    2569922605 The BufUnload event is triggered when re-using the empty buffer.
    25700 @@ -76,6 +270,10 @@
     22606@@ -76,6 +280,10 @@
    2570122607 - The word that was selected (empty if abandoned complete)
    2570222608 - Type of completion: tag, omnifunc, user func.
     
    2570922615 That is, calling a dictionary function on an autoloaded dict.
    2571022616 Works OK for echo, just not for  ":call" and ":call call()". (Ted, 2011 Mar
    25711 @@ -83,10 +281,6 @@
     22617@@ -83,10 +291,6 @@
    2571222618 Patch by Christian Brabandt, 2013 Mar 23.
    2571322619 Not 100% sure this is the right solution.
     
    2572022626 Yasuhiro Matsumoto, 2013 May 31.
    2572122627 Or should we add a more general mechanism, like lambda functions?
    25722 @@ -94,6 +288,19 @@
     22628@@ -94,6 +298,19 @@
    2572322629 Problem caused by patch 7.3.638: window->open does not update window
    2572422630 correctly. Issue 91.
     
    2574022646 2013 Mar 19, later message)
    2574122647 
    25742 @@ -108,6 +315,8 @@
     22648@@ -108,6 +325,8 @@
    2574322649 Bug with 'cursorline' in diff mode.  Line being scrolled into view gets
    2574422650 highlighted as the cursor line.  (Alessandro Ivaldi, 2013 Jun 4)
     
    2574922655 May 17: with winlist() and tabpagelist().
    2575022656 May 19: with local variables.
    25751 @@ -119,6 +328,8 @@
     22657@@ -119,6 +338,8 @@
    2575222658 Patch from Christian Brabandt to make the "buffer" argument for ":sign place"
    2575322659 optional. (2013 Jul 12)
     
    2575822664 functions. (Christian Brabandt, 2013 May 8, update May 21)
    2575922665 Patch to add getlocstack() / setlocstack(). (Christian Brabandt, 2013 May 14)
    25760 @@ -149,11 +360,19 @@
     22666@@ -149,11 +370,19 @@
    2576122667 process that is running.  It might actually be some other program, e.g. after
    2576222668 a reboot.
     
    2578022686 not correctly updated. (Paul Harris, 2012 Feb 27)
    2578122687 
    25782 @@ -167,8 +386,17 @@
     22688@@ -167,8 +396,17 @@
    2578322689 
    2578422690 Patch to add functions for signs. (Christian Brabandt, 2013 Jan 27)
     
    2579822704 Patch to add 'completeselect' option.  Specifies how to select a candidate in
    2579922705 insert completion. (Shougo, 2013 May 29)
    25800 @@ -182,9 +410,6 @@
     22706@@ -182,9 +420,6 @@
    2580122707 Win32: The Python interface only works with one version of Python, selected at
    2580222708 compile time.  Can this be made to work with version 2.1 and 2.2 dynamically?
     
    2580822714 Vim script.  Requires converting the arguments and return value, like with
    2580922715 vim.bindeval().
    25810 @@ -205,9 +430,6 @@
     22716@@ -205,9 +440,6 @@
    2581122717 Add a check for b:no_match_paren in Highlight_matching_Pair() (Marcin
    2581222718 Szamotulski, 2012 Nov 8)
     
    2581822724 
    2581922725 Session file creation: 'autochdir' causes trouble.  Keep it off until after
    25820 @@ -251,10 +473,6 @@
     22726@@ -240,10 +472,6 @@
     22727 Help for 'b:undo_indent'. (Thilo Six, 2012 May 28)
     22728 Also question if examples are correct.
     22729 
     22730-It should be possible to make globpath() return a list instead of a string,
     22731-like with glob(). (Greg Novack, 2012 Nov 2)
     22732-Patch by Adnan Zafar, 2013 Jul 15.
     22733-
     22734 The input map for CTRL-O in mswin.vim causes problems after CTRL-X CTRL-O.
     22735 Suggestion for another map. (Philip Mat, 2012 Jun 18)
     22736 But use "gi" instead of "a".  Or use CTRL-\ CTRL-O.
     22737@@ -251,10 +479,6 @@
    2582122738 Patch to support user name completion on MS-Windows. (Yasuhiro Matsumoto, 2012
    2582222739 Aug 16)
     
    2582922746 is confusing.  Should say "the argument list is empty".
    2583022747 
    25831 @@ -272,8 +490,13 @@
     22748@@ -272,27 +496,23 @@
    2583222749 
    2583322750 Patch to list user digraphs. (Christian Brabandt, 2012 Apr 14)
     
    2584322760 Apr 18)
    2584422761 
    25845 @@ -286,13 +509,12 @@
    25846      More recent version: https://retracile.net/wiki/VimBreakIndent
    25847      Posted to vim-dev by Taylor Hedberg, 2011 Nov 25
    25848      Update by Taylor Hedberg, 2013 May 30.
    25849 +    Updated for Vim 7.4 by Ken Takata, 2013 Oct 5.
    25850  
     22762 Patch for has('unnamedplus') docs. (Tony Mechelynck, 2011 Sep 27)
     22763 And one for gui_x11.txt.
     22764 
     22765--   Patch for 'breakindent' option: repeat indent for wrapped line. (Vaclav
     22766-    Smilauer, 2004 Sep 13, fix Oct 31, update 2007 May 30)
     22767-    Version for latest MacVim: Tobia Conforto, 2009 Nov 23
     22768-    More recent version: https://retracile.net/wiki/VimBreakIndent
     22769-    Posted to vim-dev by Taylor Hedberg, 2011 Nov 25
     22770-    Update by Taylor Hedberg, 2013 May 30.
     22771-
    2585122772 ":cd" doesn't work when current directory path contains "**".
    2585222773 finddir() has the same problem.  (Yukihiro Nakadaira, 2012 Jan 10)
     
    2585822779 
    2585922780 Update for vim2html.pl. (Tyru, 2013 Feb 22)
    25860 @@ -374,8 +596,6 @@
     22781@@ -374,8 +594,6 @@
    2586122782 Setting $HOME on MS-Windows is not very well documented.  Suggestion by Ben
    2586222783 Fritz (2011 Oct 27).
     
    2586722788 doing ":g/test/d".  Putting every delete on the clipboard? (Robert Chan, 2011
    2586822789 Jun 17)
    25869 @@ -396,7 +616,7 @@
     22790@@ -396,10 +614,10 @@
    2587022791 Changes to manpage plugin. (Elias Toivanen, 2011 Jul 25)
    2587122792 
     
    2587522796 Would also need to do this for spellbadword() and spellsuggest().
    2587622797 
    25877  Patch for variable tabstops.
    25878 @@ -419,6 +639,8 @@
     22798-Patch for variable tabstops.
     22799+Patch for variable tabstops.  On github (Christian Brabandt, 2014 May 15)
     22800 
     22801 On 64 bit MS-Windows "long" is only 32 bits, but we sometimes need to store a
     22802 64 bits value.  Change all number options to use nropt_T and define it to the
     22803@@ -419,6 +637,8 @@
    2587922804 When setqflist() uses a filename that triggers a BufReadCmd autocommand Vim
    2588022805 doesn't jump to the correct line with :cfirst. (ZyX,  2011 Sep 18)
     
    2588522810 Patch from Christian Brabandt, 2011 Aug 19.
    2588622811 
    25887 @@ -456,6 +678,9 @@
     22812@@ -456,6 +676,9 @@
    2588822813 number, but it is in the sign column.  Doesn't look right. (ZyX 2011 Jun 5)
    2588922814 Patch by Christian Brabandt, 2011 Jun 5.  Introduces new problems.
     
    2589522820 Patch by Christian Brabandt, uses ]e [e ]t and [t. 2011 Aug 9.
    2589622821 
    25897 @@ -556,7 +781,7 @@
     22822@@ -524,9 +747,6 @@
     22823 Patch to add FoldedLineNr highlighting: different highlighting for the line
     22824 number of a closed fold. (eXerigumo Clanjor, 2013 Jul 15)
     22825 
     22826-Does not work with NFA regexp engine:
     22827-- \%u, \%x, \%o, \%d followed by a composing character
     22828-
     22829 Regexp engine performance:
     22830 - Profiling:
     22831        ./vim -u NONE -s ~/vim/test/ruby.vim
     22832@@ -556,7 +776,7 @@
    2589822833 the system encoding (usually utf-8).
    2589922834 
     
    2590422839 Problem producing tags file when hebrew.frx is present.  It has a BOM.
    2590522840 Results in E670. (Tony Mechelynck, 2010 May 2)
    25906 @@ -573,8 +798,7 @@
     22841@@ -573,8 +793,7 @@
    2590722842 
    2590822843 getpos()/setpos() don't include curswant.  getpos() could return a fifth
     
    2591422849 With "tw=55 fo+=a" typing space before ) doesn't work well. (Scott Mcdermott,
    2591522850 2010 Oct 24)
    25916 @@ -595,9 +819,6 @@
     22851@@ -595,9 +814,6 @@
    2591722852 checked to be in a comment.  Implement FM_SKIPCOMM flag of findmatchlimit().
    2591822853 Issue 46.
     
    2592422859 
    2592522860 Using CompilerSet doesn't record where an option was set from.  E.g., in the
    25926 @@ -620,8 +841,6 @@
     22861@@ -620,8 +836,6 @@
    2592722862 When 'lines' is 25 and 'scrolloff' is 12, "j" scrolls zero or two lines
    2592822863 instead of one. (Constantin Pan, 2010 Sep 10)
     
    2593322868 Winckler, 2011 May 11)
    2593422869 Requires a map mode for Insert mode started from blockwise Visual mode.
    25935 @@ -629,10 +848,6 @@
     22870@@ -629,10 +843,6 @@
    2593622871 Writing nested List and Dict in viminfo gives error message and can't be read
    2593722872 back. (Yukihiro Nakadaira, 2010 Nov 13)
     
    2594422879 Additional info by Dominique Pelle. (also on 2010 Apr 10)
    2594522880 
    25946 @@ -759,6 +974,7 @@
     22881@@ -759,6 +969,7 @@
    2594722882 
    2594822883 Patch to add farsi handling to arabic.c (Ali Gholami Rudi, 2009 May 2)
     
    2595222887 Patch to add "focusonly" to 'scrollopt', so that scrollbind also applies in
    2595322888 window that doesn't have focus. (Jonathon Mah, 2009 Jan 12)
    25954 @@ -838,8 +1054,6 @@
     22889@@ -838,8 +1049,6 @@
    2595522890 Win32 GUI: last message from startup doesn't show up when there is an echoerr
    2595622891 command. (Cyril Slobin, 2009 Mar 13)
     
    2596122896 does not work. (Nieko Maatjes, 2009 Jan 8, Ingo Karkat, 2009 Jan 22)
    2596222897 
    25963 @@ -856,7 +1070,7 @@
     22898@@ -856,7 +1065,12 @@
    2596422899 Using ~ works OK on 'a' with composing char, but not on 0x0418  with composing
    2596522900 char 0x0301. (Tony Mechelynck, 2009 Mar 4)
    2596622901 
    2596722902-A function on a dictionary is not profiled. (Zyx, 2010 Dec 25)
     22903+Searching for composing char works, but not when inside []. (ZyX, Benjamin R.
     22904+Haskell, 2010 Aug 24)
     22905+
     22906+This does not work yet: "a\(%C\)" (get composing characters into a submatch).
     22907+
    2596822908+A function on a dictionary is not profiled. (ZyX, 2010 Dec 25)
    2596922909 
     
    2599722937 Document that default font in Athena can be set with resources:
    2599822938    XtDefaultFont: "9x15"
    25999 @@ -1296,14 +1508,17 @@
     22939@@ -942,6 +1154,7 @@
     22940 
     22941 ":pedit %" with a BufReadPre autocommand causes the cursor to move to the
     22942 first line. (Ingo Karkat, 2008 Jul 1)  Ian Kelling is working on this.
     22943+Similar problem with ":e". (Marc Montu, 2014 Apr 22)
     22944 
     22945 Wildmenu not deleted: "gvim -u NONE", ":set nocp wildmenu cmdheight=3
     22946 laststatus=2", CTRL-D CTRL-H CTRL-H CTRL-H. (A.Politz, 2008 April 1)
     22947@@ -1085,9 +1298,6 @@
     22948 result in no matches.  Convert chars to lower case? (Erik Wognsen, 2009 Apr
     22949 16)
     22950 
     22951-Searching for composing char works, but not when inside []. (ZyX, Benjamin R.
     22952-Haskell, 2010 Aug 24)
     22953-
     22954 Fail to edit file after failed register access.  Error flag remains set?
     22955 (Lech Lorens, 2010 Aug 30)
     22956 
     22957@@ -1289,6 +1499,7 @@
     22958 
     22959 Win64: Seek error in swap file for a very big file (3 Gbyte).  Check storing
     22960 pointer in long and seek offset in 64 bit var.
     22961+Patches from Ken Takata might help (2014 Apr 17)
     22962 
     22963 Win32: patch for fullscreen mode. (Liushaolin, 2008 April 17)
     22964 
     22965@@ -1296,14 +1507,17 @@
    2600022966 Depends on 'shellslash', 'shellquote' and 'shellxquote', but shellescape()
    2600122967 only takes 'shellslash' into account.
     
    2601922985 2007 Jun 21)
    2602022986 
    26021 @@ -1459,6 +1674,9 @@
     22987@@ -1459,6 +1673,9 @@
    2602222988 tree stops unexpectedly when using ":cd " and entering a directory that
    2602322989 doesn't contain other directories.
     
    2602922995    highlight Normal ctermbg=DarkGray
    2603022996    set background=dark
    26031 @@ -1685,7 +1903,7 @@
     22997@@ -1685,7 +1902,7 @@
    2603222998 -   testdir/Make_dos_sh.mak for running tests with MingW. (Bill Mccarthy, 2008
    2603322999     Sep 13)
     
    2603823004     Vissale Neang.  (Martin Stubenschrott) Asked Vissale to make the scripts
    2603923005     more friendly for the Vim distribution.
    26040 @@ -1715,7 +1933,7 @@
     23006@@ -1715,7 +1932,7 @@
    2604123007     How does this work?  Missing comments.
    2604223008 8   Add a few more command names to the menus.  Patch from Jiri Brezina
     
    2604723013 -   Include flipcase patch: ~/vim/patches/wall.flipcase2 ?  Make it work
    2604823014     for multi-byte characters.
    26049 @@ -1864,8 +2082,6 @@
     23015@@ -1864,8 +2081,6 @@
    2605023016 Win32 GUI known bugs:
    2605123017 -   Win32: tearoff menu window should have a scrollbar when it's taller than
     
    2605623022     file names.  Can we load unicows.dll dynamically?
    2605723023 8   The -P argument doesn't work very well with many MDI applications.
    26058 @@ -1873,9 +2089,6 @@
     23024@@ -1873,9 +2088,6 @@
    2605923025     Tutorial: http://win32assembly.online.fr/tut32.html
    2606023026 8   In eval.c, io.h is included when MSWIN32 is defined.  Shouldn't this be
     
    2606623032     of ":only" is highlighted like the cursor.  (Lipelis)
    2606723033 8   When 'encoding' is "utf-8", should use 'guifont' for both normal and wide
    26068 @@ -1887,9 +2100,6 @@
     23034@@ -1887,9 +2099,6 @@
    2606923035 8   Use another default for 'termencoding': the active codepage.  Means that
    2607023036     when 'encoding' is changed typing characters still works properly.
     
    2607623042     2004 May 9)
    2607723043 8   Win32: When clicking on the gvim title bar, which gives it focus, produces
    26078 @@ -2272,8 +2482,6 @@
     23044@@ -2272,8 +2481,6 @@
    2607923045     character. (Yasuhiro Matsumoto)  It should return 1 when used on a tail
    2608023046     byte, like for utf-8.  Store second byte of double-byte in ScreenLines2[]
     
    2608523051     ":insert" command, causing the following "endfunction" not to be found.
    2608623052     Add skipping this perl construction inside function definitions.
    26087 @@ -2566,8 +2774,6 @@
     23053@@ -2566,8 +2773,6 @@
    2608823054     input method called from GDK code.  Without Perl it doesn't crash.
    2608923055 -   VMS: Vimdiff doesn't work with the VMS diff, because the output looks
     
    2609423060     in Vim as if the rightmost scrollbar was used.
    2609523061 -   GTK with Gnome: Produces an error message when starting up:
    26096 @@ -2736,10 +2942,6 @@
     23062@@ -2736,10 +2941,6 @@
    2609723063 
    2609823064 
     
    2610523071     https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=219777   
    2610623072 -   Unicode defines another quote character: 0x2019.  Use it as an equivalent
    26107 @@ -3153,6 +3355,7 @@
     23073@@ -2925,12 +3126,8 @@
     23074 8   toupper() function doesn't handle byte count changes.
     23075 7   Searching and composing characters:
     23076     When searching, should order of composing characters be ignored?
     23077-    Add special item to match with a composing character, zero-width, so that
     23078-    one can replace a base character and keep the composing characters.
     23079     Add a special item to match with a composing character, so that composing
     23080     characters can be manipulated.
     23081-    Add a modifier to ignore composing characters, only compare base
     23082-    characters.  Useful for Hebrew (Ron Aaron)
     23083 8   Should implement 'delcombine' for command line editing.
     23084 8   Detect overlong UTF-8 sequences and handle them like illegal bytes.
     23085 8   ":s/x/\u\1/" doesn't work, making uppercase isn't done for multi-byte
     23086@@ -3153,6 +3350,7 @@
    2610823087 Built-in script language:
    2610923088 8   Make the filename and line number available to script functions, so that
     
    2611323092     restore option values.  Especially useful for new options.  Problem: how
    2611423093     to avoid a performance penalty (esp. for string options)?
    26115 @@ -4035,8 +4238,7 @@
     23094@@ -4035,8 +4233,7 @@
    2611623095 7   Use Tabs for the indent of starting lines, pad with spaces for
    2611723096     continuation lines.  Allows changing 'tabstop' without messing up the
     
    2612323102 
    2612423103 Java:
    26125 @@ -4655,7 +4857,7 @@
     23104@@ -4655,7 +4852,7 @@
    2612623105 
    2612723106 Digraphs:
     
    2613223111     characters?
    2613323112 8   Add command to remove one or more (all) digraphs. (Brown)
    26134 @@ -4852,6 +5054,7 @@
     23113@@ -4852,6 +5049,7 @@
    2613523114 6   Add ":timer" command, to set a command to be executed at a certain
    2613623115     interval, or once after some time has elapsed. (Aaron)
     
    2614223121diff -Naur vim74.orig/runtime/doc/undo.txt vim74/runtime/doc/undo.txt
    2614323122--- vim74.orig/runtime/doc/undo.txt     2013-08-10 11:25:02.000000000 +0000
    26144 +++ vim74/runtime/doc/undo.txt  2014-04-27 05:20:57.391750620 +0000
     23123+++ vim74/runtime/doc/undo.txt  2014-06-01 00:42:52.734201477 +0000
    2614523124@@ -1,4 +1,4 @@
    2614623125-*undo.txt*      For Vim version 7.4.  Last change: 2012 Mar 04
     
    2617223151diff -Naur vim74.orig/runtime/doc/usr_25.txt vim74/runtime/doc/usr_25.txt
    2617323152--- vim74.orig/runtime/doc/usr_25.txt   2013-08-10 11:25:05.000000000 +0000
    26174 +++ vim74/runtime/doc/usr_25.txt        2014-04-27 05:20:57.401750869 +0000
     23153+++ vim74/runtime/doc/usr_25.txt        2014-06-01 00:42:52.944200942 +0000
    2617523154@@ -86,7 +86,7 @@
    2617623155 
     
    2618423163diff -Naur vim74.orig/runtime/doc/usr_30.txt vim74/runtime/doc/usr_30.txt
    2618523164--- vim74.orig/runtime/doc/usr_30.txt   2013-08-10 11:25:05.000000000 +0000
    26186 +++ vim74/runtime/doc/usr_30.txt        2014-04-27 05:20:57.405084285 +0000
     23165+++ vim74/runtime/doc/usr_30.txt        2014-06-01 00:42:53.064200637 +0000
    2618723166@@ -128,7 +128,7 @@
    2618823167 You can include special Vim keywords in the command specification.  The %
     
    2620523184diff -Naur vim74.orig/runtime/doc/usr_40.txt vim74/runtime/doc/usr_40.txt
    2620623185--- vim74.orig/runtime/doc/usr_40.txt   2013-08-10 11:25:05.000000000 +0000
    26207 +++ vim74/runtime/doc/usr_40.txt        2014-04-27 05:20:57.408417700 +0000
     23186+++ vim74/runtime/doc/usr_40.txt        2014-06-01 00:42:53.100867210 +0000
    2620823187@@ -209,7 +209,7 @@
    2620923188 separates the two commands.  This also means that a | character can't be used
     
    2621723196diff -Naur vim74.orig/runtime/doc/usr_41.txt vim74/runtime/doc/usr_41.txt
    2621823197--- vim74.orig/runtime/doc/usr_41.txt   2013-08-10 11:25:05.000000000 +0000
    26219 +++ vim74/runtime/doc/usr_41.txt        2014-04-27 05:20:57.408417700 +0000
     23198+++ vim74/runtime/doc/usr_41.txt        2014-06-01 00:42:53.110867184 +0000
    2622023199@@ -1,4 +1,4 @@
    2622123200-*usr_41.txt*   For Vim version 7.4.  Last change: 2013 Feb 20
     
    2630323282        readfile()              read a file into a List of lines
    2630423283        writefile()             write a List of lines into a file
    26305 @@ -883,14 +898,22 @@
     23284@@ -757,6 +772,7 @@
     23285 Buffers, windows and the argument list:
     23286        argc()                  number of entries in the argument list
     23287        argidx()                current position in the argument list
     23288+       arglistid()             get id of the argument list
     23289        argv()                  get one entry from the argument list
     23290        bufexists()             check if a buffer exists
     23291        buflisted()             check if a buffer exists and is listed
     23292@@ -883,14 +899,22 @@
    2630623293        libcall()               call a function in an external library
    2630723294        libcallnr()             idem, returning a number
     
    2632823315diff -Naur vim74.orig/runtime/doc/usr_42.txt vim74/runtime/doc/usr_42.txt
    2632923316--- vim74.orig/runtime/doc/usr_42.txt   2013-08-10 11:25:05.000000000 +0000
    26330 +++ vim74/runtime/doc/usr_42.txt        2014-04-27 05:20:57.408417700 +0000
     23317+++ vim74/runtime/doc/usr_42.txt        2014-06-01 00:42:53.120867159 +0000
    2633123318@@ -311,7 +311,7 @@
    2633223319 item with a bitmap.  For example, define a new toolbar item with: >
     
    2634023327diff -Naur vim74.orig/runtime/doc/usr_45.txt vim74/runtime/doc/usr_45.txt
    2634123328--- vim74.orig/runtime/doc/usr_45.txt   2013-08-10 11:25:06.000000000 +0000
    26342 +++ vim74/runtime/doc/usr_45.txt        2014-04-27 05:20:57.411751116 +0000
     23329+++ vim74/runtime/doc/usr_45.txt        2014-06-01 00:42:53.167533707 +0000
    2634323330@@ -328,8 +328,8 @@
    2634423331 *45.5* Entering language text
     
    2635423341diff -Naur vim74.orig/runtime/doc/various.txt vim74/runtime/doc/various.txt
    2635523342--- vim74.orig/runtime/doc/various.txt  2013-08-10 11:25:06.000000000 +0000
    26356 +++ vim74/runtime/doc/various.txt       2014-04-27 05:20:57.411751116 +0000
     23343+++ vim74/runtime/doc/various.txt       2014-06-01 00:42:53.190866981 +0000
    2635723344@@ -1,4 +1,4 @@
    2635823345-*various.txt*   For Vim version 7.4.  Last change: 2013 May 18
    26359 +*various.txt*   For Vim version 7.4.  Last change: 2014 Apr 01
     23346+*various.txt*   For Vim version 7.4.  Last change: 2014 May 22
    2636023347 
    2636123348 
     
    2639923386                        For Win32 also see |:!start|.
    2640023387+
    26401 +                       After the command has been executed, the timestamp of
    26402 +                       the current file is checked |timestamp|.
     23388+                       After the command has been executed, the timestamp and
     23389+                       size of the current file is checked |timestamp|.
    2640323390+
    2640423391                        Vim redraws the screen after the command is finished,
     
    2641323400 B  *+arabic*           |Arabic| language support
    2641423401 N  *+autocmd*          |:autocmd|, automatic commands
    26415 @@ -417,7 +434,7 @@
     23402@@ -362,6 +379,7 @@
     23403 N  *+mouseshape*       |'mouseshape'|
     23404 B  *+mouse_dec*                Unix only: Dec terminal mouse handling |dec-mouse|
     23405 N  *+mouse_gpm*                Unix only: Linux console mouse handling |gpm-mouse|
     23406+N  *+mouse_jsbterm*    JSB mouse handling |jsbterm-mouse|
     23407 B  *+mouse_netterm*    Unix only: netterm mouse handling |netterm-mouse|
     23408 N  *+mouse_pterm*      QNX only: pterm mouse handling |qnx-terminal|
     23409 N  *+mouse_sysmouse*   Unix only: *BSD console mouse handling |sysmouse|
     23410@@ -417,7 +435,7 @@
    2641623411 N  *+viminfo*          |'viminfo'|
    2641723412 N  *+vertsplit*                Vertically split windows |:vsplit|
     
    2642223417 N  *+vreplace*         |gR| and |gr|
    2642323418 N  *+wildignore*       |'wildignore'|
    26424 @@ -426,6 +443,7 @@
     23419@@ -426,6 +444,7 @@
    2642523420 m  *+writebackup*      |'writebackup'| is default on
    2642623421 m  *+xim*              X input method |xim|
     
    2643223427diff -Naur vim74.orig/runtime/doc/version5.txt vim74/runtime/doc/version5.txt
    2643323428--- vim74.orig/runtime/doc/version5.txt 2013-08-10 11:25:07.000000000 +0000
    26434 +++ vim74/runtime/doc/version5.txt      2014-04-27 05:20:57.415084533 +0000
     23429+++ vim74/runtime/doc/version5.txt      2014-06-01 00:42:53.237533529 +0000
    2643523430@@ -2020,7 +2020,7 @@
    2643623431 
     
    2644423439diff -Naur vim74.orig/runtime/doc/version7.txt vim74/runtime/doc/version7.txt
    2644523440--- vim74.orig/runtime/doc/version7.txt 2013-08-10 12:23:06.000000000 +0000
    26446 +++ vim74/runtime/doc/version7.txt      2014-04-27 05:20:57.428418198 +0000
     23441+++ vim74/runtime/doc/version7.txt      2014-06-01 00:42:53.430866370 +0000
    2644723442@@ -1,4 +1,4 @@
    2644823443-*version7.txt*  For Vim version 7.4.  Last change: 2013 Aug 10
     
    2648823483diff -Naur vim74.orig/runtime/doc/vi_diff.txt vim74/runtime/doc/vi_diff.txt
    2648923484--- vim74.orig/runtime/doc/vi_diff.txt  2013-08-10 11:25:07.000000000 +0000
    26490 +++ vim74/runtime/doc/vi_diff.txt       2014-04-27 05:20:57.428418198 +0000
     23485+++ vim74/runtime/doc/vi_diff.txt       2014-06-01 00:42:53.477532917 +0000
    2649123486@@ -1,4 +1,4 @@
    2649223487-*vi_diff.txt*   For Vim version 7.4.  Last change: 2012 Aug 08
     
    2651523510diff -Naur vim74.orig/runtime/doc/visual.txt vim74/runtime/doc/visual.txt
    2651623511--- vim74.orig/runtime/doc/visual.txt   2013-08-10 11:25:08.000000000 +0000
    26517 +++ vim74/runtime/doc/visual.txt        2014-04-27 05:20:57.448418693 +0000
     23512+++ vim74/runtime/doc/visual.txt        2014-06-01 00:42:53.920865122 +0000
    2651823513@@ -1,4 +1,4 @@
    2651923514-*visual.txt*    For Vim version 7.4.  Last change: 2012 Aug 15
     
    2654623541diff -Naur vim74.orig/runtime/doc/windows.txt vim74/runtime/doc/windows.txt
    2654723542--- vim74.orig/runtime/doc/windows.txt  2013-08-10 11:25:08.000000000 +0000
    26548 +++ vim74/runtime/doc/windows.txt       2014-04-27 05:20:57.448418693 +0000
     23543+++ vim74/runtime/doc/windows.txt       2014-06-01 00:42:53.937531746 +0000
    2654923544@@ -1,4 +1,4 @@
    2655023545-*windows.txt*   For Vim version 7.4.  Last change: 2012 Nov 15
     
    2658223577diff -Naur vim74.orig/runtime/filetype.vim vim74/runtime/filetype.vim
    2658323578--- vim74.orig/runtime/filetype.vim     2013-08-03 15:50:05.000000000 +0000
    26584 +++ vim74/runtime/filetype.vim  2014-04-27 05:20:57.455085527 +0000
     23579+++ vim74/runtime/filetype.vim  2014-06-01 00:42:54.130864587 +0000
    2658523580@@ -1,7 +1,7 @@
    2658623581 " Vim support file to detect file types
     
    2676423759diff -Naur vim74.orig/runtime/ftplugin/changelog.vim vim74/runtime/ftplugin/changelog.vim
    2676523760--- vim74.orig/runtime/ftplugin/changelog.vim   2012-08-23 20:47:22.000000000 +0000
    26766 +++ vim74/runtime/ftplugin/changelog.vim        2014-04-27 05:20:57.465085774 +0000
     23761+++ vim74/runtime/ftplugin/changelog.vim        2014-06-01 00:42:54.380863951 +0000
    2676723762@@ -1,7 +1,7 @@
    2676823763 " Vim filetype plugin file
     
    2687923874diff -Naur vim74.orig/runtime/ftplugin/clojure.vim vim74/runtime/ftplugin/clojure.vim
    2688023875--- vim74.orig/runtime/ftplugin/clojure.vim     2013-02-06 14:35:23.000000000 +0000
    26881 +++ vim74/runtime/ftplugin/clojure.vim  2014-04-27 05:20:57.465085774 +0000
     23876+++ vim74/runtime/ftplugin/clojure.vim  2014-06-01 00:42:54.384197276 +0000
    2688223877@@ -1,44 +1,60 @@
    2688323878 " Vim filetype plugin file
     
    2701124006diff -Naur vim74.orig/runtime/ftplugin/cobol.vim vim74/runtime/ftplugin/cobol.vim
    2701224007--- vim74.orig/runtime/ftplugin/cobol.vim       2010-05-15 11:04:03.000000000 +0000
    27013 +++ vim74/runtime/ftplugin/cobol.vim    2014-04-27 05:20:57.465085774 +0000
     24008+++ vim74/runtime/ftplugin/cobol.vim    2014-06-01 00:42:54.400863900 +0000
    2701424009@@ -1,7 +1,7 @@
    2701524010 " Vim filetype plugin file
     
    2706024055diff -Naur vim74.orig/runtime/ftplugin/debchangelog.vim vim74/runtime/ftplugin/debchangelog.vim
    2706124056--- vim74.orig/runtime/ftplugin/debchangelog.vim        2012-02-04 19:59:23.000000000 +0000
    27062 +++ vim74/runtime/ftplugin/debchangelog.vim     2014-04-27 05:20:57.471752607 +0000
     24057+++ vim74/runtime/ftplugin/debchangelog.vim     2014-06-01 00:42:54.534196894 +0000
    2706324058@@ -3,7 +3,7 @@
    2706424059 " Maintainer:   Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
     
    2708124076diff -Naur vim74.orig/runtime/ftplugin/fortran.vim vim74/runtime/ftplugin/fortran.vim
    2708224077--- vim74.orig/runtime/ftplugin/fortran.vim     2012-04-18 07:32:40.000000000 +0000
    27083 +++ vim74/runtime/ftplugin/fortran.vim  2014-04-27 05:20:57.478419439 +0000
     24078+++ vim74/runtime/ftplugin/fortran.vim  2014-06-01 00:42:54.750863009 +0000
    2708424079@@ -1,12 +1,12 @@
    2708524080 " Vim settings file
     
    2713324128diff -Naur vim74.orig/runtime/ftplugin/j.vim vim74/runtime/ftplugin/j.vim
    2713424129--- vim74.orig/runtime/ftplugin/j.vim   1970-01-01 00:00:00.000000000 +0000
    27135 +++ vim74/runtime/ftplugin/j.vim        2014-04-27 05:20:57.485086272 +0000
     24130+++ vim74/runtime/ftplugin/j.vim        2014-06-01 00:42:55.014195672 +0000
    2713624131@@ -0,0 +1,75 @@
    2713724132+" Vim filetype plugin
     
    2721224207diff -Naur vim74.orig/runtime/ftplugin/jproperties.vim vim74/runtime/ftplugin/jproperties.vim
    2721324208--- vim74.orig/runtime/ftplugin/jproperties.vim 1970-01-01 00:00:00.000000000 +0000
    27214 +++ vim74/runtime/ftplugin/jproperties.vim      2014-04-27 05:20:57.488419688 +0000
     24209+++ vim74/runtime/ftplugin/jproperties.vim      2014-06-01 00:42:55.057528895 +0000
    2721524210@@ -0,0 +1,15 @@
    2721624211+" Vim filetype plugin
     
    2723124226diff -Naur vim74.orig/runtime/ftplugin/lisp.vim vim74/runtime/ftplugin/lisp.vim
    2723224227--- vim74.orig/runtime/ftplugin/lisp.vim        2013-02-13 11:35:55.000000000 +0000
    27233 +++ vim74/runtime/ftplugin/lisp.vim     2014-04-27 05:20:57.491753103 +0000
     24228+++ vim74/runtime/ftplugin/lisp.vim     2014-06-01 00:42:55.154195315 +0000
    2723424229@@ -4,7 +4,7 @@
    2723524230 " URL:          http://sites.google.com/site/khorser/opensource/vim
     
    2725324248diff -Naur vim74.orig/runtime/ftplugin/python.vim vim74/runtime/ftplugin/python.vim
    2725424249--- vim74.orig/runtime/ftplugin/python.vim      2012-04-30 11:49:26.000000000 +0000
    27255 +++ vim74/runtime/ftplugin/python.vim   2014-04-27 05:20:57.508420184 +0000
     24250+++ vim74/runtime/ftplugin/python.vim   2014-06-01 00:42:55.670860666 +0000
    2725624251@@ -1,7 +1,8 @@
    2725724252 " Vim filetype plugin file
     
    2733624331diff -Naur vim74.orig/runtime/ftplugin/registry.vim vim74/runtime/ftplugin/registry.vim
    2733724332--- vim74.orig/runtime/ftplugin/registry.vim    1970-01-01 00:00:00.000000000 +0000
    27338 +++ vim74/runtime/ftplugin/registry.vim 2014-04-27 05:20:57.511753600 +0000
     24333+++ vim74/runtime/ftplugin/registry.vim 2014-06-01 00:42:55.717527214 +0000
    2733924334@@ -0,0 +1,36 @@
    2734024335+" Vim filetype plugin file
     
    2737624371diff -Naur vim74.orig/runtime/ftplugin/scheme.vim vim74/runtime/ftplugin/scheme.vim
    2737724372--- vim74.orig/runtime/ftplugin/scheme.vim      2013-02-13 11:35:55.000000000 +0000
    27378 +++ vim74/runtime/ftplugin/scheme.vim   2014-04-27 05:20:57.515087016 +0000
     24373+++ vim74/runtime/ftplugin/scheme.vim   2014-06-01 00:42:55.780860386 +0000
    2737924374@@ -4,7 +4,7 @@
    2738024375 " URL:          http://sites.google.com/site/khorser/opensource/vim
     
    2739924394diff -Naur vim74.orig/runtime/ftplugin/spec.vim vim74/runtime/ftplugin/spec.vim
    2740024395--- vim74.orig/runtime/ftplugin/spec.vim        2012-03-07 12:16:03.000000000 +0000
    27401 +++ vim74/runtime/ftplugin/spec.vim     2014-04-27 05:20:57.518420433 +0000
     24396+++ vim74/runtime/ftplugin/spec.vim     2014-06-01 00:42:55.910860055 +0000
    2740224397@@ -1,7 +1,8 @@
    2740324398 " Plugin to update the %changelog section of RPM spec files
     
    2742424419diff -Naur vim74.orig/runtime/ftplugin/systemverilog.vim vim74/runtime/ftplugin/systemverilog.vim
    2742524420--- vim74.orig/runtime/ftplugin/systemverilog.vim       1970-01-01 00:00:00.000000000 +0000
    27426 +++ vim74/runtime/ftplugin/systemverilog.vim    2014-04-27 05:20:57.521753849 +0000
     24421+++ vim74/runtime/ftplugin/systemverilog.vim    2014-06-01 00:42:55.994193176 +0000
    2742724422@@ -0,0 +1,11 @@
    2742824423+" Vim filetype plugin file
     
    2743924434diff -Naur vim74.orig/runtime/indent/clojure.vim vim74/runtime/indent/clojure.vim
    2744024435--- vim74.orig/runtime/indent/clojure.vim       2013-02-06 14:35:23.000000000 +0000
    27441 +++ vim74/runtime/indent/clojure.vim    2014-04-27 05:20:57.541754345 +0000
     24436+++ vim74/runtime/indent/clojure.vim    2014-06-01 00:42:56.610858273 +0000
    2744224437@@ -1,23 +1,27 @@
    2744324438 " Vim indent file
     
    2813225127diff -Naur vim74.orig/runtime/indent/j.vim vim74/runtime/indent/j.vim
    2813325128--- vim74.orig/runtime/indent/j.vim     1970-01-01 00:00:00.000000000 +0000
    28134 +++ vim74/runtime/indent/j.vim  2014-04-27 05:20:57.555088009 +0000
     25129+++ vim74/runtime/indent/j.vim  2014-06-01 00:42:56.970857356 +0000
    2813525130@@ -0,0 +1,50 @@
    2813625131+" Vim indent file
     
    2818625181diff -Naur vim74.orig/runtime/indent/php.vim vim74/runtime/indent/php.vim
    2818725182--- vim74.orig/runtime/indent/php.vim   2013-08-07 09:36:56.000000000 +0000
    28188 +++ vim74/runtime/indent/php.vim        2014-04-27 05:20:57.565088257 +0000
    28189 @@ -3,7 +3,7 @@
     25183+++ vim74/runtime/indent/php.vim        2014-06-01 00:42:57.737522071 +0000
     25184@@ -3,8 +3,8 @@
    2819025185 " Author:      John Wellesz <John.wellesz (AT) teaser (DOT) fr>
    2819125186 " URL:         http://www.2072productions.com/vim/indent/php.vim
    2819225187 " Home:                https://github.com/2072/PHP-Indenting-for-VIm
    2819325188-" Last Change: 2013 August 7th
    28194 +" Last Change: 2014 Jan 21
    28195  " Version:     1.39
     25189-" Version:     1.39
     25190+" Last Change: 2014 April 3rd
     25191+" Version:     1.49
    2819625192 "
    2819725193 "
    28198 @@ -642,7 +642,7 @@
    28199             if previous_line =~ '^\s*}\|;\s*}'.endline " XXX
     25194 "      Type :help php-indent for available options
     25195@@ -39,7 +39,8 @@
     25196 "
     25197 "      or simply 'let' the option PHP_removeCRwhenUnix to 1 and the script will
     25198 "      silently remove them when VIM load this script (at each bufread).
     25199-"
     25200+
     25201+
     25202 
     25203 if exists("b:did_indent")
     25204     finish
     25205@@ -126,14 +127,26 @@
     25206     finish " XXX -- comment this line for easy dev
     25207 endif
     25208 
     25209+
     25210+let s:notPhpHereDoc = '\%(break\|return\|continue\|exit\|die\|else\)'
     25211+let s:blockstart = '\%(\%(\%(}\s*\)\=else\%(\s\+\)\=\)\=if\>\|\%(}\s*\)\?else\>\|do\>\|while\>\|switch\>\|case\>\|default\>\|for\%(each\)\=\>\|declare\>\|class\>\|trait\>\|use\>\|interface\>\|abstract\>\|final\>\|try\>\|\%(}\s*\)\=catch\>\|\%(}\s*\)\=finally\>\)'
     25212+let s:functionDecl = '\<function\>\%(\s\+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*\)\=\s*(.*'
     25213 let s:endline= '\s*\%(//.*\|#.*\|/\*.*\*/\s*\)\=$'
     25214+let s:terminated = '\%(\%(;\%(\s*\%(?>\|}\)\)\=\|<<<''\=\a\w*''\=$\|^\s*}\)'.s:endline.'\)\|^[^''"`]*[''"`]$'
     25215 let s:PHP_startindenttag = '<?\%(.*?>\)\@!\|<script[^>]*>\%(.*<\/script>\)\@!'
     25216 
     25217 
     25218+
     25219+let s:escapeDebugStops = 0
     25220 function! DebugPrintReturn(scriptLine)
     25221 
     25222-    echo "debug:" . a:scriptLine
     25223-    call getchar()
     25224+    if ! s:escapeDebugStops
     25225+       echo "debug:" . a:scriptLine
     25226+       let c = getchar()
     25227+       if c == "\<Del>"
     25228+           let s:escapeDebugStops = 1
     25229+       end
     25230+    endif
     25231 
     25232 endfunction
     25233 
     25234@@ -190,6 +203,11 @@
     25235            while getline(lnum) !~? tofind && lnum > 1
     25236                let lnum = lnum - 1
     25237            endwhile
     25238+       elseif lastline =~ '^[^''"`]*[''"`][;,]'.s:endline
     25239+           let tofind=substitute( lastline, '^.*\([''"`]\)[;,].*$', '^[^\1]\\+[\1]$', '')
     25240+           while getline(lnum) !~? tofind && lnum > 1
     25241+               let lnum = lnum - 1
     25242+           endwhile
     25243        else
     25244            break
     25245        endif
     25246@@ -211,9 +229,9 @@
     25247     let line = getline(".")
     25248 
     25249     if line =~ "\\([\"']\\).*/\\*.*\\1" || line =~ '\%(//\|#\).*/\*'
     25250-        return 1
     25251+       return 1
     25252     else
     25253-        return 0
     25254+       return 0
     25255     endif
     25256 endfun
     25257 
     25258@@ -226,9 +244,23 @@
     25259     endif
     25260 endfun " }}}
     25261 
     25262-function! FindOpenBracket(lnum) " {{{
     25263+function! FindOpenBracket(lnum, blockStarter) " {{{
     25264     call cursor(a:lnum, 1)
     25265-    return searchpair('{', '', '}', 'bW', 'Skippmatch()')
     25266+    let line = searchpair('{', '', '}', 'bW', 'Skippmatch()')
     25267+
     25268+    if a:blockStarter == 1
     25269+       while line > 1
     25270+           let linec = getline(line)
     25271+
     25272+           if linec =~ s:terminated || linec =~ '^\s*\%(' . s:blockstart . '\)\|'. s:functionDecl . s:endline
     25273+               break
     25274+           endif
     25275+
     25276+           let line = GetLastRealCodeLNum(line - 1)
     25277+       endwhile
     25278+    endif
     25279+
     25280+    return line
     25281 endfun " }}}
     25282 
     25283 function! FindTheIfOfAnElse (lnum, StopAfterFirstPrevElse) " {{{
     25284@@ -248,7 +280,7 @@
     25285     endif
     25286 
     25287     if getline(beforeelse) =~ '^\s*}'
     25288-       let beforeelse = FindOpenBracket(beforeelse)
     25289+       let beforeelse = FindOpenBracket(beforeelse, 0)
     25290 
     25291        if getline(beforeelse) =~ '^\s*{'
     25292            let beforeelse = GetLastRealCodeLNum(beforeelse - 1)
     25293@@ -285,13 +317,13 @@
     25294        return indent(1) - &sw * b:PHP_vintage_case_default_indent
     25295     end
     25296 
     25297-    if getline(test) =~ '^\s*}'
     25298-       let test = FindOpenBracket(test)
     25299+    while getline(test) =~ '^\s*}' && test > 1
     25300+       let test = GetLastRealCodeLNum(FindOpenBracket(test, 0) - 1)
     25301 
     25302-       if getline(test) =~ '^\s*{'
     25303-           let test = GetLastRealCodeLNum(GetLastRealCodeLNum(test - 1) - 1)
     25304+       if getline(test) =~ '^\s*switch\>'
     25305+           let test = GetLastRealCodeLNum(test - 1)
     25306        endif
     25307-    endif
     25308+    endwhile
     25309 
     25310     if getline(test) =~# '^\s*switch\>'
     25311        return indent(test)
     25312@@ -308,7 +340,7 @@
     25313     let cline = getline(a:lnum)
     25314 
     25315     if a:tofind==""
     25316-       let tofind = "^\\s*[\"']*\\s*\\zs\\S"
     25317+       let tofind = "^\\s*[\"'`]*\\s*\\zs\\S"
     25318     else
     25319        let tofind = a:tofind
     25320     endif
     25321@@ -319,6 +351,14 @@
     25322 
     25323     let synname = synIDattr(synID(a:lnum, coltotest, 0), "name")
     25324 
     25325+    if synname == 'phpStringSingle' || synname == 'phpStringDouble' || synname == 'phpBacktick'
     25326+       if cline !~ '^\s*[''"`]'
     25327+           return ""
     25328+       else
     25329+           return synname
     25330+       end
     25331+    end
     25332+
     25333     if get(s:SynPHPMatchGroups, synname) || synname =~ '^php' ||  synname =~? '^javaScript'
     25334        return synname
     25335     else
     25336@@ -326,9 +366,6 @@
     25337     endif
     25338 endfunction " }}}
     25339 
     25340-let s:notPhpHereDoc = '\%(break\|return\|continue\|exit\|die\|else\)'
     25341-let s:blockstart = '\%(\%(\%(}\s*\)\=else\%(\s\+\)\=\)\=if\>\|else\>\|while\>\|switch\>\|case\>\|default\>\|for\%(each\)\=\>\|declare\>\|class\>\|interface\>\|abstract\>\|try\>\|catch\>\)'
     25342-
     25343 let s:autoresetoptions = 0
     25344 if ! s:autoresetoptions
     25345     let s:autoresetoptions = 1
     25346@@ -344,7 +381,6 @@
     25347            setlocal formatoptions+=q
     25348            setlocal formatoptions+=r
     25349            setlocal formatoptions+=o
     25350-           setlocal formatoptions+=w
     25351            setlocal formatoptions+=c
     25352            setlocal formatoptions+=b
     25353        endif
     25354@@ -443,6 +479,7 @@
     25355     " Test if we are indenting PHP code {{{
     25356     let lnum = prevnonblank(v:lnum - 1)
     25357     let last_line = getline(lnum)
     25358+    let endline= s:endline
     25359 
     25360     if b:InPHPcode_tofind!=""
     25361        if cline =~? b:InPHPcode_tofind
     25362@@ -483,6 +520,9 @@
     25363                let b:InPHPcode_and_script = 1
     25364            endif
     25365 
     25366+       elseif last_line =~ '^[^''"`]\+[''"`]$' " a string identifier with nothing after it and no other string identifier before
     25367+           let b:InPHPcode = 0
     25368+           let b:InPHPcode_tofind = substitute( last_line, '^.*\([''"`]\).*$', '^[^\1]*\1[;,]$', '')
     25369        elseif last_line =~? '<<<''\=\a\w*''\=$'
     25370            let b:InPHPcode = 0
     25371            let b:InPHPcode_tofind = substitute( last_line, '^.*<<<''\=\(\a\w*\)''\=$', '^\\s*\1;\\=$', '')
     25372@@ -545,7 +585,7 @@
     25373        return 0
     25374     endif
     25375 
     25376-    if cline =~? '^\s*\a\w*;$\|^\a\w*$' && cline !~? s:notPhpHereDoc
     25377+    if cline =~? '^\s*\a\w*;$\|^\a\w*$\|^\s*[''"`][;,]' && cline !~? s:notPhpHereDoc
     25378        return 0
     25379     endif " }}}
     25380 
     25381@@ -555,7 +595,6 @@
     25382 
     25383     let last_line = getline(lnum)
     25384     let ind = indent(lnum)
     25385-    let endline= s:endline
     25386 
     25387     if ind==0 && b:PHP_default_indenting
     25388        let ind = b:PHP_default_indenting
     25389@@ -567,7 +606,7 @@
     25390 
     25391 
     25392     if cline =~ '^\s*}\%(}}\)\@!'
     25393-       let ind = indent(FindOpenBracket(v:lnum))
     25394+       let ind = indent(FindOpenBracket(v:lnum, 1))
     25395        let b:PHP_CurrentIndentLevel = b:PHP_default_indenting
     25396        return ind
     25397     endif
     25398@@ -599,7 +638,7 @@
     25399 
     25400     let LastLineClosed = 0
     25401 
     25402-    let terminated = '\%(;\%(\s*\%(?>\|}\)\)\=\|<<<''\=\a\w*''\=$\|^\s*}\)'.endline
     25403+    let terminated = s:terminated
     25404 
     25405     let unstated   = '\%(^\s*'.s:blockstart.'.*)\|\%(//.*\)\@<!\<e'.'lse\>\)'.endline
     25406 
     25407@@ -614,7 +653,7 @@
     25408 
     25409        while last_line_num > 1
     25410 
     25411-           if previous_line =~ '^\s*\%(' . s:blockstart . '\|\%([a-zA-Z]\s*\)*function\)'
     25412+           if previous_line =~ terminated || previous_line =~ '^\s*\%(' . s:blockstart . '\)\|'. s:functionDecl . endline
     25413 
     25414                let ind = indent(last_line_num)
     25415 
     25416@@ -625,7 +664,7 @@
     25417                return ind
     25418            endif
     25419 
     25420-           let last_line_num = last_line_num - 1
     25421+           let last_line_num = GetLastRealCodeLNum(last_line_num - 1)
     25422            let previous_line = getline(last_line_num)
     25423        endwhile
     25424 
     25425@@ -638,22 +677,29 @@
     25426        let last_line_num = lnum
     25427        let LastLineClosed = 1
     25428 
     25429+       let isSingleLineBlock = 0
     25430        while 1
     25431-           if previous_line =~ '^\s*}\|;\s*}'.endline " XXX
     25432+           if ! isSingleLineBlock && previous_line =~ '^\s*}\|;\s*}'.endline " XXX
    2820025433 
    2820125434                call cursor(last_line_num, 1)
    2820225435-               call search('}\|;\s*}'.endline, 'W')
    28203 +               call search('}\|;\s*}'.endline, 'cW')
     25436+               if previous_line !~ '^}'
     25437+                   call search('}\|;\s*}'.endline, 'W')
     25438+               end
    2820425439                let oldLastLine = last_line_num
    2820525440                let last_line_num = searchpair('{', '', '}', 'bW', 'Skippmatch()')
    2820625441 
     25442-               if oldLastLine == last_line_num || getline(last_line_num) =~ '^\s*{'
     25443+               if getline(last_line_num) =~ '^\s*{'
     25444                    let last_line_num = GetLastRealCodeLNum(last_line_num - 1)
     25445+               elseif oldLastLine == last_line_num
     25446+                   let isSingleLineBlock = 1
     25447+                   continue
     25448                endif
     25449 
     25450                let previous_line = getline(last_line_num)
     25451 
     25452                continue
     25453            else
     25454+               let isSingleLineBlock = 0
     25455 
     25456                if getline(last_line_num) =~# '^\s*else\%(if\)\=\>'
     25457                    let last_line_num = FindTheIfOfAnElse(last_line_num, 0)
     25458@@ -711,7 +757,12 @@
     25459 
     25460        if last_line =~# '[{(\[]'.endline || last_line =~? '\h\w*\s*(.*,$' && AntepenultimateLine !~ '[,(]'.endline
     25461 
     25462-           if !b:PHP_BracesAtCodeLevel || last_line !~# '^\s*{'
     25463+           let dontIndent = 0
     25464+           if last_line =~ '\S\+\s*{'.endline && last_line !~ '^\s*\%(' . s:blockstart . '\)\|'. s:functionDecl . s:endline
     25465+               let dontIndent = 1
     25466+           endif
     25467+
     25468+           if !dontIndent && (!b:PHP_BracesAtCodeLevel || last_line !~# '^\s*{')
     25469                let ind = ind + &sw
     25470            endif
     25471 
     25472@@ -723,7 +774,7 @@
     25473 
     25474        elseif last_line =~ '\S\+\s*),'.endline
     25475            call cursor(lnum, 1)
     25476-           call search('),'.endline, 'W')
     25477+           call search('),'.endline, 'W') " line never begins with ) so no need for 'c' flag
     25478            let openedparent = searchpair('(', '', ')', 'bW', 'Skippmatch()')
     25479            if openedparent != lnum
     25480                let ind = indent(openedparent)
    2820725481diff -Naur vim74.orig/runtime/indent/sh.vim vim74/runtime/indent/sh.vim
    2820825482--- vim74.orig/runtime/indent/sh.vim    2010-05-15 11:03:29.000000000 +0000
    28209 +++ vim74/runtime/indent/sh.vim 2014-04-27 05:20:57.571755091 +0000
     25483+++ vim74/runtime/indent/sh.vim 2014-06-01 00:42:57.920854937 +0000
    2821025484@@ -1,7 +1,8 @@
    2821125485 " Vim indent file
     
    2824425518diff -Naur vim74.orig/runtime/indent/systemverilog.vim vim74/runtime/indent/systemverilog.vim
    2824525519--- vim74.orig/runtime/indent/systemverilog.vim 1970-01-01 00:00:00.000000000 +0000
    28246 +++ vim74/runtime/indent/systemverilog.vim      2014-04-27 05:20:57.571755091 +0000
     25520+++ vim74/runtime/indent/systemverilog.vim      2014-06-01 00:42:57.954188186 +0000
    2824725521@@ -0,0 +1,230 @@
    2824825522+" Vim indent file
     
    2847625750+
    2847725751+" vim:sw=2
     25752diff -Naur vim74.orig/runtime/macros/less.vim vim74/runtime/macros/less.vim
     25753--- vim74.orig/runtime/macros/less.vim  2012-05-18 18:58:54.000000000 +0000
     25754+++ vim74/runtime/macros/less.vim       2014-06-01 00:43:00.600848113 +0000
     25755@@ -1,6 +1,6 @@
     25756 " Vim script to work like "less"
     25757 " Maintainer:  Bram Moolenaar <Bram@vim.org>
     25758-" Last Change: 2012 May 18
     25759+" Last Change: 2014 May 13
     25760 
     25761 " Avoid loading this file twice, allow the user to define his own script.
     25762 if exists("loaded_less")
     25763@@ -87,6 +87,9 @@
     25764 map <C-V> <Space>
     25765 map f <Space>
     25766 map <C-F> <Space>
     25767+map <PageDown> <Space>
     25768+map <kPageDown> <Space>
     25769+map <S-Down> <Space>
     25770 map z <Space>
     25771 map <Esc><Space> <Space>
     25772 fun! s:NextPage()
     25773@@ -116,10 +119,14 @@
     25774 map <C-E> <CR>
     25775 map j <CR>
     25776 map <C-J> <CR>
     25777+map <Down> <CR>
     25778 
     25779 " Scroll one page backward
     25780 noremap <script> b <C-B><SID>L
     25781 map <C-B> b
     25782+map <PageUp> b
     25783+map <kPageUp> b
     25784+map <S-Up> b
     25785 map w b
     25786 map <Esc>v b
     25787 
     25788@@ -133,6 +140,7 @@
     25789 map <C-Y> k
     25790 map <C-P> k
     25791 map <C-K> k
     25792+map <Up> k
     25793 
     25794 " Redraw
     25795 noremap <script> r <C-L><SID>L
     25796@@ -143,11 +151,15 @@
     25797 noremap <script> g gg<SID>L
     25798 map < g
     25799 map <Esc>< g
     25800+map <Home> g
     25801+map <kHome> g
     25802 
     25803 " End of file
     25804 noremap <script> G G<SID>L
     25805 map > G
     25806 map <Esc>> G
     25807+map <End> G
     25808+map <kEnd> G
     25809 
     25810 " Go to percentage
     25811 noremap <script> % %<SID>L
     25812@@ -184,6 +196,7 @@
     25813 endfun
     25814 
     25815 call s:Forward()
     25816+cunmap <CR>
     25817 
     25818 " Quitting
     25819 noremap q :q<CR>
     25820@@ -240,6 +253,18 @@
     25821   unmap v
     25822   unmap /
     25823   unmap ?
     25824+  unmap <Up>
     25825+  unmap <Down>
     25826+  unmap <PageDown>
     25827+  unmap <kPageDown>
     25828+  unmap <PageUp>
     25829+  unmap <kPageUp>
     25830+  unmap <S-Down>
     25831+  unmap <S-Up>
     25832+  unmap <Home>
     25833+  unmap <kHome>
     25834+  unmap <End>
     25835+  unmap <kEnd>
     25836 endfun
     25837 
     25838 " vim: sw=2
    2847825839diff -Naur vim74.orig/runtime/optwin.vim vim74/runtime/optwin.vim
    2847925840--- vim74.orig/runtime/optwin.vim       2013-06-29 12:32:06.000000000 +0000
    28480 +++ vim74/runtime/optwin.vim    2014-04-27 05:20:57.678424406 +0000
     25841+++ vim74/runtime/optwin.vim    2014-06-01 00:43:00.977513821 +0000
    2848125842@@ -1,7 +1,7 @@
    2848225843 " These commands create the option window.
     
    2849925860diff -Naur vim74.orig/runtime/plugin/getscriptPlugin.vim vim74/runtime/plugin/getscriptPlugin.vim
    2850025861--- vim74.orig/runtime/plugin/getscriptPlugin.vim       2013-04-17 13:40:44.000000000 +0000
    28501 +++ vim74/runtime/plugin/getscriptPlugin.vim    2014-04-27 05:20:57.678424406 +0000
     25862+++ vim74/runtime/plugin/getscriptPlugin.vim    2014-06-01 00:43:01.010847069 +0000
    2850225863@@ -1,7 +1,7 @@
    2850325864 " ---------------------------------------------------------------------
     
    2853025891diff -Naur vim74.orig/runtime/plugin/netrwPlugin.vim vim74/runtime/plugin/netrwPlugin.vim
    2853125892--- vim74.orig/runtime/plugin/netrwPlugin.vim   2013-05-19 03:28:33.000000000 +0000
    28532 +++ vim74/runtime/plugin/netrwPlugin.vim        2014-04-27 05:20:57.681757821 +0000
     25893+++ vim74/runtime/plugin/netrwPlugin.vim        2014-06-01 00:43:01.040846993 +0000
    2853325894@@ -1,9 +1,9 @@
    2853425895 " netrwPlugin.vim: Handles file transfer and remote directory listing across a network
     
    2854925910-"DechoTabOn
    2855025911-let g:loaded_netrwPlugin = "v149"
    28551 +let g:loaded_netrwPlugin = "v151"
     25912+let g:loaded_netrwPlugin = "v152"
    2855225913 if v:version < 702
    2855325914- echohl WarningMsg | echo "***netrw*** you need vim version 7.2 for this version of netrw" | echohl None
     
    2871426075diff -Naur vim74.orig/runtime/syntax/a65.vim vim74/runtime/syntax/a65.vim
    2871526076--- vim74.orig/runtime/syntax/a65.vim   2010-05-15 11:03:57.000000000 +0000
    28716 +++ vim74/runtime/syntax/a65.vim        2014-04-27 05:20:57.818427882 +0000
     26077+++ vim74/runtime/syntax/a65.vim        2014-06-01 00:43:04.117505825 +0000
    2871726078@@ -1,7 +1,7 @@
    2871826079 " Vim syntax file
     
    2872726088diff -Naur vim74.orig/runtime/syntax/apache.vim vim74/runtime/syntax/apache.vim
    2872826089--- vim74.orig/runtime/syntax/apache.vim        2010-05-15 11:03:57.000000000 +0000
    28729 +++ vim74/runtime/syntax/apache.vim     2014-04-27 05:20:57.825094716 +0000
     26090+++ vim74/runtime/syntax/apache.vim     2014-06-01 00:43:04.257505469 +0000
    2873026091@@ -1,11 +1,9 @@
    2873126092 " Vim syntax file
     
    2876526126diff -Naur vim74.orig/runtime/syntax/arduino.vim vim74/runtime/syntax/arduino.vim
    2876626127--- vim74.orig/runtime/syntax/arduino.vim       1970-01-01 00:00:00.000000000 +0000
    28767 +++ vim74/runtime/syntax/arduino.vim    2014-04-27 05:20:57.825094716 +0000
     26128+++ vim74/runtime/syntax/arduino.vim    2014-06-01 00:43:04.297505367 +0000
    2876826129@@ -0,0 +1,61 @@
    2876926130+" Vim syntax file
     
    2883026191diff -Naur vim74.orig/runtime/syntax/asm.vim vim74/runtime/syntax/asm.vim
    2883126192--- vim74.orig/runtime/syntax/asm.vim   2012-04-09 19:37:34.000000000 +0000
    28832 +++ vim74/runtime/syntax/asm.vim        2014-04-27 05:20:57.825094716 +0000
     26193+++ vim74/runtime/syntax/asm.vim        2014-06-01 00:43:04.327505291 +0000
    2883326194@@ -3,7 +3,7 @@
    2883426195 " Maintainer:  Erik Wognsen <erik.wognsen@gmail.com>
     
    2885526216diff -Naur vim74.orig/runtime/syntax/bib.vim vim74/runtime/syntax/bib.vim
    2885626217--- vim74.orig/runtime/syntax/bib.vim   2011-12-30 11:30:00.000000000 +0000
    28857 +++ vim74/runtime/syntax/bib.vim        2014-04-27 05:20:57.835094963 +0000
     26218+++ vim74/runtime/syntax/bib.vim        2014-06-01 00:43:04.514171482 +0000
    2885826219@@ -2,7 +2,7 @@
    2885926220 " Language:    BibTeX (bibliographic database format for (La)TeX)
     
    2887626237diff -Naur vim74.orig/runtime/syntax/clean.vim vim74/runtime/syntax/clean.vim
    2887726238--- vim74.orig/runtime/syntax/clean.vim 2013-06-19 19:34:33.000000000 +0000
    28878 +++ vim74/runtime/syntax/clean.vim      2014-04-27 05:20:57.841761796 +0000
     26239+++ vim74/runtime/syntax/clean.vim      2014-06-01 00:43:04.847503967 +0000
    2887926240@@ -2,7 +2,7 @@
    2888026241 " Language:            Clean
     
    2893826299diff -Naur vim74.orig/runtime/syntax/clojure.vim vim74/runtime/syntax/clojure.vim
    2893926300--- vim74.orig/runtime/syntax/clojure.vim       2013-02-06 14:35:23.000000000 +0000
    28940 +++ vim74/runtime/syntax/clojure.vim    2014-04-27 05:20:57.845095211 +0000
     26301+++ vim74/runtime/syntax/clojure.vim    2014-06-01 00:43:04.904170489 +0000
    2894126302@@ -1,34 +1,37 @@
    2894226303 " Vim syntax file
     
    2920426565-" vim:sts=4 sw=4 et:
    2920526566+" vim:sts=8:sw=8:ts=8:noet:smc=0
     26567diff -Naur vim74.orig/runtime/syntax/cpp.vim vim74/runtime/syntax/cpp.vim
     26568--- vim74.orig/runtime/syntax/cpp.vim   2013-03-13 17:34:49.000000000 +0000
     26569+++ vim74/runtime/syntax/cpp.vim        2014-06-01 00:43:05.014170209 +0000
     26570@@ -2,7 +2,7 @@
     26571 " Language:    C++
     26572 " Current Maintainer:  vim-jp (https://github.com/vim-jp/cpp-vim)
     26573 " Previous Maintainer: Ken Shan <ccshan@post.harvard.edu>
     26574-" Last Change: 2012 Jun 14
     26575+" Last Change: 2014 May 14
     26576 
     26577 " For version 5.x: Clear all syntax items
     26578 " For version 6.x: Quit when a syntax file was already loaded
     26579@@ -39,6 +39,7 @@
     26580   syn keyword cppExceptions    noexcept
     26581   syn keyword cppStorageClass  constexpr decltype
     26582   syn keyword cppConstant      nullptr
     26583+  syn region cppRawString       matchgroup=cppRawDelimiter start=+\%(u8\|[uLU]\)\=R"\z([[:alnum:]_{}[\]#<>%:;.?*\+\-/\^&|~!=,"']\{,16}\)(+ end=+)\z1"+ contains=@Spell
     26584 endif
     26585 
     26586 " The minimum and maximum operators in GNU C++
     26587@@ -62,6 +63,8 @@
     26588   HiLink cppStructure          Structure
     26589   HiLink cppBoolean            Boolean
     26590   HiLink cppConstant           Constant
     26591+  HiLink cppRawDelimiter       Delimiter
     26592+  HiLink cppRawString          String
     26593   delcommand HiLink
     26594 endif
     26595 
    2920626596diff -Naur vim74.orig/runtime/syntax/css.vim vim74/runtime/syntax/css.vim
    2920726597--- vim74.orig/runtime/syntax/css.vim   2013-07-23 19:08:29.000000000 +0000
    29208 +++ vim74/runtime/syntax/css.vim        2014-04-27 05:20:57.851762044 +0000
     26598+++ vim74/runtime/syntax/css.vim        2014-06-01 00:43:05.110836629 +0000
    2920926599@@ -6,7 +6,7 @@
    2921026600 "               Nikolai Weibull (Add CSS2 support)
     
    2995927349diff -Naur vim74.orig/runtime/syntax/d.vim vim74/runtime/syntax/d.vim
    2996027350--- vim74.orig/runtime/syntax/d.vim     2013-05-23 20:52:24.000000000 +0000
    29961 +++ vim74/runtime/syntax/d.vim  2014-04-27 05:20:57.855095460 +0000
     27351+++ vim74/runtime/syntax/d.vim  2014-06-01 00:43:05.267502897 +0000
    2996227352@@ -2,8 +2,8 @@
    2996327353 "
     
    3005227442diff -Naur vim74.orig/runtime/syntax/datascript.vim vim74/runtime/syntax/datascript.vim
    3005327443--- vim74.orig/runtime/syntax/datascript.vim    2012-04-30 10:59:58.000000000 +0000
    30054 +++ vim74/runtime/syntax/datascript.vim 2014-04-27 05:20:57.855095460 +0000
     27444+++ vim74/runtime/syntax/datascript.vim 2014-06-01 00:43:05.270836222 +0000
    3005527445@@ -1,7 +1,7 @@
    3005627446 " Vim syntax file
     
    3010127491diff -Naur vim74.orig/runtime/syntax/debchangelog.vim vim74/runtime/syntax/debchangelog.vim
    3010227492--- vim74.orig/runtime/syntax/debchangelog.vim  2013-05-17 15:25:15.000000000 +0000
    30103 +++ vim74/runtime/syntax/debchangelog.vim       2014-04-27 05:20:57.855095460 +0000
     27493+++ vim74/runtime/syntax/debchangelog.vim       2014-06-01 00:43:05.340836044 +0000
    3010427494@@ -3,7 +3,7 @@
    3010527495 " Maintainer:  Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
     
    3012227512diff -Naur vim74.orig/runtime/syntax/debcontrol.vim vim74/runtime/syntax/debcontrol.vim
    3012327513--- vim74.orig/runtime/syntax/debcontrol.vim    2013-05-21 10:54:11.000000000 +0000
    30124 +++ vim74/runtime/syntax/debcontrol.vim 2014-04-27 05:20:57.858428875 +0000
     27514+++ vim74/runtime/syntax/debcontrol.vim 2014-06-01 00:43:05.344169369 +0000
    3012527515@@ -3,7 +3,7 @@
    3012627516 " Maintainer:  Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
     
    3014327533diff -Naur vim74.orig/runtime/syntax/debsources.vim vim74/runtime/syntax/debsources.vim
    3014427534--- vim74.orig/runtime/syntax/debsources.vim    2013-05-17 15:25:15.000000000 +0000
    30145 +++ vim74/runtime/syntax/debsources.vim 2014-04-27 05:20:57.858428875 +0000
     27535+++ vim74/runtime/syntax/debsources.vim 2014-06-01 00:43:05.357502668 +0000
    3014627536@@ -2,7 +2,7 @@
    3014727537 " Language:     Debian sources.list
     
    3016427554diff -Naur vim74.orig/runtime/syntax/diff.vim vim74/runtime/syntax/diff.vim
    3016527555--- vim74.orig/runtime/syntax/diff.vim  2013-07-24 09:47:50.000000000 +0000
    30166 +++ vim74/runtime/syntax/diff.vim       2014-04-27 05:20:57.858428875 +0000
     27556+++ vim74/runtime/syntax/diff.vim       2014-06-01 00:43:05.440835789 +0000
    3016727557@@ -2,7 +2,7 @@
    3016827558 " Language:    Diff (context or unified)
     
    3018527575diff -Naur vim74.orig/runtime/syntax/dircolors.vim vim74/runtime/syntax/dircolors.vim
    3018627576--- vim74.orig/runtime/syntax/dircolors.vim     2012-04-25 09:42:39.000000000 +0000
    30187 +++ vim74/runtime/syntax/dircolors.vim  2014-04-27 05:20:57.861762292 +0000
     27577+++ vim74/runtime/syntax/dircolors.vim  2014-06-01 00:43:05.454169089 +0000
    3018827578@@ -1,751 +1,213 @@
    3018927579 " Vim syntax file
     
    3113228522diff -Naur vim74.orig/runtime/syntax/dnsmasq.vim vim74/runtime/syntax/dnsmasq.vim
    3113328523--- vim74.orig/runtime/syntax/dnsmasq.vim       2012-05-19 12:57:09.000000000 +0000
    31134 +++ vim74/runtime/syntax/dnsmasq.vim    2014-04-27 05:20:57.861762292 +0000
     28524+++ vim74/runtime/syntax/dnsmasq.vim    2014-06-01 00:43:05.514168936 +0000
    3113528525@@ -1,26 +1,19 @@
    3113628526 " Vim syntax file
     
    3114528535-" Version:     2.61-1
    3114628536-" Last Change: 2012 May 19
    31147 +" Version:     2.67
    31148 +" Last Change: 2013 Nov 03
     28537+" Version:     2.70
     28538+" Last Change: 2014 Apr 30
    3114928539 " Modeline:    vim: ts=8:sw=2:sts=2:
    3115028540 "
     
    3121328603 syn match DnsmasqKeyword    "^\s*dhcp-script\>"
    3121428604 syn match DnsmasqKeyword    "^\s*dhcp-scriptuser\>"
    31215 @@ -135,6 +131,7 @@
     28605@@ -135,6 +131,10 @@
    3121628606 syn match DnsmasqKeyword    "^\s*dhcp-subscrid\>"
    3121728607 syn match DnsmasqKeyword    "^\s*dhcp-userclass\>"
    3121828608 syn match DnsmasqKeyword    "^\s*dhcp-vendorclass\>"
    3121928609+syn match DnsmasqKeyword    "^\s*dns-rr\>"
     28610+syn match DnsmasqKeyword    "^\s*dnssec\>"
     28611+syn match DnsmasqKeyword    "^\s*dnssec-check-unsigned\>"
     28612+syn match DnsmasqKeyword    "^\s*dnssec-no-timecheck\>"
    3122028613 syn match DnsmasqKeyword    "^\s*dns-forward-max\>"
    3122128614 syn match DnsmasqKeyword    "^\s*domain\>"
    3122228615 syn match DnsmasqKeyword    "^\s*domain-needed\>"
    31223 @@ -149,6 +146,7 @@
     28616@@ -149,18 +149,21 @@
    3122428617 syn match DnsmasqKeyword    "^\s*host-record\>"
    3122528618 syn match DnsmasqKeyword    "^\s*interface\>"
     
    3122928622 syn match DnsmasqKeyword    "^\s*leasefile-ro\>"
    3123028623 syn match DnsmasqKeyword    "^\s*listen-address\>"
    31231 @@ -161,6 +159,7 @@
     28624 syn match DnsmasqKeyword    "^\s*local\>"
     28625 syn match DnsmasqKeyword    "^\s*localmx\>"
     28626 syn match DnsmasqKeyword    "^\s*local-ttl\>"
     28627+syn match DnsmasqKeyword    "^\s*local-service\>"
     28628 syn match DnsmasqKeyword    "^\s*localise-queries\>"
     28629 syn match DnsmasqKeyword    "^\s*log-async\>"
     28630 syn match DnsmasqKeyword    "^\s*log-dhcp\>"
    3123228631 syn match DnsmasqKeyword    "^\s*log-facility\>"
    3123328632 syn match DnsmasqKeyword    "^\s*log-queries\>"
     
    3123728636 syn match DnsmasqKeyword    "^\s*mx-host\>"
    3123828637 syn match DnsmasqKeyword    "^\s*mx-target\>"
    31239 @@ -180,6 +179,10 @@
     28638@@ -180,15 +183,22 @@
    3124028639 syn match DnsmasqKeyword    "^\s*pxe-prompt\>"
    3124128640 syn match DnsmasqKeyword    "^\s*pxe-service\>"
     
    3124828647 syn match DnsmasqKeyword    "^\s*rebind-domain-ok\>"
    3124928648 syn match DnsmasqKeyword    "^\s*rebind-localhost-ok\>"
    31250 @@ -189,6 +192,7 @@
     28649 syn match DnsmasqKeyword    "^\s*resolv-file\>"
     28650+syn match DnsmasqKeyword    "^\s*rev-server\>"
     28651 syn match DnsmasqKeyword    "^\s*selfmx\>"
     28652 syn match DnsmasqKeyword    "^\s*server\>"
     28653+syn match DnsmasqKeyword    "^\s*servers-file\>"
    3125128654 syn match DnsmasqKeyword    "^\s*srv-host\>"
    3125228655 syn match DnsmasqKeyword    "^\s*stop-dns-rebind\>"
     
    3125828661diff -Naur vim74.orig/runtime/syntax/dts.vim vim74/runtime/syntax/dts.vim
    3125928662--- vim74.orig/runtime/syntax/dts.vim   2013-04-05 14:25:40.000000000 +0000
    31260 +++ vim74/runtime/syntax/dts.vim        2014-04-27 05:20:57.868429125 +0000
     28663+++ vim74/runtime/syntax/dts.vim        2014-06-01 00:43:05.680835178 +0000
    3126128664@@ -1,7 +1,7 @@
    3126228665 " Vim syntax file
     
    3128928692diff -Naur vim74.orig/runtime/syntax/euphoria3.vim vim74/runtime/syntax/euphoria3.vim
    3129028693--- vim74.orig/runtime/syntax/euphoria3.vim     1970-01-01 00:00:00.000000000 +0000
    31291 +++ vim74/runtime/syntax/euphoria3.vim  2014-04-27 05:20:57.875095957 +0000
     28694+++ vim74/runtime/syntax/euphoria3.vim  2014-06-01 00:43:05.907501268 +0000
    3129228695@@ -0,0 +1,135 @@
    3129328696+" Vim syntax file
     
    3142828831diff -Naur vim74.orig/runtime/syntax/euphoria4.vim vim74/runtime/syntax/euphoria4.vim
    3142928832--- vim74.orig/runtime/syntax/euphoria4.vim     1970-01-01 00:00:00.000000000 +0000
    31430 +++ vim74/runtime/syntax/euphoria4.vim  2014-04-27 05:20:57.875095957 +0000
     28833+++ vim74/runtime/syntax/euphoria4.vim  2014-06-01 00:43:05.914167917 +0000
    3143128834@@ -0,0 +1,247 @@
    3143228835+" Vim syntax file
     
    3167929082diff -Naur vim74.orig/runtime/syntax/help.vim vim74/runtime/syntax/help.vim
    3168029083--- vim74.orig/runtime/syntax/help.vim  2013-07-07 11:27:18.000000000 +0000
    31681 +++ vim74/runtime/syntax/help.vim       2014-04-27 05:20:57.895096453 +0000
     29084+++ vim74/runtime/syntax/help.vim       2014-06-01 00:43:06.510833065 +0000
    3168229085@@ -1,7 +1,7 @@
    3168329086 " Vim syntax file
     
    3172229125diff -Naur vim74.orig/runtime/syntax/j.vim vim74/runtime/syntax/j.vim
    3172329126--- vim74.orig/runtime/syntax/j.vim     1970-01-01 00:00:00.000000000 +0000
    31724 +++ vim74/runtime/syntax/j.vim  2014-04-27 05:20:57.905096702 +0000
     29127+++ vim74/runtime/syntax/j.vim  2014-06-01 00:43:06.840832224 +0000
    3172529128@@ -0,0 +1,134 @@
    3172629129+" Vim syntax file
     
    3186029263diff -Naur vim74.orig/runtime/syntax/mail.vim vim74/runtime/syntax/mail.vim
    3186129264--- vim74.orig/runtime/syntax/mail.vim  2013-07-15 21:28:26.000000000 +0000
    31862 +++ vim74/runtime/syntax/mail.vim       2014-04-27 05:20:57.925097198 +0000
     29265+++ vim74/runtime/syntax/mail.vim       2014-06-01 00:43:07.424164072 +0000
    3186329266@@ -2,7 +2,7 @@
    3186429267 " Language:            Mail file
     
    3188129284diff -Naur vim74.orig/runtime/syntax/masm.vim vim74/runtime/syntax/masm.vim
    3188229285--- vim74.orig/runtime/syntax/masm.vim  2012-02-04 19:24:10.000000000 +0000
    31883 +++ vim74/runtime/syntax/masm.vim       2014-04-27 05:20:57.928430615 +0000
     29286+++ vim74/runtime/syntax/masm.vim       2014-06-01 00:43:07.554163741 +0000
    3188429287@@ -2,14 +2,11 @@
    3188529288 " Language:    Microsoft Macro Assembler (80x86)
     
    3202029423diff -Naur vim74.orig/runtime/syntax/mix.vim vim74/runtime/syntax/mix.vim
    3202129424--- vim74.orig/runtime/syntax/mix.vim   1970-01-01 00:00:00.000000000 +0000
    32022 +++ vim74/runtime/syntax/mix.vim        2014-04-27 05:20:57.931764031 +0000
     29425+++ vim74/runtime/syntax/mix.vim        2014-06-01 00:43:07.694163385 +0000
    3202329426@@ -0,0 +1,83 @@
    3202429427+" Vim syntax file
     
    3210729510diff -Naur vim74.orig/runtime/syntax/netrw.vim vim74/runtime/syntax/netrw.vim
    3210829511--- vim74.orig/runtime/syntax/netrw.vim 2013-02-25 17:23:59.000000000 +0000
    32109 +++ vim74/runtime/syntax/netrw.vim      2014-04-27 05:20:57.945097695 +0000
     29512+++ vim74/runtime/syntax/netrw.vim      2014-06-01 00:43:08.124162290 +0000
    3211029513@@ -1,7 +1,7 @@
    3211129514 " Language   : Netrw Remote-Directory Listing Syntax
     
    3215529558diff -Naur vim74.orig/runtime/syntax/php.vim vim74/runtime/syntax/php.vim
    3215629559--- vim74.orig/runtime/syntax/php.vim   2012-12-11 20:15:31.000000000 +0000
    32157 +++ vim74/runtime/syntax/php.vim        2014-04-27 05:20:57.955097944 +0000
     29560+++ vim74/runtime/syntax/php.vim        2014-06-01 00:43:08.470828074 +0000
    3215829561@@ -1,7 +1,7 @@
    3215929562 " Vim syntax file
     
    3219629599diff -Naur vim74.orig/runtime/syntax/rst.vim vim74/runtime/syntax/rst.vim
    3219729600--- vim74.orig/runtime/syntax/rst.vim   2013-06-04 14:41:25.000000000 +0000
    32198 +++ vim74/runtime/syntax/rst.vim        2014-04-27 05:20:57.975098441 +0000
     29601+++ vim74/runtime/syntax/rst.vim        2014-06-01 00:43:09.164159642 +0000
    3219929602@@ -1,7 +1,7 @@
    3220029603 " Vim syntax file
     
    3221729620diff -Naur vim74.orig/runtime/syntax/sh.vim vim74/runtime/syntax/sh.vim
    3221829621--- vim74.orig/runtime/syntax/sh.vim    2013-07-05 16:35:45.000000000 +0000
    32219 +++ vim74/runtime/syntax/sh.vim 2014-04-27 05:20:57.981765272 +0000
     29622+++ vim74/runtime/syntax/sh.vim 2014-06-01 00:43:09.417492330 +0000
    3222029623@@ -2,10 +2,10 @@
    3222129624 " Language:            shell (sh) Korn shell (ksh) bash (sh)
     
    3233529738diff -Naur vim74.orig/runtime/syntax/spec.vim vim74/runtime/syntax/spec.vim
    3233629739--- vim74.orig/runtime/syntax/spec.vim  2010-05-15 11:03:57.000000000 +0000
    32337 +++ vim74/runtime/syntax/spec.vim       2014-04-27 05:20:57.991765521 +0000
     29740+++ vim74/runtime/syntax/spec.vim       2014-06-01 00:43:09.717491566 +0000
    3233829741@@ -1,8 +1,9 @@
    3233929742 " Filename:    spec.vim
     
    3237029773diff -Naur vim74.orig/runtime/syntax/svn.vim vim74/runtime/syntax/svn.vim
    3237129774--- vim74.orig/runtime/syntax/svn.vim   2012-07-25 13:08:55.000000000 +0000
    32372 +++ vim74/runtime/syntax/svn.vim        2014-04-27 05:20:57.998432353 +0000
     29775+++ vim74/runtime/syntax/svn.vim        2014-06-01 00:43:09.984157553 +0000
    3237329776@@ -2,15 +2,18 @@
    3237429777 " Language:     Subversion (svn) commit file
     
    3243529838diff -Naur vim74.orig/runtime/syntax/systemverilog.vim vim74/runtime/syntax/systemverilog.vim
    3243629839--- vim74.orig/runtime/syntax/systemverilog.vim 1970-01-01 00:00:00.000000000 +0000
    32437 +++ vim74/runtime/syntax/systemverilog.vim      2014-04-27 05:20:58.001765768 +0000
     29840+++ vim74/runtime/syntax/systemverilog.vim      2014-06-01 00:43:10.054157375 +0000
    3243829841@@ -0,0 +1,101 @@
    3243929842+" Vim syntax file
     
    3254029943diff -Naur vim74.orig/runtime/syntax/tcl.vim vim74/runtime/syntax/tcl.vim
    3254129944--- vim74.orig/runtime/syntax/tcl.vim   2010-05-15 11:03:56.000000000 +0000
    32542 +++ vim74/runtime/syntax/tcl.vim        2014-04-27 05:20:58.005099185 +0000
     29945+++ vim74/runtime/syntax/tcl.vim        2014-06-01 00:43:10.170823745 +0000
    3254329946@@ -6,11 +6,9 @@
    3254429947 "              (previously Matt Neumann <mattneu@purpleturtle.com>)
     
    3267530078diff -Naur vim74.orig/runtime/syntax/tex.vim vim74/runtime/syntax/tex.vim
    3267630079--- vim74.orig/runtime/syntax/tex.vim   2013-07-05 16:35:45.000000000 +0000
    32677 +++ vim74/runtime/syntax/tex.vim        2014-04-27 05:20:58.005099185 +0000
     30080+++ vim74/runtime/syntax/tex.vim        2014-06-01 00:43:10.227490267 +0000
    3267830081@@ -1,8 +1,8 @@
    3267930082 " Vim syntax file
     
    3281830221diff -Naur vim74.orig/runtime/syntax/upstreamlog.vim vim74/runtime/syntax/upstreamlog.vim
    3281930222--- vim74.orig/runtime/syntax/upstreamlog.vim   2013-08-03 15:47:26.000000000 +0000
    32820 +++ vim74/runtime/syntax/upstreamlog.vim        2014-04-27 05:20:58.011766018 +0000
     30223+++ vim74/runtime/syntax/upstreamlog.vim        2014-06-01 00:43:10.500822905 +0000
    3282130224@@ -1,7 +1,7 @@
    3282230225 " Vim syntax file
     
    3284730250diff -Naur vim74.orig/runtime/syntax/usserverlog.vim vim74/runtime/syntax/usserverlog.vim
    3284830251--- vim74.orig/runtime/syntax/usserverlog.vim   2013-08-03 15:47:26.000000000 +0000
    32849 +++ vim74/runtime/syntax/usserverlog.vim        2014-04-27 05:20:58.015099434 +0000
     30252+++ vim74/runtime/syntax/usserverlog.vim        2014-06-01 00:43:10.510822879 +0000
    3285030253@@ -1,7 +1,7 @@
    3285130254 " Vim syntax file
     
    3287630279diff -Naur vim74.orig/runtime/syntax/usw2kagtlog.vim vim74/runtime/syntax/usw2kagtlog.vim
    3287730280--- vim74.orig/runtime/syntax/usw2kagtlog.vim   2013-08-03 15:47:26.000000000 +0000
    32878 +++ vim74/runtime/syntax/usw2kagtlog.vim        2014-04-27 05:20:58.015099434 +0000
     30281+++ vim74/runtime/syntax/usw2kagtlog.vim        2014-06-01 00:43:10.510822879 +0000
    3287930282@@ -1,7 +1,7 @@
    3288030283 " Vim syntax file
     
    3290530308diff -Naur vim74.orig/runtime/syntax/vhdl.vim vim74/runtime/syntax/vhdl.vim
    3290630309--- vim74.orig/runtime/syntax/vhdl.vim  2012-06-01 16:05:47.000000000 +0000
    32907 +++ vim74/runtime/syntax/vhdl.vim       2014-04-27 05:20:58.015099434 +0000
     30310+++ vim74/runtime/syntax/vhdl.vim       2014-06-01 00:43:10.607489300 +0000
    3290830311@@ -1,12 +1,12 @@
    3290930312 " Vim syntax file
     
    3305930462diff -Naur vim74.orig/runtime/syntax/vim.vim vim74/runtime/syntax/vim.vim
    3306030463--- vim74.orig/runtime/syntax/vim.vim   2013-07-05 16:35:45.000000000 +0000
    33061 +++ vim74/runtime/syntax/vim.vim        2014-04-27 05:20:58.018432850 +0000
     30464+++ vim74/runtime/syntax/vim.vim        2014-06-01 00:43:10.670822472 +0000
    3306230465@@ -1,8 +1,8 @@
    3306330466 " Vim syntax file
     
    3316430567diff -Naur vim74.orig/runtime/syntax/yacc.vim vim74/runtime/syntax/yacc.vim
    3316530568--- vim74.orig/runtime/syntax/yacc.vim  2012-11-15 01:25:58.000000000 +0000
    33166 +++ vim74/runtime/syntax/yacc.vim       2014-04-27 05:20:58.031766515 +0000
     30569+++ vim74/runtime/syntax/yacc.vim       2014-06-01 00:43:11.070821453 +0000
    3316730570@@ -1,8 +1,8 @@
    3316830571 " Vim syntax file
     
    3318730590diff -Naur vim74.orig/runtime/syntax/yaml.vim vim74/runtime/syntax/yaml.vim
    3318830591--- vim74.orig/runtime/syntax/yaml.vim  2010-10-08 13:33:39.000000000 +0000
    33189 +++ vim74/runtime/syntax/yaml.vim       2014-04-27 05:20:58.031766515 +0000
     30592+++ vim74/runtime/syntax/yaml.vim       2014-06-01 00:43:11.080821428 +0000
    3319030593@@ -108,9 +108,10 @@
    3319130594 syn match yamlFlowMappingMerge /<<\ze\s*:/ contained nextgroup=yamlKeyValueDelimiter
     
    3320330606diff -Naur vim74.orig/runtime/tutor/tutor vim74/runtime/tutor/tutor
    3320430607--- vim74.orig/runtime/tutor/tutor      2012-10-03 13:29:40.000000000 +0000
    33205 +++ vim74/runtime/tutor/tutor   2014-04-27 05:20:58.041766762 +0000
     30608+++ vim74/runtime/tutor/tutor   2014-06-01 00:43:11.947485887 +0000
    3320630609@@ -55,8 +55,8 @@
    3320730610   2. Type:     :q! <ENTER>.
     
    3321730620diff -Naur vim74.orig/runtime/tutor/tutor.es vim74/runtime/tutor/tutor.es
    3321830621--- vim74.orig/runtime/tutor/tutor.es   2010-05-15 11:04:02.000000000 +0000
    33219 +++ vim74/runtime/tutor/tutor.es        2014-04-27 05:20:58.048433595 +0000
     30622+++ vim74/runtime/tutor/tutor.es        2014-06-01 00:43:12.157485353 +0000
    3322030623@@ -121,7 +121,7 @@
    3322130624         h (izquierda)     j (abajo)      k (arriba)      l (derecha)
     
    3322930632diff -Naur vim74.orig/runtime/tutor/tutor.it vim74/runtime/tutor/tutor.it
    3323030633--- vim74.orig/runtime/tutor/tutor.it   2010-05-23 09:00:00.000000000 +0000
    33231 +++ vim74/runtime/tutor/tutor.it        2014-04-27 05:20:58.055100426 +0000
     30634+++ vim74/runtime/tutor/tutor.it        2014-06-01 00:43:12.324151595 +0000
    3323230635@@ -638,7 +638,7 @@
    3323330636 NOTA: Se esci da Vim e riesegui Vim battendo  vim TEST , il file aperto
     
    3324130644diff -Naur vim74.orig/runtime/tutor/tutor.it.utf-8 vim74/runtime/tutor/tutor.it.utf-8
    3324230645--- vim74.orig/runtime/tutor/tutor.it.utf-8     2010-05-23 10:11:46.000000000 +0000
    33243 +++ vim74/runtime/tutor/tutor.it.utf-8  2014-04-27 05:20:58.055100426 +0000
     30646+++ vim74/runtime/tutor/tutor.it.utf-8  2014-06-01 00:43:12.337484894 +0000
    3324430647@@ -638,7 +638,7 @@
    3324530648 NOTA: Se esci da Vim e riesegui Vim battendo  vim TEST , il file aperto
     
    3325330656diff -Naur vim74.orig/runtime/tutor/tutor.pt vim74/runtime/tutor/tutor.pt
    3325430657--- vim74.orig/runtime/tutor/tutor.pt   2010-08-11 20:54:33.000000000 +0000
    33255 +++ vim74/runtime/tutor/tutor.pt        2014-04-27 05:20:58.065100676 +0000
     30658+++ vim74/runtime/tutor/tutor.pt        2014-06-01 00:43:12.544151035 +0000
    3325630659@@ -58,11 +58,11 @@
    3325730660      Isso sai do editor SEM salvar qualquer mudança que tenha sido feita.
     
    3328030683diff -Naur vim74.orig/runtime/tutor/tutor.pt.utf-8 vim74/runtime/tutor/tutor.pt.utf-8
    3328130684--- vim74.orig/runtime/tutor/tutor.pt.utf-8     2010-08-11 20:54:33.000000000 +0000
    33282 +++ vim74/runtime/tutor/tutor.pt.utf-8  2014-04-27 05:20:58.065100676 +0000
     30685+++ vim74/runtime/tutor/tutor.pt.utf-8  2014-06-01 00:43:12.567484309 +0000
    3328330686@@ -58,11 +58,11 @@
    3328430687      Isso sai do editor SEM salvar qualquer mudança que tenha sido feita.
     
    3330730710diff -Naur vim74.orig/runtime/vimlogo.eps vim74/runtime/vimlogo.eps
    3330830711--- vim74.orig/runtime/vimlogo.eps      2010-05-15 11:03:57.000000000 +0000
    33309 +++ vim74/runtime/vimlogo.eps   2014-04-27 05:20:58.078434340 +0000
     30712+++ vim74/runtime/vimlogo.eps   2014-06-01 00:43:12.880816844 +0000
    3331030713@@ -1,791 +1,803 @@
    3331130714-%!PS-Adobe-3.0 EPSF-3.0
     
    3490432307diff -Naur vim74.orig/runtime/vimrc_example.vim vim74/runtime/vimrc_example.vim
    3490532308--- vim74.orig/runtime/vimrc_example.vim        2011-04-15 18:58:36.000000000 +0000
    34906 +++ vim74/runtime/vimrc_example.vim     2014-04-27 05:20:58.078434340 +0000
     32309+++ vim74/runtime/vimrc_example.vim     2014-06-01 00:43:12.944150016 +0000
    3490732310@@ -1,7 +1,7 @@
    3490832311 " An example for a vimrc file.
     
    3492632329diff -Naur vim74.orig/src/GvimExt/Make_cyg.mak vim74/src/GvimExt/Make_cyg.mak
    3492732330--- vim74.orig/src/GvimExt/Make_cyg.mak 2011-09-30 14:45:49.000000000 +0000
    34928 +++ vim74/src/GvimExt/Make_cyg.mak      2014-04-27 05:20:58.078434340 +0000
     32331+++ vim74/src/GvimExt/Make_cyg.mak      2014-06-01 00:43:13.007483188 +0000
    3492932332@@ -31,12 +31,12 @@
    3493032333 ifeq ($(CROSS),yes)
     
    3494532348diff -Naur vim74.orig/src/Make_bc5.mak vim74/src/Make_bc5.mak
    3494632349--- vim74.orig/src/Make_bc5.mak 2013-06-03 18:09:58.000000000 +0000
    34947 +++ vim74/src/Make_bc5.mak      2014-04-27 05:20:58.085101172 +0000
     32350+++ vim74/src/Make_bc5.mak      2014-06-01 00:43:13.324149048 +0000
    3494832351@@ -419,7 +419,7 @@
    3494932352 ALIGNARG = -a$(ALIGN)
     
    3495732360diff -Naur vim74.orig/src/Make_cyg.mak vim74/src/Make_cyg.mak
    3495832361--- vim74.orig/src/Make_cyg.mak 2013-07-06 11:32:11.000000000 +0000
    34959 +++ vim74/src/Make_cyg.mak      2014-04-27 05:20:58.085101172 +0000
     32362+++ vim74/src/Make_cyg.mak      2014-06-01 00:43:13.337482348 +0000
    3496032363@@ -1,6 +1,6 @@
    3496132364 #
     
    3499532398diff -Naur vim74.orig/src/Make_ming.mak vim74/src/Make_ming.mak
    3499632399--- vim74.orig/src/Make_ming.mak        2013-07-06 11:32:11.000000000 +0000
    34997 +++ vim74/src/Make_ming.mak     2014-04-27 05:20:58.088434588 +0000
     32400+++ vim74/src/Make_ming.mak     2014-06-01 00:43:13.407482170 +0000
    3499832401@@ -359,6 +359,7 @@
    3499932402 
     
    3503632439diff -Naur vim74.orig/src/Make_mvc.mak vim74/src/Make_mvc.mak
    3503732440--- vim74.orig/src/Make_mvc.mak 2013-07-09 11:13:12.000000000 +0000
    35038 +++ vim74/src/Make_mvc.mak      2014-04-27 05:20:58.088434588 +0000
     32441+++ vim74/src/Make_mvc.mak      2014-06-01 00:43:13.444148743 +0000
    3503932442@@ -424,6 +424,12 @@
    3504032443 !if "$(_NMAKE_VER)" == "11.00.60610.1"
     
    3509932502 LINKARGS1 = $(LINKARGS1) /LTCG:STATUS
    3510032503 !endif
     32504@@ -962,6 +973,7 @@
     32505                $(LUA_OBJ) $(MZSCHEME_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(PYTHON3_OBJ) $(RUBY_OBJ) \
     32506                $(TCL_OBJ) $(SNIFF_OBJ) $(CSCOPE_OBJ) $(NETBEANS_OBJ) \
     32507                $(XPM_OBJ) $(OUTDIR)\version.obj $(LINKARGS2)
     32508+       if exist $(VIM).exe.manifest mt.exe -nologo -manifest $(VIM).exe.manifest -updateresource:$(VIM).exe;1
     32509 
     32510 $(VIM): $(VIM).exe
     32511 
    3510132512diff -Naur vim74.orig/src/Make_vms.mms vim74/src/Make_vms.mms
    3510232513--- vim74.orig/src/Make_vms.mms 2013-05-06 02:06:04.000000000 +0000
    35103 +++ vim74/src/Make_vms.mms      2014-04-27 05:20:58.091768003 +0000
     32514+++ vim74/src/Make_vms.mms      2014-06-01 00:43:13.494148616 +0000
    3510432515@@ -2,7 +2,7 @@
    3510532516 # Makefile for Vim on OpenVMS
     
    3521732628diff -Naur vim74.orig/src/Makefile vim74/src/Makefile
    3521832629--- vim74.orig/src/Makefile     2013-08-10 12:21:15.000000000 +0000
    35219 +++ vim74/src/Makefile  2014-04-27 05:20:58.095101420 +0000
     32630+++ vim74/src/Makefile  2014-06-01 00:43:13.524148539 +0000
    3522032631@@ -546,6 +546,7 @@
    3522132632 # again.
     
    3523632647 #PURIFY = purify
    3523732648 
    35238 @@ -1666,7 +1670,8 @@
    35239             ! grep -x -F 'ac_cv_env_CFLAGS_value=$(CFLAGS)' auto/config.cache > /dev/null; then \
    35240                 rm auto/config.cache; \
    35241         fi
     32649@@ -1660,13 +1664,16 @@
     32650 # auto/config.h isn't updated.  The dependency on auto/config.mk should make
     32651 # sure configure is run when it's needed.
     32652 #
     32653+# Remove the config.cache every time, once in a while it causes problems that
     32654+# are very hard to figure out.
     32655+#
     32656 config auto/config.mk: auto/configure config.mk.in config.h.in
     32657-       if test -f auto/config.cache && \
     32658-           grep '^ac_cv_env_CFLAGS_value=' auto/config.cache > /dev/null && \
     32659-           ! grep -x -F 'ac_cv_env_CFLAGS_value=$(CFLAGS)' auto/config.cache > /dev/null; then \
     32660-               rm auto/config.cache; \
     32661-       fi
    3524232662-       GUI_INC_LOC="$(GUI_INC_LOC)" GUI_LIB_LOC="$(GUI_LIB_LOC)" \
    35243 +       if test "X$(MAKECMDGOALS)" != "Xclean" -a "X$(MAKECMDGOALS)" != "Xdistclean"; then \
     32663+       -rm -f auto/config.cache
     32664+       if test "X$(MAKECMDGOALS)" != "Xclean" \
     32665+               -a "X$(MAKECMDGOALS)" != "Xdistclean" \
     32666+               -a "X$(MAKECMDGOALS)" != "Xautoconf" \
     32667+               -a "X$(MAKECMDGOALS)" != "Xreconfig"; then \
    3524432668+           GUI_INC_LOC="$(GUI_INC_LOC)" GUI_LIB_LOC="$(GUI_LIB_LOC)" \
    3524532669                CC="$(CC)" CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" \
    3524632670                LDFLAGS="$(LDFLAGS)" $(CONF_SHELL) srcdir="$(srcdir)" \
    3524732671                ./configure $(CONF_OPT_GUI) $(CONF_OPT_X) $(CONF_OPT_XSMP) \
    35248 @@ -1679,7 +1684,8 @@
     32672@@ -1679,7 +1686,8 @@
    3524932673                $(CONF_OPT_COMPBY) $(CONF_OPT_ACL)  $(CONF_OPT_NETBEANS) \
    3525032674                $(CONF_ARGS) $(CONF_OPT_MZSCHEME) $(CONF_OPT_PLTHOME) \
     
    3525632680 # Use "make reconfig" to rerun configure without cached values.
    3525732681 # When config.h changes, most things will be recompiled automatically.
    35258 @@ -1710,7 +1716,7 @@
     32682@@ -1710,7 +1718,7 @@
    3525932683 # - Uses ">config.log" instead of "./config.log".
    3526032684 autoconf:
     
    3526532689        chmod 755 auto/configure
    3526632690        mv -f configure.save configure
    35267 @@ -1861,7 +1867,7 @@
     32691@@ -1861,7 +1869,7 @@
    3526832692        -if test $(VIMTARGET) != vim -a ! -r vim; then \
    3526932693                ln -s $(VIMTARGET) vim; \
     
    3527432698 
    3527532699 unittesttargets:
    35276 @@ -1874,6 +1880,8 @@
     32700@@ -1874,6 +1882,9 @@
    3527732701 
    3527832702 # Run individual test, assuming that Vim was already compiled.
    3527932703 test1 test2 test3 test4 test5 test6 test7 test8 test9 \
     32704+       test_autoformat_join \
    3528032705+       test_eval \
    3528132706+       test_options \
     
    3528332708        test20 test21 test22 test23 test24 test25 test26 test27 test28 test29 \
    3528432709        test30 test31 test32 test33 test34 test35 test36 test37 test38 test39 \
    35285 @@ -1882,8 +1890,9 @@
     32710@@ -1882,8 +1893,9 @@
    3528632711        test60 test61 test62 test63 test64 test65 test66 test67 test68 test69 \
    3528732712        test70 test71 test72 test73 test74 test75 test76 test77 test78 test79 \
     
    3529532720 testclean:
    3529632721        cd testdir; $(MAKE) -f Makefile clean
    35297 @@ -2380,6 +2389,7 @@
     32722@@ -2380,6 +2392,7 @@
    3529832723                                 ../../testdir/*.in \
    3529932724                                 ../../testdir/*.vim \
     
    3531432739diff -Naur vim74.orig/src/auto/configure vim74/src/auto/configure
    3531532740--- vim74.orig/src/auto/configure       2013-08-04 18:01:06.000000000 +0000
    35316 +++ vim74/src/auto/configure    2014-04-27 05:20:58.111768501 +0000
     32741+++ vim74/src/auto/configure    2014-06-01 00:43:13.910814221 +0000
    3531732742@@ -1,11 +1,9 @@
    3531832743 #! /bin/sh
     
    3707234497 else
    3707334498 
    37074 @@ -5762,7 +6002,7 @@
     34499@@ -5653,10 +5893,19 @@
     34500 
     34501 fi
     34502 
     34503+       if ${vi_cv_dll_name_python+:} false; then :
     34504+  $as_echo_n "(cached) " >&6
     34505+else
     34506+
     34507+         if test "X$python_DLLLIBRARY" != "X"; then
     34508+           vi_cv_dll_name_python="$python_DLLLIBRARY"
     34509+         else
     34510+           vi_cv_dll_name_python="$python_INSTSONAME"
     34511+         fi
     34512+
     34513+fi
     34514+
     34515 
     34516-       if test "X$python_DLLLIBRARY" != "X"; then
     34517-         python_INSTSONAME="$python_DLLLIBRARY"
     34518-       fi
     34519        PYTHON_LIBS="${vi_cv_path_python_plibs}"
     34520        if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then
     34521          PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -DPYTHON_HOME='\"${vi_cv_path_python_pfx}\"'"
     34522@@ -5762,7 +6011,7 @@
    3707534523   fi
    3707634524 
     
    3708134529 fi
    3708234530 
    37083 @@ -5792,7 +6032,7 @@
     34531@@ -5792,7 +6041,7 @@
    3708434532 set dummy $ac_prog; ac_word=$2
    3708534533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     
    3709034538 else
    3709134539   case $vi_cv_path_python3 in
    37092 @@ -5806,7 +6046,7 @@
     34540@@ -5806,7 +6055,7 @@
    3709334541   IFS=$as_save_IFS
    3709434542   test -z "$as_dir" && as_dir=.
     
    3709934547     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    3710034548     break 2
    37101 @@ -5835,7 +6075,7 @@
     34549@@ -5835,7 +6084,7 @@
    3710234550 
    3710334551         { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python version" >&5
     
    3710834556 else
    3710934557   vi_cv_var_python3_version=`
    37110 @@ -5855,7 +6095,7 @@
     34558@@ -5855,7 +6104,7 @@
    3711134559 
    3711234560             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's abiflags" >&5
     
    3711734565 else
    3711834566 
    37119 @@ -5872,7 +6112,7 @@
     34567@@ -5872,7 +6121,7 @@
    3712034568 
    3712134569             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's install prefix" >&5
     
    3712634574 else
    3712734575    vi_cv_path_python3_pfx=`
    37128 @@ -5884,7 +6124,7 @@
     34576@@ -5884,7 +6133,7 @@
    3712934577 
    3713034578             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's execution prefix" >&5
     
    3713534583 else
    3713634584    vi_cv_path_python3_epfx=`
    37137 @@ -5895,7 +6135,7 @@
     34585@@ -5895,7 +6144,7 @@
    3713834586 $as_echo "$vi_cv_path_python3_epfx" >&6; }
    3713934587 
     
    3714434592 else
    3714534593    vi_cv_path_python3path=`
    37146 @@ -5915,7 +6155,7 @@
     34594@@ -5915,7 +6164,7 @@
    3714734595 
    3714834596       { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's configuration directory" >&5
     
    3715334601 else
    3715434602 
    37155 @@ -5946,7 +6186,7 @@
     34603@@ -5946,7 +6195,7 @@
    3715634604 $as_echo "can't find it!" >&6; }
    3715734605       else
     
    3716234610 else
    3716334611 
    37164 @@ -6073,7 +6313,7 @@
     34612@@ -5960,19 +6209,28 @@
     34613        @echo "python3_DLLLIBRARY='$(DLLLIBRARY)'"
     34614        @echo "python3_INSTSONAME='$(INSTSONAME)'"
     34615 eof
     34616-                        eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
     34617-            rm -f -- "${tmp_mkf}"
     34618+                   eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
     34619+           rm -f -- "${tmp_mkf}"
     34620            vi_cv_path_python3_plibs="-L${PYTHON3_CONFDIR} -lpython${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}"
     34621-            vi_cv_path_python3_plibs="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS}"
     34622-                        vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//`
     34623-            vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//`
     34624+           vi_cv_path_python3_plibs="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS}"
     34625+                   vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//`
     34626+           vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//`
     34627+
     34628+fi
     34629+
     34630+       if ${vi_cv_dll_name_python3+:} false; then :
     34631+  $as_echo_n "(cached) " >&6
     34632+else
     34633+
     34634+         if test "X$python3_DLLLIBRARY" != "X"; then
     34635+           vi_cv_dll_name_python3="$python3_DLLLIBRARY"
     34636+         else
     34637+           vi_cv_dll_name_python3="$python3_INSTSONAME"
     34638+         fi
     34639 
     34640 fi
     34641 
     34642 
     34643-        if test "X$python3_DLLLIBRARY" != "X"; then
     34644-         python3_INSTSONAME="$python3_DLLLIBRARY"
     34645-        fi
     34646         PYTHON3_LIBS="${vi_cv_path_python3_plibs}"
     34647         if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then
     34648           PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -DPYTHON3_HOME='L\"${vi_cv_path_python3_pfx}\"'"
     34649@@ -6073,7 +6331,7 @@
    3716534650     fi
    3716634651   fi
     
    3717134656 fi
    3717234657 
    37173 @@ -6097,8 +6337,8 @@
     34658@@ -6097,8 +6355,8 @@
    3717434659   if test "$cross_compiling" = yes; then :
    3717534660   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
     
    3718234667   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    3718334668 /* end confdefs.h.  */
    37184 @@ -6162,8 +6402,8 @@
     34669@@ -6132,7 +6390,7 @@
     34670     int main(int argc, char** argv)
     34671     {
     34672       int not_needed = 0;
     34673-      if (no_rtl_global_needed_for("${python_INSTSONAME}", "${vi_cv_path_python_pfx}"))
     34674+      if (no_rtl_global_needed_for("${vi_cv_dll_name_python}", "${vi_cv_path_python_pfx}"))
     34675             not_needed = 1;
     34676       return !not_needed;
     34677     }
     34678@@ -6162,8 +6420,8 @@
    3718534679   if test "$cross_compiling" = yes; then :
    3718634680   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
     
    3719334687   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    3719434688 /* end confdefs.h.  */
    37195 @@ -6337,7 +6577,7 @@
     34689@@ -6198,7 +6456,7 @@
     34690     int main(int argc, char** argv)
     34691     {
     34692       int not_needed = 0;
     34693-      if (no_rtl_global_needed_for("${python3_INSTSONAME}", L"${vi_cv_path_python3_pfx}"))
     34694+      if (no_rtl_global_needed_for("${vi_cv_dll_name_python3}", L"${vi_cv_path_python3_pfx}"))
     34695             not_needed = 1;
     34696       return !not_needed;
     34697     }
     34698@@ -6221,18 +6479,18 @@
     34699 
     34700   PYTHON_SRC="if_python.c"
     34701   PYTHON_OBJ="objects/if_python.o"
     34702-  PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${python_INSTSONAME}\\\""
     34703+  PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${vi_cv_dll_name_python}\\\""
     34704   PYTHON_LIBS=
     34705   PYTHON3_SRC="if_python3.c"
     34706   PYTHON3_OBJ="objects/if_python3.o"
     34707-  PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${python3_INSTSONAME}\\\""
     34708+  PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${vi_cv_dll_name_python3}\\\""
     34709   PYTHON3_LIBS=
     34710 elif test "$python_ok" = yes && test "$enable_pythoninterp" = "dynamic"; then
     34711   $as_echo "#define DYNAMIC_PYTHON 1" >>confdefs.h
     34712 
     34713   PYTHON_SRC="if_python.c"
     34714   PYTHON_OBJ="objects/if_python.o"
     34715-  PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${python_INSTSONAME}\\\""
     34716+  PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${vi_cv_dll_name_python}\\\""
     34717   PYTHON_LIBS=
     34718 elif test "$python_ok" = yes; then
     34719       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -fPIE can be added for Python" >&5
     34720@@ -6271,7 +6529,7 @@
     34721 
     34722   PYTHON3_SRC="if_python3.c"
     34723   PYTHON3_OBJ="objects/if_python3.o"
     34724-  PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${python3_INSTSONAME}\\\""
     34725+  PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${vi_cv_dll_name_python3}\\\""
     34726   PYTHON3_LIBS=
     34727 elif test "$python3_ok" = yes; then
     34728       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -fPIE can be added for Python3" >&5
     34729@@ -6337,7 +6595,7 @@
    3719634730 set dummy $tclsh_name; ac_word=$2
    3719734731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     
    3720234736 else
    3720334737   case $vi_cv_path_tcl in
    37204 @@ -6351,7 +6591,7 @@
     34738@@ -6351,7 +6609,7 @@
    3720534739   IFS=$as_save_IFS
    3720634740   test -z "$as_dir" && as_dir=.
     
    3721134745     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    3721234746     break 2
    37213 @@ -6381,7 +6621,7 @@
     34747@@ -6381,7 +6639,7 @@
    3721434748 set dummy $tclsh_name; ac_word=$2
    3721534749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     
    3722034754 else
    3722134755   case $vi_cv_path_tcl in
    37222 @@ -6395,7 +6635,7 @@
     34756@@ -6395,7 +6653,7 @@
    3722334757   IFS=$as_save_IFS
    3722434758   test -z "$as_dir" && as_dir=.
     
    3722934763     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    3723034764     break 2
    37231 @@ -6424,7 +6664,7 @@
     34765@@ -6424,7 +6682,7 @@
    3723234766 set dummy $tclsh_name; ac_word=$2
    3723334767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     
    3723834772 else
    3723934773   case $vi_cv_path_tcl in
    37240 @@ -6438,7 +6678,7 @@
     34774@@ -6438,7 +6696,7 @@
    3724134775   IFS=$as_save_IFS
    3724234776   test -z "$as_dir" && as_dir=.
     
    3724734781     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    3724834782     break 2
    37249 @@ -6467,7 +6707,7 @@
     34783@@ -6467,7 +6725,7 @@
    3725034784 set dummy $tclsh_name; ac_word=$2
    3725134785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     
    3725634790 else
    3725734791   case $vi_cv_path_tcl in
    37258 @@ -6481,7 +6721,7 @@
     34792@@ -6481,7 +6739,7 @@
    3725934793   IFS=$as_save_IFS
    3726034794   test -z "$as_dir" && as_dir=.
     
    3726534799     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    3726634800     break 2
    37267 @@ -6510,7 +6750,7 @@
     34801@@ -6510,7 +6768,7 @@
    3726834802 set dummy $tclsh_name; ac_word=$2
    3726934803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     
    3727434808 else
    3727534809   case $vi_cv_path_tcl in
    37276 @@ -6524,7 +6764,7 @@
     34810@@ -6524,7 +6782,7 @@
    3727734811   IFS=$as_save_IFS
    3727834812   test -z "$as_dir" && as_dir=.
     
    3728334817     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    3728434818     break 2
    37285 @@ -6641,7 +6881,7 @@
     34819@@ -6641,7 +6899,7 @@
    3728634820     fi
    3728734821   fi
     
    3729234826 fi
    3729334827 
    37294 @@ -6679,7 +6919,7 @@
     34828@@ -6679,7 +6937,7 @@
    3729534829 set dummy $RUBY_CMD; ac_word=$2
    3729634830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     
    3730134835 else
    3730234836   case $vi_cv_path_ruby in
    37303 @@ -6693,7 +6933,7 @@
     34837@@ -6693,7 +6951,7 @@
    3730434838   IFS=$as_save_IFS
    3730534839   test -z "$as_dir" && as_dir=.
     
    3731034844     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    3731134845     break 2
    37312 @@ -6736,9 +6976,9 @@
     34846@@ -6736,9 +6994,9 @@
    3731334847        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rubyhdrdir" >&5
    3731434848 $as_echo "$rubyhdrdir" >&6; }
     
    3732334857         rubyversion=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['ruby_version'].gsub(/\./, '')[0,2]"`
    3732434858        if test "X$rubyversion" = "X"; then
    37325 @@ -6767,7 +7007,7 @@
     34859@@ -6767,7 +7025,7 @@
    3732634860        if test "X$rubyldflags" != "X"; then
    3732734861                                  rubyldflags=`echo "$rubyldflags" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
     
    3733234866            fi
    3733334867          fi
    37334 @@ -6795,7 +7035,7 @@
     34868@@ -6795,7 +7053,7 @@
    3733534869   fi
    3733634870 
     
    3734134875 fi
    3734234876 
    37343 @@ -6857,7 +7097,7 @@
     34877@@ -6857,7 +7115,7 @@
    3734434878 $as_echo "no" >&6; }
    3734534879     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
     
    3735034884 else
    3735134885   ac_check_lib_save_LIBS=$LIBS
    37352 @@ -6891,7 +7131,7 @@
     34886@@ -6891,7 +7149,7 @@
    3735334887 fi
    3735434888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
     
    3735934893 #define HAVE_LIBSOCKET 1
    3736034894 _ACEOF
    37361 @@ -6902,7 +7142,7 @@
     34895@@ -6902,7 +7160,7 @@
    3736234896 
    3736334897   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
     
    3736834902 else
    3736934903   ac_check_lib_save_LIBS=$LIBS
    37370 @@ -6936,7 +7176,7 @@
     34904@@ -6936,7 +7194,7 @@
    3737134905 fi
    3737234906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
     
    3737734911 #define HAVE_LIBNSL 1
    3737834912 _ACEOF
    37379 @@ -7086,7 +7326,7 @@
     34913@@ -7086,7 +7344,7 @@
    3738034914 set dummy xmkmf; ac_word=$2
    3738134915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     
    3738634920 else
    3738734921   case $xmkmfpath in
    37388 @@ -7100,7 +7340,7 @@
     34922@@ -7100,7 +7358,7 @@
    3738934923   IFS=$as_save_IFS
    3739034924   test -z "$as_dir" && as_dir=.
     
    3739534929     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    3739634930     break 2
    37397 @@ -7138,8 +7378,8 @@
     34931@@ -7138,8 +7396,8 @@
    3739834932   have_x=disabled
    3739934933 else
     
    3740634940 else
    3740734941   # One or both of the vars are not set, and there is no cached value.
    37408 @@ -7156,7 +7396,7 @@
     34942@@ -7156,7 +7414,7 @@
    3740934943        @echo libdir='${LIBDIR}'
    3741034944 _ACEOF
     
    3741534949       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
    3741634950     done
    37417 @@ -7242,7 +7482,7 @@
     34951@@ -7242,7 +7500,7 @@
    3741834952   fi
    3741934953 done
     
    3742434958 
    3742534959 if test "$ac_x_libraries" = no; then
    37426 @@ -7416,7 +7656,7 @@
     34960@@ -7416,7 +7674,7 @@
    3742734961 else
    3742834962   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
     
    3743334967 else
    3743434968   ac_check_lib_save_LIBS=$LIBS
    37435 @@ -7450,14 +7690,14 @@
     34969@@ -7450,14 +7708,14 @@
    3743634970 fi
    3743734971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
     
    3745034984 else
    3745134985   ac_check_lib_save_LIBS=$LIBS
    37452 @@ -7491,7 +7731,7 @@
     34986@@ -7491,7 +7749,7 @@
    3745334987 fi
    3745434988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
     
    3745934993 fi
    3746034994 
    37461 @@ -7510,14 +7750,14 @@
     34995@@ -7510,14 +7768,14 @@
    3746234996     # The functions gethostbyname, getservbyname, and inet_addr are
    3746334997     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
     
    3747635010 else
    3747735011   ac_check_lib_save_LIBS=$LIBS
    37478 @@ -7551,14 +7791,14 @@
     35012@@ -7551,14 +7809,14 @@
    3747935013 fi
    3748035014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
     
    3749335027 else
    3749435028   ac_check_lib_save_LIBS=$LIBS
    37495 @@ -7592,7 +7832,7 @@
     35029@@ -7592,7 +7850,7 @@
    3749635030 fi
    3749735031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
     
    3750235036 fi
    3750335037 
    37504 @@ -7607,14 +7847,14 @@
     35038@@ -7607,14 +7865,14 @@
    3750535039     # must be given before -lnsl if both are needed.  We assume that
    3750635040     # if connect needs -lnsl, so does gethostbyname.
     
    3751935053 else
    3752035054   ac_check_lib_save_LIBS=$LIBS
    37521 @@ -7648,7 +7888,7 @@
     35055@@ -7648,7 +7906,7 @@
    3752235056 fi
    3752335057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
     
    3752835062 fi
    3752935063 
    37530 @@ -7656,14 +7896,14 @@
     35064@@ -7656,14 +7914,14 @@
    3753135065 
    3753235066     # Guillermo Gomez says -lposix is necessary on A/UX.
     
    3754535079 else
    3754635080   ac_check_lib_save_LIBS=$LIBS
    37547 @@ -7697,7 +7937,7 @@
     35081@@ -7697,7 +7955,7 @@
    3754835082 fi
    3754935083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
     
    3755435088 fi
    3755535089 
    37556 @@ -7705,14 +7945,14 @@
     35090@@ -7705,14 +7963,14 @@
    3755735091 
    3755835092     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
     
    3757135105 else
    3757235106   ac_check_lib_save_LIBS=$LIBS
    37573 @@ -7746,7 +7986,7 @@
     35107@@ -7746,7 +8004,7 @@
    3757435108 fi
    3757535109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
     
    3758035114 fi
    3758135115 
    37582 @@ -7764,7 +8004,7 @@
     35116@@ -7764,7 +8022,7 @@
    3758335117   # John Interrante, Karl Berry
    3758435118   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
     
    3758935123 else
    3759035124   ac_check_lib_save_LIBS=$LIBS
    37591 @@ -7798,7 +8038,7 @@
     35125@@ -7798,7 +8056,7 @@
    3759235126 fi
    3759335127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
     
    3759835132 fi
    3759935133 
    37600 @@ -7876,7 +8116,7 @@
     35134@@ -7876,7 +8134,7 @@
    3760135135 
    3760235136             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _XdmcpAuthDoIt in -lXdmcp" >&5
     
    3760735141 else
    3760835142   ac_check_lib_save_LIBS=$LIBS
    37609 @@ -7910,14 +8150,14 @@
     35143@@ -7910,14 +8168,14 @@
    3761035144 fi
    3761135145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xdmcp__XdmcpAuthDoIt" >&5
     
    3762435158 else
    3762535159   ac_check_lib_save_LIBS=$LIBS
    37626 @@ -7951,7 +8191,7 @@
     35160@@ -7951,7 +8209,7 @@
    3762735161 fi
    3762835162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceOpenConnection" >&5
     
    3763335167 fi
    3763435168 
    37635 @@ -7959,7 +8199,7 @@
     35169@@ -7959,7 +8217,7 @@
    3763635170         LDFLAGS="$X_LIBS $ac_save_LDFLAGS"
    3763735171     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmCreatePixmapFromData in -lXpm" >&5
     
    3764235176 else
    3764335177   ac_check_lib_save_LIBS=$LIBS
    37644 @@ -7993,7 +8233,7 @@
     35178@@ -7993,7 +8251,7 @@
    3764535179 fi
    3764635180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&5
     
    3765135185 fi
    3765235186 
    37653 @@ -8051,11 +8291,11 @@
     35187@@ -8051,11 +8309,11 @@
    3765435188 
    3765535189     { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t is 2 bytes" >&5
     
    3766535199   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    3766635200 /* end confdefs.h.  */
    37667 @@ -8354,7 +8594,7 @@
     35201@@ -8354,7 +8612,7 @@
    3766835202 set dummy pkg-config; ac_word=$2
    3766935203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     
    3767435208 else
    3767535209   case $PKG_CONFIG in
    37676 @@ -8368,7 +8608,7 @@
     35210@@ -8368,7 +8626,7 @@
    3767735211   IFS=$as_save_IFS
    3767835212   test -z "$as_dir" && as_dir=.
     
    3768335217     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    3768435218     break 2
    37685 @@ -8593,7 +8833,7 @@
     35219@@ -8593,7 +8851,7 @@
    3768635220       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
    3768735221 $as_echo "not found" >&6; }
     
    3769235226     fi
    3769335227   }
    37694 @@ -8786,7 +9026,7 @@
     35228@@ -8786,7 +9044,7 @@
    3769535229   LDFLAGS="$X_LIBS $LDFLAGS"
    3769635230   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
     
    3770135235 else
    3770235236   ac_check_lib_save_LIBS=$LIBS
    37703 @@ -8820,13 +9060,13 @@
     35237@@ -8820,13 +9078,13 @@
    3770435238 fi
    3770535239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
     
    3771735251 else
    3771835252   ac_check_lib_save_LIBS=$LIBS
    37719 @@ -8860,13 +9100,13 @@
     35253@@ -8860,13 +9118,13 @@
    3772035254 fi
    3772135255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wslen" >&5
     
    3773335267 else
    3773435268   ac_check_lib_save_LIBS=$LIBS
    37735 @@ -8900,13 +9140,13 @@
     35269@@ -8900,13 +9158,13 @@
    3773635270 fi
    3773735271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlsym" >&5
     
    3774935283 else
    3775035284   ac_check_lib_save_LIBS=$LIBS
    37751 @@ -8940,14 +9180,14 @@
     35285@@ -8940,14 +9198,14 @@
    3775235286 fi
    3775335287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuCreateStippledPixmap" >&5
     
    3776635300 else
    3776735301   ac_check_lib_save_LIBS=$LIBS
    37768 @@ -8981,7 +9221,7 @@
     35302@@ -8981,7 +9239,7 @@
    3776935303 fi
    3777035304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpEndJob" >&5
     
    3777535309 fi
    3777635310 
    37777 @@ -9020,7 +9260,7 @@
     35311@@ -9020,7 +9278,7 @@
    3777835312   for ac_header in X11/SM/SMlib.h
    3777935313 do :
     
    3778435318 #define HAVE_X11_SM_SMLIB_H 1
    3778535319 _ACEOF
    37786 @@ -9040,8 +9280,7 @@
     35320@@ -9040,8 +9298,7 @@
    3778735321 do :
    3778835322   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
     
    3779435328 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
    3779535329 _ACEOF
    37796 @@ -9064,7 +9303,7 @@
     35330@@ -9064,7 +9321,7 @@
    3779735331 $as_echo "yes" >&6; }
    3779835332 else
     
    3780335337 rm -f conftest*
    3780435338 
    37805 @@ -9123,8 +9362,7 @@
     35339@@ -9123,8 +9380,7 @@
    3780635340 do :
    3780735341   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
     
    3781335347 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
    3781435348 _ACEOF
    37815 @@ -9192,7 +9430,7 @@
     35349@@ -9192,7 +9448,7 @@
    3781635350 
    3781735351 
     
    3782235356 
    3782335357 if test "$enable_xim" = "yes"; then
    37824 @@ -9246,13 +9484,13 @@
     35358@@ -9246,13 +9502,13 @@
    3782535359 
    3782635360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether toupper is broken" >&5
     
    3783835372 else
    3783935373   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    37840 @@ -9336,7 +9574,7 @@
     35374@@ -9336,7 +9592,7 @@
    3784135375 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    3784235376 
     
    3784735381 fi
    3784835382 
    37849 @@ -9344,7 +9582,7 @@
     35383@@ -9344,7 +9600,7 @@
    3785035384 if test "$HAS_ELF" = 1; then
    3785135385   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lelf" >&5
     
    3785635390 else
    3785735391   ac_check_lib_save_LIBS=$LIBS
    37858 @@ -9372,7 +9610,7 @@
     35392@@ -9372,7 +9628,7 @@
    3785935393 fi
    3786035394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_main" >&5
     
    3786535399 #define HAVE_LIBELF 1
    3786635400 _ACEOF
    37867 @@ -9388,7 +9626,7 @@
     35401@@ -9388,7 +9644,7 @@
    3786835402   as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
    3786935403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
     
    3787435408 else
    3787535409   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    37876 @@ -9415,8 +9653,7 @@
     35410@@ -9415,8 +9671,7 @@
    3787735411 eval ac_res=\$$as_ac_Header
    3787835412               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
     
    3788435418 #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
    3788535419 _ACEOF
    37886 @@ -9429,7 +9666,7 @@
     35420@@ -9429,7 +9684,7 @@
    3788735421 if test $ac_header_dirent = dirent.h; then
    3788835422   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
     
    3789335427 else
    3789435428   ac_func_search_save_LIBS=$LIBS
    37895 @@ -9463,11 +9700,11 @@
     35429@@ -9463,11 +9718,11 @@
    3789635430 fi
    3789735431 rm -f core conftest.err conftest.$ac_objext \
     
    3790735441 else
    3790835442   ac_cv_search_opendir=no
    37909 @@ -9486,7 +9723,7 @@
     35443@@ -9486,7 +9741,7 @@
    3791035444 else
    3791135445   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
     
    3791635450 else
    3791735451   ac_func_search_save_LIBS=$LIBS
    37918 @@ -9520,11 +9757,11 @@
     35452@@ -9520,11 +9775,11 @@
    3791935453 fi
    3792035454 rm -f core conftest.err conftest.$ac_objext \
     
    3793035464 else
    3793135465   ac_cv_search_opendir=no
    37932 @@ -9584,8 +9821,7 @@
     35466@@ -9584,8 +9839,7 @@
    3793335467 do :
    3793435468   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
     
    3794035474 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
    3794135475 _ACEOF
    37942 @@ -9601,7 +9837,7 @@
     35476@@ -9601,7 +9855,7 @@
    3794335477 #  include <sys/stream.h>
    3794435478 #endif
     
    3794935483 #define HAVE_SYS_PTEM_H 1
    3795035484 _ACEOF
    37951 @@ -9617,7 +9853,7 @@
     35485@@ -9617,7 +9871,7 @@
    3795235486 #  include <sys/param.h>
    3795335487 #endif
     
    3795835492 #define HAVE_SYS_SYSCTL_H 1
    3795935493 _ACEOF
    37960 @@ -9657,7 +9893,7 @@
     35494@@ -9657,7 +9911,7 @@
    3796135495 for ac_header in strings.h
    3796235496 do :
     
    3796735501 #define HAVE_STRINGS_H 1
    3796835502 _ACEOF
    37969 @@ -9716,7 +9952,7 @@
     35503@@ -9716,7 +9970,7 @@
    3797035504 if test $ac_cv_c_compiler_gnu = yes; then
    3797135505     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
     
    3797635510 else
    3797735511     ac_pattern="Autoconf.*'x'"
    37978 @@ -9757,7 +9993,7 @@
     35512@@ -9757,7 +10011,7 @@
    3797935513 
    3798035514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
     
    3798535519 else
    3798635520   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    37987 @@ -9766,11 +10002,11 @@
     35521@@ -9766,11 +10020,11 @@
    3798835522 int
    3798935523 main ()
     
    3800035534   char const *const *pcpcc;
    3800135535   char **ppc;
    38002 @@ -9787,8 +10023,9 @@
     35536@@ -9787,8 +10041,9 @@
    3800335537   ++pcpcc;
    3800435538   ppc = (char**) pcpcc;
     
    3801235546 
    3801335547     *t++ = 0;
    38014 @@ -9804,10 +10041,10 @@
     35548@@ -9804,10 +10059,10 @@
    3801535549     iptr p = 0;
    3801635550     ++p;
     
    3802635560   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
    3802735561     const int foo = 10;
    38028 @@ -9837,7 +10074,7 @@
     35562@@ -9837,7 +10092,7 @@
    3802935563 
    3803035564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
     
    3803535569 else
    3803635570   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    38037 @@ -9870,7 +10107,7 @@
     35571@@ -9870,7 +10125,7 @@
    3803835572 fi
    3803935573 
     
    3804435578 else
    3804535579 
    38046 @@ -9881,7 +10118,7 @@
     35580@@ -9881,7 +10136,7 @@
    3804735581 fi
    3804835582 
     
    3805335587 else
    3805435588 
    38055 @@ -9892,7 +10129,7 @@
     35589@@ -9892,7 +10147,7 @@
    3805635590 fi
    3805735591 
     
    3806235596 else
    3806335597 
    38064 @@ -9903,7 +10140,7 @@
     35598@@ -9903,7 +10158,7 @@
    3806535599 fi
    3806635600 
     
    3807135605 else
    3807235606 
    38073 @@ -9915,7 +10152,7 @@
     35607@@ -9915,7 +10170,7 @@
    3807435608 
    3807535609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
     
    3808035614 else
    3808135615   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    38082 @@ -9960,7 +10197,7 @@
     35616@@ -9960,7 +10215,7 @@
    3808335617 
    3808435618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
     
    3808935623 else
    3809035624   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    38091 @@ -9994,7 +10231,7 @@
     35625@@ -9994,7 +10249,7 @@
    3809235626 fi
    3809335627 
     
    3809835632 else
    3809935633 
    38100 @@ -10005,7 +10242,7 @@
     35634@@ -10005,7 +10260,7 @@
    3810135635 fi
    3810235636 
     
    3810735641 else
    3810835642 
    38109 @@ -10017,7 +10254,7 @@
     35643@@ -10017,7 +10272,7 @@
    3811035644 
    3811135645  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
     
    3811635650 else
    3811735651   ac_cv_c_bigendian=unknown
    38118 @@ -10235,7 +10472,7 @@
     35652@@ -10235,7 +10490,7 @@
    3811935653 
    3812035654      ;; #(
     
    3812535659  esac
    3812635660 
    38127 @@ -10371,7 +10608,7 @@
     35661@@ -10371,7 +10626,7 @@
    3812835662   { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5
    3812935663 $as_echo "OK" >&6; }
     
    3813435668 rm -f core conftest.err conftest.$ac_objext \
    3813535669     conftest$ac_exeext conftest.$ac_ext
    38136 @@ -10387,7 +10624,7 @@
     35670@@ -10387,7 +10642,7 @@
    3813735671     as_ac_Lib=`$as_echo "ac_cv_lib_${libname}''_tgetent" | $as_tr_sh`
    3813835672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -l${libname}" >&5
     
    3814335677 else
    3814435678   ac_check_lib_save_LIBS=$LIBS
    38145 @@ -10422,8 +10659,7 @@
     35679@@ -10422,8 +10677,7 @@
    3814635680 eval ac_res=\$$as_ac_Lib
    3814735681               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
     
    3815335687 #define `$as_echo "HAVE_LIB${libname}" | $as_tr_cpp` 1
    3815435688 _ACEOF
    38155 @@ -10489,7 +10725,7 @@
     35689@@ -10489,7 +10743,7 @@
    3815635690   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
    3815735691 $as_echo "yes" >&6; }
     
    3816235696       Or specify the name of the library with --with-tlib." "$LINENO" 5
    3816335697 fi
    38164 @@ -10499,13 +10735,13 @@
     35698@@ -10499,13 +10753,13 @@
    3816535699 
    3816635700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we talk terminfo" >&5
     
    3817835712 else
    3817935713   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    38180 @@ -10552,13 +10788,13 @@
     35714@@ -10552,13 +10806,13 @@
    3818135715 if test "x$olibs" != "x$LIBS"; then
    3818235716   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what tgetent() returns for an unknown terminal" >&5
     
    3819435728 else
    3819535729   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    38196 @@ -10853,13 +11089,13 @@
     35730@@ -10853,13 +11107,13 @@
    3819735731 rm -f conftest_grp
    3819835732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking default tty permissions/group" >&5
     
    3821035744 else
    3821135745   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    38212 @@ -10940,7 +11176,7 @@
     35746@@ -10940,7 +11194,7 @@
    3821335747 _ACEOF
    3821435748 
     
    3821935753     $as_echo "#define PTYMODE 0620" >>confdefs.h
    3822035754 
    38221 @@ -10950,7 +11186,7 @@
     35755@@ -10950,7 +11204,7 @@
    3822235756 
    3822335757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
     
    3822835762 else
    3822935763   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    38230 @@ -11023,13 +11259,13 @@
     35764@@ -11023,13 +11277,13 @@
    3823135765 
    3823235766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getcwd implementation is broken" >&5
     
    3824435778 else
    3824535779   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    38246 @@ -11082,8 +11318,7 @@
     35780@@ -11082,8 +11336,7 @@
    3824735781 do :
    3824835782   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
     
    3825435788 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
    3825535789 _ACEOF
    38256 @@ -11093,7 +11328,7 @@
     35790@@ -11093,7 +11346,7 @@
    3825735791 
    3825835792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
     
    3826335797 else
    3826435798   while :; do
    38265 @@ -11169,7 +11404,7 @@
     35799@@ -11169,7 +11422,7 @@
    3826635800 
    3826735801   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
     
    3827235806 else
    3827335807   ac_cv_sys_largefile_CC=no
    38274 @@ -11220,7 +11455,7 @@
     35808@@ -11185,7 +11438,7 @@
     35809     We can't simply define LARGE_OFF_T to be 9223372036854775807,
     35810     since some C++ compilers masquerading as C compilers
     35811     incorrectly reject 9223372036854775807.  */
     35812-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
     35813+#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
     35814   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
     35815                       && LARGE_OFF_T % 2147483647 == 1)
     35816                      ? 1 : -1];
     35817@@ -11220,7 +11473,7 @@
    3827535818 
    3827635819   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
     
    3828135824 else
    3828235825   while :; do
    38283 @@ -11289,7 +11524,7 @@
     35826@@ -11231,7 +11484,7 @@
     35827     We can't simply define LARGE_OFF_T to be 9223372036854775807,
     35828     since some C++ compilers masquerading as C compilers
     35829     incorrectly reject 9223372036854775807.  */
     35830-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
     35831+#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
     35832   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
     35833                       && LARGE_OFF_T % 2147483647 == 1)
     35834                      ? 1 : -1];
     35835@@ -11255,7 +11508,7 @@
     35836     We can't simply define LARGE_OFF_T to be 9223372036854775807,
     35837     since some C++ compilers masquerading as C compilers
     35838     incorrectly reject 9223372036854775807.  */
     35839-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
     35840+#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
     35841   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
     35842                       && LARGE_OFF_T % 2147483647 == 1)
     35843                      ? 1 : -1];
     35844@@ -11289,7 +11542,7 @@
    3828435845   if test $ac_cv_sys_file_offset_bits = unknown; then
    3828535846     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
     
    3829035851 else
    3829135852   while :; do
    38292 @@ -11356,6 +11591,8 @@
     35853@@ -11300,7 +11553,7 @@
     35854     We can't simply define LARGE_OFF_T to be 9223372036854775807,
     35855     since some C++ compilers masquerading as C compilers
     35856     incorrectly reject 9223372036854775807.  */
     35857-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
     35858+#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
     35859   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
     35860                       && LARGE_OFF_T % 2147483647 == 1)
     35861                      ? 1 : -1];
     35862@@ -11324,7 +11577,7 @@
     35863     We can't simply define LARGE_OFF_T to be 9223372036854775807,
     35864     since some C++ compilers masquerading as C compilers
     35865     incorrectly reject 9223372036854775807.  */
     35866-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
     35867+#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
     35868   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
     35869                       && LARGE_OFF_T % 2147483647 == 1)
     35870                      ? 1 : -1];
     35871@@ -11356,6 +11609,8 @@
    3829335872 esac
    3829435873 rm -rf conftest*
     
    3829935878 
    3830035879 
    38301 @@ -11389,13 +11626,13 @@
     35880@@ -11389,13 +11644,13 @@
    3830235881 
    3830335882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat() ignores a trailing slash" >&5
     
    3831535894 else
    3831635895   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    38317 @@ -11519,7 +11756,7 @@
     35896@@ -11519,7 +11774,7 @@
    3831835897 
    3831935898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strtod in -lm" >&5
     
    3832435903 else
    3832535904   ac_check_lib_save_LIBS=$LIBS
    38326 @@ -11553,7 +11790,7 @@
     35905@@ -11553,7 +11808,7 @@
    3832735906 fi
    3832835907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_strtod" >&5
     
    3833335912 #define HAVE_LIBM 1
    3833435913 _ACEOF
    38335 @@ -11619,7 +11856,7 @@
     35914@@ -11619,7 +11874,7 @@
    3833635915 $as_echo "no" >&6; }
    3833735916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acl_get_file in -lposix1e" >&5
     
    3834235921 else
    3834335922   ac_check_lib_save_LIBS=$LIBS
    38344 @@ -11653,12 +11890,12 @@
     35923@@ -11653,12 +11908,12 @@
    3834535924 fi
    3834635925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix1e_acl_get_file" >&5
     
    3835735936 else
    3835835937   ac_check_lib_save_LIBS=$LIBS
    38359 @@ -11692,11 +11929,11 @@
     35938@@ -11692,11 +11947,11 @@
    3836035939 fi
    3836135940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_acl_acl_get_file" >&5
     
    3837135950 else
    3837235951   ac_check_lib_save_LIBS=$LIBS
    38373 @@ -11730,7 +11967,7 @@
     35952@@ -11730,7 +11985,7 @@
    3837435953 fi
    3837535954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_fgetxattr" >&5
     
    3838035959 fi
    3838135960 
    38382 @@ -11772,7 +12009,7 @@
     35961@@ -11772,7 +12027,7 @@
    3838335962 
    3838435963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acl_get in -lsec" >&5
     
    3838935968 else
    3839035969   ac_check_lib_save_LIBS=$LIBS
    38391 @@ -11806,7 +12043,7 @@
     35970@@ -11806,7 +12061,7 @@
    3839235971 fi
    3839335972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sec_acl_get" >&5
     
    3839835977 
    3839935978 else
    38400 @@ -11902,7 +12139,7 @@
     35979@@ -11902,7 +12157,7 @@
    3840135980 $as_echo "no" >&6; }
    3840235981     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gpm" >&5
     
    3840735986 else
    3840835987   olibs="$LIBS" ; LIBS="-lgpm"
    38409 @@ -11955,7 +12192,7 @@
     35988@@ -11955,7 +12210,7 @@
    3841035989 $as_echo "no" >&6; }
    3841135990         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysmouse" >&5
     
    3841635995 else
    3841735996   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    38418 @@ -12161,7 +12398,7 @@
     35997@@ -12161,7 +12416,7 @@
    3841935998 # This bug is HP SR number 8606223364.
    3842035999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
     
    3842536004 else
    3842636005   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
    38427 @@ -12170,9 +12407,8 @@
     36006@@ -12170,9 +12425,8 @@
    3842836007   if test "$ac_cv_type_int" = yes; then
    3842936008      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
     
    3843736016      ac_cv_sizeof_int=0
    3843836017    fi
    38439 @@ -12195,7 +12431,7 @@
     36018@@ -12195,7 +12449,7 @@
    3844036019 # This bug is HP SR number 8606223364.
    3844136020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
     
    3844636025 else
    3844736026   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
    38448 @@ -12204,9 +12440,8 @@
     36027@@ -12204,9 +12458,8 @@
    3844936028   if test "$ac_cv_type_long" = yes; then
    3845036029      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
     
    3845836037      ac_cv_sizeof_long=0
    3845936038    fi
    38460 @@ -12229,7 +12464,7 @@
     36039@@ -12229,7 +12482,7 @@
    3846136040 # This bug is HP SR number 8606223364.
    3846236041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
     
    3846736046 else
    3846836047   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t"        "$ac_includes_default"; then :
    38469 @@ -12238,9 +12473,8 @@
     36048@@ -12238,9 +12491,8 @@
    3847036049   if test "$ac_cv_type_time_t" = yes; then
    3847136050      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
     
    3847936058      ac_cv_sizeof_time_t=0
    3848036059    fi
    38481 @@ -12263,7 +12497,7 @@
     36060@@ -12263,7 +12515,7 @@
    3848236061 # This bug is HP SR number 8606223364.
    3848336062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
     
    3848836067 else
    3848936068   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
    38490 @@ -12272,9 +12506,8 @@
     36069@@ -12272,9 +12524,8 @@
    3849136070   if test "$ac_cv_type_off_t" = yes; then
    3849236071      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
     
    3850036079      ac_cv_sizeof_off_t=0
    3850136080    fi
    38502 @@ -12292,6 +12525,15 @@
     36081@@ -12292,6 +12543,15 @@
    3850336082 
    3850436083 
     
    3851636095 $as_echo_n "checking uint32_t is 32 bits... " >&6; }
    3851736096 if test "$cross_compiling" = yes; then :
    38518 @@ -12318,7 +12560,7 @@
     36097@@ -12318,7 +12578,7 @@
    3851936098   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
    3852036099 $as_echo "ok" >&6; }
     
    3852536104 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
    3852636105   conftest.$ac_objext conftest.beam conftest.$ac_ext
    38527 @@ -12350,13 +12592,13 @@
     36106@@ -12350,13 +12610,13 @@
    3852836107 
    3852936108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmove handles overlaps" >&5
     
    3854136120 else
    3854236121   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    38543 @@ -12387,13 +12629,13 @@
     36122@@ -12387,13 +12647,13 @@
    3854436123 else
    3854536124   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bcopy handles overlaps" >&5
     
    3855736136 else
    3855836137   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    38559 @@ -12424,13 +12666,13 @@
     36138@@ -12424,13 +12684,13 @@
    3856036139   else
    3856136140     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memcpy handles overlaps" >&5
     
    3857336152 else
    3857436153   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    38575 @@ -12525,7 +12767,7 @@
     36154@@ -12525,7 +12785,7 @@
    3857636155 
    3857736156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _xpg4_setrunelocale in -lxpg4" >&5
     
    3858236161 else
    3858336162   ac_check_lib_save_LIBS=$LIBS
    38584 @@ -12559,7 +12801,7 @@
     36163@@ -12559,7 +12819,7 @@
    3858536164 fi
    3858636165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xpg4__xpg4_setrunelocale" >&5
     
    3859136170 fi
    3859236171 
    38593 @@ -12621,7 +12863,7 @@
     36172@@ -12621,7 +12881,7 @@
    3859436173 set dummy msgfmt; ac_word=$2
    3859536174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     
    3860036179 else
    3860136180   if test -n "$MSGFMT"; then
    38602 @@ -12633,7 +12875,7 @@
     36181@@ -12633,7 +12893,7 @@
    3860336182   IFS=$as_save_IFS
    3860436183   test -z "$as_dir" && as_dir=.
     
    3860936188     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    3861036189     break 2
    38611 @@ -12659,6 +12901,8 @@
     36190@@ -12659,6 +12919,8 @@
    3861236191   if test -f po/Makefile; then
    3861336192     have_gettext="no"
     
    3861836197 /* end confdefs.h.  */
    3861936198 #include <libintl.h>
    38620 @@ -12672,10 +12916,9 @@
     36199@@ -12672,10 +12934,9 @@
    3862136200 _ACEOF
    3862236201 if ac_fn_c_try_link "$LINENO"; then :
     
    3863136210 /* end confdefs.h.  */
    3863236211 #include <libintl.h>
    38633 @@ -12689,7 +12932,8 @@
     36212@@ -12689,7 +12950,8 @@
    3863436213 _ACEOF
    3863536214 if ac_fn_c_try_link "$LINENO"; then :
     
    3864136220   { $as_echo "$as_me:${as_lineno-$LINENO}: result: gettext() doesn't work" >&5
    3864236221 $as_echo "gettext() doesn't work" >&6; };
    38643 @@ -12712,7 +12956,7 @@
     36222@@ -12712,7 +12974,7 @@
    3864436223             for ac_func in bind_textdomain_codeset
    3864536224 do :
     
    3865036229 #define HAVE_BIND_TEXTDOMAIN_CODESET 1
    3865136230 _ACEOF
    38652 @@ -12755,11 +12999,11 @@
     36231@@ -12755,11 +13017,11 @@
    3865336232 fi
    3865436233 
     
    3866436243 fi
    3866536244 
    38666 @@ -12956,7 +13200,7 @@
     36245@@ -12956,7 +13218,7 @@
    3866736246 for ac_header in setjmp.h
    3866836247 do :
     
    3867336252 #define HAVE_SETJMP_H 1
    3867436253 _ACEOF
    38675 @@ -13107,10 +13351,21 @@
     36254@@ -13107,10 +13369,21 @@
    3867636255      :end' >>confcache
    3867736256 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
     
    3869736276     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
    3869836277 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
    38699 @@ -13126,6 +13381,7 @@
     36278@@ -13126,6 +13399,7 @@
    3870036279 
    3870136280 ac_libobjs=
     
    3870536284   # 1. Remove the extension, and $U if already installed.
    3870636285   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
    38707 @@ -13142,7 +13398,7 @@
     36286@@ -13142,7 +13416,7 @@
    3870836287 
    3870936288 
     
    3871436293 ac_clean_files_save=$ac_clean_files
    3871536294 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
    38716 @@ -13243,6 +13499,7 @@
     36295@@ -13243,6 +13517,7 @@
    3871736296 IFS=" ""       $as_nl"
    3871836297 
     
    3872236301   *[\\/]* ) as_myself=$0 ;;
    3872336302   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
    38724 @@ -13288,19 +13545,19 @@
     36303@@ -13288,19 +13563,19 @@
    3872536304 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
    3872636305 
     
    3875036329 } # as_fn_error
    3875136330 
    38752 @@ -13438,16 +13695,16 @@
     36331@@ -13438,16 +13713,16 @@
    3875336332     # ... but there are two gotchas:
    3875436333     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
     
    3877136350 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
    3877236351 rmdir conf$$.dir 2>/dev/null
    38773 @@ -13496,7 +13753,7 @@
     36352@@ -13496,7 +13771,7 @@
    3877436353       test -d "$as_dir" && break
    3877536354     done
     
    3878036359 
    3878136360 } # as_fn_mkdir_p
    38782 @@ -13507,28 +13764,16 @@
     36361@@ -13507,28 +13782,16 @@
    3878336362   as_mkdir_p=false
    3878436363 fi
     
    3881936398 # Sed expression to map a string onto a valid CPP name.
    3882036399 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
    38821 @@ -13550,7 +13795,7 @@
     36400@@ -13550,7 +13813,7 @@
    3882236401 # values after options handling.
    3882336402 ac_log="
     
    3882836407   CONFIG_FILES    = $CONFIG_FILES
    3882936408   CONFIG_HEADERS  = $CONFIG_HEADERS
    38830 @@ -13612,10 +13857,10 @@
     36409@@ -13612,10 +13875,10 @@
    3883136410 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
    3883236411 ac_cs_version="\\
     
    3884136420 gives unlimited permission to copy, distribute and modify it."
    3884236421 
    38843 @@ -13631,11 +13876,16 @@
     36422@@ -13631,11 +13894,16 @@
    3884436423 while test $# != 0
    3884536424 do
     
    3885936438     ac_option=$1
    3886036439     ac_optarg=$2
    38861 @@ -13657,6 +13907,7 @@
     36440@@ -13657,6 +13925,7 @@
    3886236441     $ac_shift
    3886336442     case $ac_optarg in
     
    3886736446     as_fn_append CONFIG_FILES " '$ac_optarg'"
    3886836447     ac_need_defaults=false;;
    38869 @@ -13669,7 +13920,7 @@
     36448@@ -13669,7 +13938,7 @@
    3887036449     ac_need_defaults=false;;
    3887136450   --he | --h)
     
    3887636455   --help | --hel | -h )
    3887736456     $as_echo "$ac_cs_usage"; exit ;;
    38878 @@ -13678,7 +13929,7 @@
     36457@@ -13678,7 +13947,7 @@
    3887936458     ac_cs_silent=: ;;
    3888036459 
     
    3888536464 
    3888636465   *) as_fn_append ac_config_targets " $1"
    38887 @@ -13698,7 +13949,7 @@
     36466@@ -13698,7 +13967,7 @@
    3888836467 _ACEOF
    3888936468 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
     
    3889436473   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
    3889536474   CONFIG_SHELL='$SHELL'
    38896 @@ -13730,7 +13981,7 @@
     36475@@ -13730,7 +13999,7 @@
    3889736476     "auto/config.h") CONFIG_HEADERS="$CONFIG_HEADERS auto/config.h:config.h.in" ;;
    3889836477     "auto/config.mk") CONFIG_FILES="$CONFIG_FILES auto/config.mk:config.mk.in" ;;
     
    3890336482 done
    3890436483 
    38905 @@ -13752,9 +14003,10 @@
     36484@@ -13752,9 +14021,10 @@
    3890636485 # after its creation but before its name has been assigned to `$tmp'.
    3890736486 $debug ||
     
    3891636495   trap 'as_fn_exit 1' 1 2 13 15
    3891736496 }
    38918 @@ -13762,12 +14014,13 @@
     36497@@ -13762,12 +14032,13 @@
    3891936498 
    3892036499 {
     
    3893236511 # Set up the scripts for CONFIG_FILES section.
    3893336512 # No need to generate them if there are no CONFIG_FILES.
    38934 @@ -13784,12 +14037,12 @@
     36513@@ -13784,12 +14055,12 @@
    3893536514 fi
    3893636515 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
     
    3894736526 
    3894836527 
    38949 @@ -13798,18 +14051,18 @@
     36528@@ -13798,18 +14069,18 @@
    3895036529   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
    3895136530   echo "_ACEOF"
     
    3897036549     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
    3897136550   fi
    38972 @@ -13817,7 +14070,7 @@
     36551@@ -13817,7 +14088,7 @@
    3897336552 rm -f conf$$subs.sh
    3897436553 
     
    3897936558 sed -n '
    3898036559 h
    38981 @@ -13865,7 +14118,7 @@
     36560@@ -13865,7 +14136,7 @@
    3898236561 rm -f conf$$subs.awk
    3898336562 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
     
    3898836567   FS = ""
    3898936568 
    38990 @@ -13897,21 +14150,29 @@
     36569@@ -13897,21 +14168,29 @@
    3899136570   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
    3899236571 else
     
    3902736606 }'
    3902836607 fi
    39029 @@ -13923,7 +14184,7 @@
     36608@@ -13923,7 +14202,7 @@
    3903036609 # No need to generate them if there are no CONFIG_HEADERS.
    3903136610 # This happens for instance with `./config.status Makefile'.
     
    3903636615 _ACEOF
    3903736616 
    39038 @@ -13935,11 +14196,11 @@
     36617@@ -13935,11 +14214,11 @@
    3903936618 # handling of long lines.
    3904036619 ac_delim='%!_!# '
     
    3905136630     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
    3905236631   fi
    39053 @@ -14024,7 +14285,7 @@
     36632@@ -14024,7 +14303,7 @@
    3905436633 _ACAWK
    3905536634 _ACEOF
     
    3906036639 
    3906136640 
    39062 @@ -14037,7 +14298,7 @@
     36641@@ -14037,7 +14316,7 @@
    3906336642   esac
    3906436643   case $ac_mode$ac_tag in
     
    3906936648   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
    3907036649   esac
    39071 @@ -14056,7 +14317,7 @@
     36650@@ -14056,7 +14335,7 @@
    3907236651     for ac_f
    3907336652     do
     
    3907836657         # (if the path is not absolute).  The absolute path cannot be DOS-style,
    3907936658         # because $ac_f cannot contain `:'.
    39080 @@ -14065,7 +14326,7 @@
     36659@@ -14065,7 +14344,7 @@
    3908136660           [\\/$]*) false;;
    3908236661           *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
     
    3908736666       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
    3908836667       as_fn_append ac_file_inputs " '$ac_f'"
    39089 @@ -14091,8 +14352,8 @@
     36668@@ -14091,8 +14370,8 @@
    3909036669     esac
    3909136670 
     
    3909836677     ;;
    3909936678   esac
    39100 @@ -14217,23 +14478,24 @@
     36679@@ -14217,23 +14496,24 @@
    3910136680 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
    3910236681 $ac_datarootdir_hack
     
    3913336712   :H)
    3913436713   #
    39135 @@ -14242,21 +14504,21 @@
     36714@@ -14242,21 +14522,21 @@
    3913636715   if test x"$ac_file" != x-; then
    3913736716     {
     
    3916336742  ;;
    3916436743 
    39165 @@ -14271,7 +14533,7 @@
     36744@@ -14271,7 +14551,7 @@
    3916636745 ac_clean_files=$ac_clean_files_save
    3916736746 
     
    3917236751 
    3917336752 # configure is writing to config.log, and then calls config.status.
    39174 @@ -14292,7 +14554,7 @@
     36753@@ -14292,7 +14572,7 @@
    3917536754   exec 5>>auto/config.log
    3917636755   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
     
    3918336762diff -Naur vim74.orig/src/blowfish.c vim74/src/blowfish.c
    3918436763--- vim74.orig/src/blowfish.c   2010-12-17 18:58:18.000000000 +0000
    39185 +++ vim74/src/blowfish.c        2014-04-27 05:20:58.115101918 +0000
     36764+++ vim74/src/blowfish.c        2014-06-01 00:43:13.954147444 +0000
    3918636765@@ -6,7 +6,7 @@
    3918736766  * Do ":help credits" in Vim to see a list of people who contributed.
     
    3931136890diff -Naur vim74.orig/src/buffer.c vim74/src/buffer.c
    3931236891--- vim74.orig/src/buffer.c     2013-07-17 14:39:00.000000000 +0000
    39313 +++ vim74/src/buffer.c  2014-04-27 05:20:58.115101918 +0000
     36892+++ vim74/src/buffer.c  2014-06-01 00:43:13.980814043 +0000
    3931436893@@ -211,7 +211,12 @@
    3931536894 
     
    3952937108        }
    3953037109 
     37110@@ -5468,6 +5525,10 @@
     37111     return;
     37112 }
     37113 
     37114+/*
     37115+ * For an existing, placed sign "markId" change the type to "typenr".
     37116+ * Returns the line number of the sign, or zero if the sign is not found.
     37117+ */
     37118     linenr_T
     37119 buf_change_sign_type(buf, markId, typenr)
     37120     buf_T      *buf;           /* buffer to store sign in */
     37121@@ -5636,6 +5697,14 @@
     37122 {
     37123     signlist_T *next;
     37124 
     37125+    /* When deleting the last sign need to redraw the windows to remove the
     37126+     * sign column. */
     37127+    if (buf->b_signlist != NULL)
     37128+    {
     37129+       redraw_buf_later(buf, NOT_VALID);
     37130+       changed_cline_bef_curs();
     37131+    }
     37132+
     37133     while (buf->b_signlist != NULL)
     37134     {
     37135        next = buf->b_signlist->next;
     37136@@ -5654,11 +5723,7 @@
     37137 
     37138     for (buf = firstbuf; buf != NULL; buf = buf->b_next)
     37139        if (buf->b_signlist != NULL)
     37140-       {
     37141-           /* Need to redraw the windows to remove the sign column. */
     37142-           redraw_buf_later(buf, NOT_VALID);
     37143            buf_delete_signs(buf);
     37144-       }
     37145 }
     37146 
     37147 /*
    3953137148diff -Naur vim74.orig/src/charset.c vim74/src/charset.c
    3953237149--- vim74.orig/src/charset.c    2013-02-06 15:20:01.000000000 +0000
    39533 +++ vim74/src/charset.c 2014-04-27 05:20:58.118435333 +0000
     37150+++ vim74/src/charset.c 2014-06-01 00:43:14.000813992 +0000
    3953437151@@ -1380,10 +1380,7 @@
    3953537152                && (State & NORMAL)
     
    3956237179diff -Naur vim74.orig/src/config.h.in vim74/src/config.h.in
    3956337180--- vim74.orig/src/config.h.in  2013-02-26 13:18:19.000000000 +0000
    39564 +++ vim74/src/config.h.in       2014-04-27 05:20:58.118435333 +0000
     37181+++ vim74/src/config.h.in       2014-06-01 00:43:14.020813941 +0000
    3956537182@@ -37,10 +37,10 @@
    3956637183 #undef UNIX
     
    3959337210diff -Naur vim74.orig/src/configure.in vim74/src/configure.in
    3959437211--- vim74.orig/src/configure.in 2013-08-04 18:00:50.000000000 +0000
    39595 +++ vim74/src/configure.in      2014-04-27 05:20:58.121768749 +0000
     37212+++ vim74/src/configure.in      2014-06-01 00:43:14.080813788 +0000
    3959637213@@ -14,6 +14,7 @@
    3959737214 AC_PROG_CC     dnl required by almost everything
     
    3977437391          fi
    3977537392        fi
    39776 @@ -1359,7 +1428,7 @@
     37393@@ -1063,10 +1132,15 @@
     37394              vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//`
     37395            fi
     37396        ])
     37397+       AC_CACHE_VAL(vi_cv_dll_name_python,
     37398+       [
     37399+         if test "X$python_DLLLIBRARY" != "X"; then
     37400+           vi_cv_dll_name_python="$python_DLLLIBRARY"
     37401+         else
     37402+           vi_cv_dll_name_python="$python_INSTSONAME"
     37403+         fi
     37404+       ])
     37405 
     37406-       if test "X$python_DLLLIBRARY" != "X"; then
     37407-         python_INSTSONAME="$python_DLLLIBRARY"
     37408-       fi
     37409        PYTHON_LIBS="${vi_cv_path_python_plibs}"
     37410        if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then
     37411          PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -DPYTHON_HOME='\"${vi_cv_path_python_pfx}\"'"
     37412@@ -1254,19 +1328,24 @@
     37413        @echo "python3_DLLLIBRARY='$(DLLLIBRARY)'"
     37414        @echo "python3_INSTSONAME='$(INSTSONAME)'"
     37415 eof
     37416-            dnl -- delete the lines from make about Entering/Leaving directory
     37417-            eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
     37418-            rm -f -- "${tmp_mkf}"
     37419+           dnl -- delete the lines from make about Entering/Leaving directory
     37420+           eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
     37421+           rm -f -- "${tmp_mkf}"
     37422            vi_cv_path_python3_plibs="-L${PYTHON3_CONFDIR} -lpython${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}"
     37423-            vi_cv_path_python3_plibs="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS}"
     37424-            dnl remove -ltermcap, it can conflict with an earlier -lncurses
     37425-            vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//`
     37426-            vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//`
     37427-        ])
     37428
     37429-        if test "X$python3_DLLLIBRARY" != "X"; then
     37430-         python3_INSTSONAME="$python3_DLLLIBRARY"
     37431-        fi
     37432+           vi_cv_path_python3_plibs="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS}"
     37433+           dnl remove -ltermcap, it can conflict with an earlier -lncurses
     37434+           vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//`
     37435+           vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//`
     37436+       ])
     37437+       AC_CACHE_VAL(vi_cv_dll_name_python3,
     37438+       [
     37439+         if test "X$python3_DLLLIBRARY" != "X"; then
     37440+           vi_cv_dll_name_python3="$python3_DLLLIBRARY"
     37441+         else
     37442+           vi_cv_dll_name_python3="$python3_INSTSONAME"
     37443+         fi
     37444+       ])
     37445+
     37446         PYTHON3_LIBS="${vi_cv_path_python3_plibs}"
     37447         if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then
     37448           PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -DPYTHON3_HOME='L\"${vi_cv_path_python3_pfx}\"'"
     37449@@ -1359,7 +1438,7 @@
    3977737450   ldflags_save=$LDFLAGS
    3977837451   dnl -ldl must go first to make this work on Archlinux (Roland Puntaier)
     
    3978337456     /* If this program fails, then RTLD_GLOBAL is needed.
    3978437457      * RTLD_GLOBAL will be used and then it is not possible to
    39785 @@ -1392,7 +1461,7 @@
    39786        if (no_rtl_global_needed_for("${python_INSTSONAME}", "${vi_cv_path_python_pfx}"))
     37458@@ -1389,10 +1468,10 @@
     37459     int main(int argc, char** argv)
     37460     {
     37461       int not_needed = 0;
     37462-      if (no_rtl_global_needed_for("${python_INSTSONAME}", "${vi_cv_path_python_pfx}"))
     37463+      if (no_rtl_global_needed_for("${vi_cv_dll_name_python}", "${vi_cv_path_python_pfx}"))
    3978737464             not_needed = 1;
    3978837465       return !not_needed;
     
    3979237469 
    3979337470   CFLAGS=$cflags_save
    39794 @@ -1404,7 +1473,7 @@
     37471@@ -1404,7 +1483,7 @@
    3979537472   ldflags_save=$LDFLAGS
    3979637473   dnl -ldl must go first to make this work on Archlinux (Roland Puntaier)
     
    3980137478     #include <wchar.h>
    3980237479     /* If this program fails, then RTLD_GLOBAL is needed.
    39803 @@ -1438,7 +1507,7 @@
    39804        if (no_rtl_global_needed_for("${python3_INSTSONAME}", L"${vi_cv_path_python3_pfx}"))
     37480@@ -1435,10 +1514,10 @@
     37481     int main(int argc, char** argv)
     37482     {
     37483       int not_needed = 0;
     37484-      if (no_rtl_global_needed_for("${python3_INSTSONAME}", L"${vi_cv_path_python3_pfx}"))
     37485+      if (no_rtl_global_needed_for("${vi_cv_dll_name_python3}", L"${vi_cv_path_python3_pfx}"))
    3980537486             not_needed = 1;
    3980637487       return !not_needed;
     
    3981037491 
    3981137492   CFLAGS=$cflags_save
    39812 @@ -1654,9 +1723,9 @@
     37493@@ -1446,17 +1525,17 @@
     37494 
     37495   PYTHON_SRC="if_python.c"
     37496   PYTHON_OBJ="objects/if_python.o"
     37497-  PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${python_INSTSONAME}\\\""
     37498+  PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${vi_cv_dll_name_python}\\\""
     37499   PYTHON_LIBS=
     37500   PYTHON3_SRC="if_python3.c"
     37501   PYTHON3_OBJ="objects/if_python3.o"
     37502-  PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${python3_INSTSONAME}\\\""
     37503+  PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${vi_cv_dll_name_python3}\\\""
     37504   PYTHON3_LIBS=
     37505 elif test "$python_ok" = yes && test "$enable_pythoninterp" = "dynamic"; then
     37506   AC_DEFINE(DYNAMIC_PYTHON)
     37507   PYTHON_SRC="if_python.c"
     37508   PYTHON_OBJ="objects/if_python.o"
     37509-  PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${python_INSTSONAME}\\\""
     37510+  PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${vi_cv_dll_name_python}\\\""
     37511   PYTHON_LIBS=
     37512 elif test "$python_ok" = yes; then
     37513   dnl Check that adding -fPIE works.  It may be needed when using a static
     37514@@ -1478,7 +1557,7 @@
     37515   AC_DEFINE(DYNAMIC_PYTHON3)
     37516   PYTHON3_SRC="if_python3.c"
     37517   PYTHON3_OBJ="objects/if_python3.o"
     37518-  PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${python3_INSTSONAME}\\\""
     37519+  PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${vi_cv_dll_name_python3}\\\""
     37520   PYTHON3_LIBS=
     37521 elif test "$python3_ok" = yes; then
     37522   dnl Check that adding -fPIE works.  It may be needed when using a static
     37523@@ -1654,9 +1733,9 @@
    3981337524       if test "X$rubyhdrdir" != "X"; then
    3981437525        AC_MSG_RESULT($rubyhdrdir)
     
    3982337534         rubyversion=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG[['ruby_version']].gsub(/\./, '')[[0,2]]"`
    3982437535        if test "X$rubyversion" = "X"; then
    39825 @@ -1689,7 +1758,7 @@
     37536@@ -1689,7 +1768,7 @@
    3982637537          dnl configure, so strip these flags first (if present)
    3982737538          rubyldflags=`echo "$rubyldflags" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
     
    3983237543            fi
    3983337544          fi
    39834 @@ -2574,7 +2643,7 @@
     37545@@ -2574,7 +2653,7 @@
    3983537546     AC_MSG_CHECKING(for XIMText in X11/Xlib.h)
    3983637547     AC_EGREP_CPP(XIMText, [#include <X11/Xlib.h>],
     
    3984137552   CPPFLAGS=$cppflags_save
    3984237553 
    39843 @@ -2699,7 +2768,7 @@
     37554@@ -2699,7 +2778,7 @@
    3984437555 
    3984537556 AC_CACHE_CHECK([whether toupper is broken], [vim_cv_toupper_broken],
     
    3985037561 #include <ctype.h>
    3985137562 #if STDC_HEADERS
    39852 @@ -2707,7 +2776,7 @@
     37563@@ -2707,7 +2786,7 @@
    3985337564 # include <stddef.h>
    3985437565 #endif
     
    3985937570   ],[
    3986037571     vim_cv_toupper_broken=no
    39861 @@ -2955,7 +3024,7 @@
     37572@@ -2955,7 +3034,7 @@
    3986237573 
    3986337574 AC_CACHE_CHECK([whether we talk terminfo], [vim_cv_terminfo],
     
    3986837579 #ifdef HAVE_TERMCAP_H
    3986937580 # include <termcap.h>
    39870 @@ -2969,7 +3038,7 @@
     37581@@ -2969,7 +3048,7 @@
    3987137582 #endif
    3987237583 main()
     
    3987737588     ],[
    3987837589       vim_cv_terminfo=yes
    39879 @@ -2985,7 +3054,7 @@
     37590@@ -2985,7 +3064,7 @@
    3988037591 if test "x$olibs" != "x$LIBS"; then
    3988137592   AC_CACHE_CHECK([what tgetent() returns for an unknown terminal], [vim_cv_tgent],
     
    3988637597 #ifdef HAVE_TERMCAP_H
    3988737598 # include <termcap.h>
    39888 @@ -2996,7 +3065,7 @@
     37599@@ -2996,7 +3075,7 @@
    3988937600 #endif
    3989037601 main()
     
    3989537606       ],[
    3989637607        vim_cv_tgent=non-zero
    39897 @@ -3120,7 +3189,7 @@
     37608@@ -3120,7 +3199,7 @@
    3989837609 rm -f conftest_grp
    3989937610 AC_CACHE_CHECK([default tty permissions/group], [vim_cv_tty_group],
     
    3990437615 #include <sys/types.h>
    3990537616 #if STDC_HEADERS
    39906 @@ -3156,7 +3225,7 @@
     37617@@ -3156,7 +3235,7 @@
    3990737618   fclose(fp);
    3990837619   exit(0);
     
    3991337624        vim_cv_tty_group=`cat conftest_grp`
    3991437625        if test "x$vim_cv_tty_mode" = "x" ; then
    39915 @@ -3214,7 +3283,7 @@
     37626@@ -3214,7 +3293,7 @@
    3991637627 dnl system("sh -c pwd")
    3991737628 AC_CACHE_CHECK([getcwd implementation is broken], [vim_cv_getcwd_broken],
     
    3992237633 #ifdef HAVE_UNISTD_H
    3992337634 #include <unistd.h>
    39924 @@ -3227,7 +3296,7 @@
     37635@@ -3227,7 +3306,7 @@
    3992537636   environ = dagger;
    3992637637   return getcwd(buffer, 500) ? 0 : 1;
     
    3993137642     ],[
    3993237643       vim_cv_getcwd_broken=yes
    39933 @@ -3270,7 +3339,7 @@
     37644@@ -3270,7 +3349,7 @@
    3993437645 
    3993537646 AC_CACHE_CHECK([whether stat() ignores a trailing slash], [vim_cv_stat_ignores_slash],
     
    3994037651 #if STDC_HEADERS
    3994137652 # include <stdlib.h>
    39942 @@ -3279,7 +3348,7 @@
     37653@@ -3279,7 +3358,7 @@
    3994337654 #include <sys/types.h>
    3994437655 #include <sys/stat.h>
     
    3994937660     ],[
    3995037661       vim_cv_stat_ignores_slash=no
    39951 @@ -3543,6 +3612,10 @@
     37662@@ -3543,6 +3622,10 @@
    3995237663 AC_CHECK_SIZEOF([time_t])
    3995337664 AC_CHECK_SIZEOF([off_t])
     
    3996037671 AC_MSG_CHECKING([uint32_t is 32 bits])
    3996137672 AC_TRY_RUN([
    39962 @@ -3589,7 +3662,7 @@
     37673@@ -3589,7 +3672,7 @@
    3996337674 
    3996437675 AC_CACHE_CHECK([whether memmove handles overlaps],[vim_cv_memmove_handles_overlap],
     
    3996937680        vim_cv_memmove_handles_overlap=yes
    3997037681       ],[
    39971 @@ -3604,7 +3677,7 @@
     37682@@ -3604,7 +3687,7 @@
    3997237683 else
    3997337684   AC_CACHE_CHECK([whether bcopy handles overlaps],[vim_cv_bcopy_handles_overlap],
     
    3997837689        vim_cv_bcopy_handles_overlap=yes
    3997937690       ],[
    39980 @@ -3619,7 +3692,7 @@
     37691@@ -3619,7 +3702,7 @@
    3998137692   else
    3998237693     AC_CACHE_CHECK([whether memcpy handles overlaps],[vim_cv_memcpy_handles_overlap],
     
    3998737698            vim_cv_memcpy_handles_overlap=yes
    3998837699          ],[
    39989 @@ -3697,6 +3770,9 @@
     37700@@ -3697,6 +3780,9 @@
    3999037701 fi
    3999137702 
     
    3999737708 AC_ARG_ENABLE(nls,
    3999837709        [  --disable-nls           Don't support NLS (gettext()).], ,
    39999 @@ -3715,16 +3791,18 @@
     37710@@ -3715,16 +3801,18 @@
    4000037711   if test -f po/Makefile; then
    4000137712     have_gettext="no"
     
    4002237733diff -Naur vim74.orig/src/diff.c vim74/src/diff.c
    4002337734--- vim74.orig/src/diff.c       2013-07-17 11:43:15.000000000 +0000
    40024 +++ vim74/src/diff.c    2014-04-27 05:20:58.121768749 +0000
    40025 @@ -1203,7 +1203,7 @@
     37735+++ vim74/src/diff.c    2014-06-01 00:43:14.104147062 +0000
     37736@@ -622,6 +622,7 @@
     37737                    wp->w_topfill = (n < 0 ? 0 : n);
     37738                else if (n > 0 && n > wp->w_topfill)
     37739                    wp->w_topfill = n;
     37740+               check_topfill(wp, FALSE);
     37741            }
     37742        }
     37743 }
     37744@@ -1203,7 +1204,7 @@
    4002637745 
    4002737746     for (wp = firstwin; wp != NULL; wp = wp->w_next)
     
    4003437753diff -Naur vim74.orig/src/dosinst.c vim74/src/dosinst.c
    4003537754--- vim74.orig/src/dosinst.c    2013-05-06 02:06:04.000000000 +0000
    40036 +++ vim74/src/dosinst.c 2014-04-27 05:20:58.125102165 +0000
     37755+++ vim74/src/dosinst.c 2014-06-01 00:43:14.177480209 +0000
    4003737756@@ -1192,23 +1192,29 @@
    4003837757        fprintf(fd, "  if arg3 =~ ' ' | let arg3 = '\"' . arg3 . '\"' | endif\n");
     
    4008737806diff -Naur vim74.orig/src/edit.c vim74/src/edit.c
    4008837807--- vim74.orig/src/edit.c       2013-07-04 18:22:25.000000000 +0000
    40089 +++ vim74/src/edit.c    2014-04-27 05:20:58.128435582 +0000
     37808+++ vim74/src/edit.c    2014-06-01 00:43:14.210813457 +0000
    4009037809@@ -199,7 +199,7 @@
    4009137810 static void spell_back_to_badword __ARGS((void));
     
    4030838027     /* Show the popup menu with a different set of matches. */
    4030938028     ins_compl_show_pum();
    40310 @@ -4179,6 +4183,7 @@
     38029@@ -3850,7 +3854,8 @@
     38030            ins_compl_free();
     38031            compl_started = FALSE;
     38032            compl_matches = 0;
     38033-           msg_clr_cmdline();          /* necessary for "noshowmode" */
     38034+           if (!shortmess(SHM_COMPLETIONMENU))
     38035+               msg_clr_cmdline();      /* necessary for "noshowmode" */
     38036            ctrl_x_mode = 0;
     38037            compl_enter_selects = FALSE;
     38038            if (edit_submode != NULL)
     38039@@ -4179,6 +4184,7 @@
    4031138040     char_u     *dict = NULL;
    4031238041     int                dict_f = 0;
     
    4031638045     if (!compl_started)
    4031738046     {
    40318 @@ -4197,6 +4202,7 @@
     38047@@ -4197,6 +4203,7 @@
    4031938048     for (;;)
    4032038049     {
     
    4032438053        /* For ^N/^P pick a new entry from e_cpt if compl_started is off,
    4032538054         * or if found_all says this entry is done.  For ^X^L only use the
    40326 @@ -4216,6 +4222,10 @@
     38055@@ -4216,6 +4223,10 @@
    4032738056                    dec(&first_match_pos);
    4032838057                last_match_pos = first_match_pos;
     
    4033538064            else if (vim_strchr((char_u *)"buwU", *e_cpt) != NULL
    4033638065                 && (ins_buf = ins_compl_next_buf(ins_buf, *e_cpt)) != curbuf)
    40337 @@ -4380,7 +4390,7 @@
     38066@@ -4380,7 +4391,7 @@
    4033838067            if (ins_buf->b_p_inf)
    4033938068                p_scs = FALSE;
     
    4034438073             *  buffers is a good idea, on the other hand, we always set
    4034538074             *  wrapscan for curbuf to avoid missing matches -- Acevedo,Webb */
    40346 @@ -4407,12 +4417,13 @@
     38075@@ -4407,12 +4418,13 @@
    4034738076                                 compl_pattern, 1L, SEARCH_KEEP + SEARCH_NFMSG,
    4034838077                                                  RE_LAST, (linenr_T)0, NULL);
     
    4035938088                else if (first_match_pos.lnum == last_match_pos.lnum
    4036038089                                 && first_match_pos.col == last_match_pos.col)
    40361 @@ -5184,9 +5195,21 @@
     38090@@ -5184,9 +5196,21 @@
    4036238091        }
    4036338092        else if (ctrl_x_mode == CTRL_X_FILES)
     
    4038438113            compl_pattern = addstar(line + compl_col, compl_length,
    4038538114                                                                EXPAND_FILES);
    40386 @@ -6687,7 +6710,7 @@
     38115@@ -5262,7 +5286,8 @@
     38116            {
     38117                ctrl_x_mode = 0;
     38118                edit_submode = NULL;
     38119-               msg_clr_cmdline();
     38120+               if (!shortmess(SHM_COMPLETIONMENU))
     38121+                   msg_clr_cmdline();
     38122                return FAIL;
     38123            }
     38124 
     38125@@ -5521,15 +5546,18 @@
     38126 
     38127     /* Show a message about what (completion) mode we're in. */
     38128     showmode();
     38129-    if (edit_submode_extra != NULL)
     38130+    if (!shortmess(SHM_COMPLETIONMENU))
     38131     {
     38132-       if (!p_smd)
     38133-           msg_attr(edit_submode_extra,
     38134-                   edit_submode_highl < HLF_COUNT
     38135-                   ? hl_attr(edit_submode_highl) : 0);
     38136+       if (edit_submode_extra != NULL)
     38137+       {
     38138+           if (!p_smd)
     38139+               msg_attr(edit_submode_extra,
     38140+                       edit_submode_highl < HLF_COUNT
     38141+                       ? hl_attr(edit_submode_highl) : 0);
     38142+       }
     38143+       else
     38144+           msg_clr_cmdline();  /* necessary for "noshowmode" */
     38145     }
     38146-    else
     38147-       msg_clr_cmdline();      /* necessary for "noshowmode" */
     38148 
     38149     /* Show the popup menu, unless we got interrupted. */
     38150     if (!compl_interrupted)
     38151@@ -6687,7 +6715,7 @@
    4038738152     if (!arrow_used)       /* something has been inserted */
    4038838153     {
     
    4039338158     }
    4039438159 #ifdef FEAT_SPELL
    40395 @@ -6776,9 +6799,10 @@
     38160@@ -6776,9 +6804,10 @@
    4039638161  * to another window/buffer.
    4039738162  */
     
    4040538170     int                cc;
    4040638171     char_u     *ptr;
    40407 @@ -6849,7 +6873,7 @@
     38172@@ -6849,7 +6878,7 @@
    4040838173         * Do this when ESC was used or moving the cursor up/down.
    4040938174         * Check for the old position still being valid, just in case the text
     
    4041438179                && end_insert_pos->lnum <= curbuf->b_ml.ml_line_count)
    4041538180        {
    40416 @@ -6872,7 +6896,6 @@
     38181@@ -6872,7 +6901,6 @@
    4041738182            else if (cc != NUL)
    4041838183                ++curwin->w_cursor.col; /* put cursor back on the NUL */
     
    4042238187             * deleted characters. */
    4042338188            if (VIsual_active && VIsual.lnum == curwin->w_cursor.lnum)
    40424 @@ -6882,12 +6905,11 @@
     38189@@ -6882,12 +6910,11 @@
    4042538190                if (VIsual.col > len)
    4042638191                {
     
    4043738202     }
    4043838203     did_ai = FALSE;
    40439 @@ -6902,6 +6924,7 @@
     38204@@ -6902,6 +6929,7 @@
    4044038205     if (end_insert_pos != NULL)
    4044138206     {
     
    4044538210     }
    4044638211 }
    40447 @@ -7845,8 +7868,7 @@
     38212@@ -7845,8 +7873,7 @@
    4044838213            if (try_match && keytyped == ':')
    4044938214            {
     
    4045538220                /* Need to get the line again after cin_islabel(). */
    4045638221                p = ml_get_curline();
    40457 @@ -7856,7 +7878,7 @@
     38222@@ -7856,7 +7883,7 @@
    4045838223                {
    4045938224                    p[curwin->w_cursor.col - 1] = ' ';
     
    4046438229                    p[curwin->w_cursor.col - 1] = ':';
    4046538230                    if (i)
    40466 @@ -8084,9 +8106,7 @@
     38231@@ -8084,9 +8111,7 @@
    4046738232     int                need_redraw = FALSE;
    4046838233     int                regname;
     
    4047438239     /*
    4047538240      * If we are going to wait for a character, show a '"'.
    40476 @@ -8190,11 +8210,9 @@
     38241@@ -8190,11 +8215,9 @@
    4047738242     if (need_redraw || stuff_empty())
    4047838243        edit_unputchar();
     
    4048638251 
    4048738252 /*
    40488 @@ -8237,6 +8255,7 @@
     38253@@ -8237,6 +8260,7 @@
    4048938254 
    4049038255                  /* Need to reset Insstart, esp. because a BS that joins
     
    4049438259                  break;
    4049538260 
    40496 @@ -8366,7 +8385,7 @@
     38261@@ -8366,7 +8390,7 @@
    4049738262            disabled_redraw = TRUE;
    4049838263            return FALSE;       /* repeat the insert */
     
    4050338268     }
    4050438269 
    40505 @@ -8390,11 +8409,7 @@
     38270@@ -8390,11 +8414,7 @@
    4050638271 #endif
    4050738272               )
     
    4051638281            && !revins_on
    4051738282 #endif
    40518 @@ -8496,7 +8511,6 @@
     38283@@ -8496,7 +8516,6 @@
    4051938284 }
    4052038285 #endif
     
    4052438289  * If 'keymodel' contains "startsel", may start selection.
    4052538290  * Returns TRUE when a CTRL-O and other keys stuffed.
    40526 @@ -8552,7 +8566,6 @@
     38291@@ -8552,7 +8571,6 @@
    4052738292        }
    4052838293     return FALSE;
     
    4053238297 /*
    4053338298  * <Insert> key in Insert mode: toggle insert/replace mode.
    40534 @@ -8946,7 +8959,7 @@
     38299@@ -8672,7 +8690,7 @@
     38300     {
     38301        temp = curwin->w_cursor.col;
     38302        if (!can_bs(BS_EOL)             /* only if "eol" included */
     38303-               || do_join(2, FALSE, TRUE, FALSE) == FAIL)
     38304+               || do_join(2, FALSE, TRUE, FALSE, FALSE) == FAIL)
     38305            vim_beep();
     38306        else
     38307            curwin->w_cursor.col = temp;
     38308@@ -8747,8 +8765,8 @@
     38309                ((curwin->w_cursor.lnum == 1 && curwin->w_cursor.col == 0)
     38310                    || (!can_bs(BS_START)
     38311                        && (arrow_used
     38312-                           || (curwin->w_cursor.lnum == Insstart.lnum
     38313-                               && curwin->w_cursor.col <= Insstart.col)))
     38314+                           || (curwin->w_cursor.lnum == Insstart_orig.lnum
     38315+                               && curwin->w_cursor.col <= Insstart_orig.col)))
     38316                    || (!can_bs(BS_INDENT) && !arrow_used && ai_col > 0
     38317                                         && curwin->w_cursor.col <= ai_col)
     38318                    || (!can_bs(BS_EOL) && curwin->w_cursor.col == 0))))
     38319@@ -8799,8 +8817,8 @@
     38320      */
     38321     if (curwin->w_cursor.col == 0)
     38322     {
     38323-       lnum = Insstart.lnum;
     38324-       if (curwin->w_cursor.lnum == Insstart.lnum
     38325+       lnum = Insstart_orig.lnum;
     38326+       if (curwin->w_cursor.lnum == lnum
     38327 #ifdef FEAT_RIGHTLEFT
     38328                        || revins_on
     38329 #endif
     38330@@ -8809,8 +8827,8 @@
     38331            if (u_save((linenr_T)(curwin->w_cursor.lnum - 2),
     38332                               (linenr_T)(curwin->w_cursor.lnum + 1)) == FAIL)
     38333                return FALSE;
     38334-           --Insstart.lnum;
     38335-           Insstart.col = MAXCOL;
     38336+           --Insstart_orig.lnum;
     38337+           Insstart_orig.col = MAXCOL;
     38338        }
     38339        /*
     38340         * In replace mode:
     38341@@ -8853,7 +8871,7 @@
     38342                        ptr[len - 1] = NUL;
     38343                }
     38344 
     38345-               (void)do_join(2, FALSE, FALSE, FALSE);
     38346+               (void)do_join(2, FALSE, FALSE, FALSE, FALSE);
     38347                if (temp == NUL && gchar_cursor() != NUL)
     38348                    inc_cursor();
     38349            }
     38350@@ -8946,7 +8964,7 @@
    4053538351 
    4053638352            *inserted_space_p = FALSE;
     
    4054138357                ts = (int)get_sts_value();
    4054238358            /* Compute the virtual column where we want to be.  Since
    40543 @@ -9635,7 +9648,7 @@
     38359@@ -8968,9 +8986,9 @@
     38360            while (vcol < want_vcol)
     38361            {
     38362                /* Remember the first char we inserted */
     38363-               if (curwin->w_cursor.lnum == Insstart.lnum
     38364-                                  && curwin->w_cursor.col < Insstart.col)
     38365-                   Insstart.col = curwin->w_cursor.col;
     38366+               if (curwin->w_cursor.lnum == Insstart_orig.lnum
     38367+                                  && curwin->w_cursor.col < Insstart_orig.col)
     38368+                   Insstart_orig.col = curwin->w_cursor.col;
     38369 
     38370 #ifdef FEAT_VREPLACE
     38371                if (State & VREPLACE_FLAG)
     38372@@ -9058,8 +9076,8 @@
     38373                revins_on ||
     38374 #endif
     38375                (curwin->w_cursor.col > mincol
     38376-                && (curwin->w_cursor.lnum != Insstart.lnum
     38377-                    || curwin->w_cursor.col != Insstart.col)));
     38378+                && (curwin->w_cursor.lnum != Insstart_orig.lnum
     38379+                    || curwin->w_cursor.col != Insstart_orig.col)));
     38380        did_backspace = TRUE;
     38381     }
     38382 #ifdef FEAT_SMARTINDENT
     38383@@ -9077,9 +9095,9 @@
     38384     AppendCharToRedobuff(c);
     38385 
     38386     /* If deleted before the insertion point, adjust it */
     38387-    if (curwin->w_cursor.lnum == Insstart.lnum
     38388-                                      && curwin->w_cursor.col < Insstart.col)
     38389-       Insstart.col = curwin->w_cursor.col;
     38390+    if (curwin->w_cursor.lnum == Insstart_orig.lnum
     38391+                                      && curwin->w_cursor.col < Insstart_orig.col)
     38392+       Insstart_orig.col = curwin->w_cursor.col;
     38393 
     38394     /* vi behaviour: the cursor moves backward but the character that
     38395      *              was there remains visible
     38396@@ -9635,7 +9653,7 @@
    4054438397      * When nothing special, insert TAB like a normal character
    4054538398      */
     
    4055038403        return TRUE;
    4055138404 
    40552 @@ -9651,7 +9664,7 @@
     38405@@ -9651,7 +9669,7 @@
    4055338406     AppendToRedobuff((char_u *)"\t");
    4055438407 
     
    4056138414diff -Naur vim74.orig/src/eval.c vim74/src/eval.c
    4056238415--- vim74.orig/src/eval.c       2013-07-05 16:23:42.000000000 +0000
    40563 +++ vim74/src/eval.c    2014-04-27 05:20:58.138435829 +0000
     38416+++ vim74/src/eval.c    2014-06-01 00:43:14.237480056 +0000
    4056438417@@ -125,9 +125,6 @@
    4056538418  */
     
    4061338466 static int call_func __ARGS((char_u *funcname, int len, typval_T *rettv, int argcount, typval_T *argvars, linenr_T firstline, linenr_T lastline, int *doesrange, int evaluate, dict_T *selfdict));
    4061438467 static void emsg_funcname __ARGS((char *ermsg, char_u *name));
    40615 @@ -474,7 +478,9 @@
     38468@@ -459,6 +463,7 @@
     38469 static void f_append __ARGS((typval_T *argvars, typval_T *rettv));
     38470 static void f_argc __ARGS((typval_T *argvars, typval_T *rettv));
     38471 static void f_argidx __ARGS((typval_T *argvars, typval_T *rettv));
     38472+static void f_arglistid __ARGS((typval_T *argvars, typval_T *rettv));
     38473 static void f_argv __ARGS((typval_T *argvars, typval_T *rettv));
     38474 #ifdef FEAT_FLOAT
     38475 static void f_asin __ARGS((typval_T *argvars, typval_T *rettv));
     38476@@ -474,7 +479,9 @@
    4061638477 static void f_bufnr __ARGS((typval_T *argvars, typval_T *rettv));
    4061738478 static void f_bufwinnr __ARGS((typval_T *argvars, typval_T *rettv));
     
    4062338484 #ifdef FEAT_FLOAT
    4062438485 static void f_ceil __ARGS((typval_T *argvars, typval_T *rettv));
    40625 @@ -508,6 +514,7 @@
     38486@@ -508,6 +515,7 @@
    4062638487 static void f_eval __ARGS((typval_T *argvars, typval_T *rettv));
    4062738488 static void f_eventhandler __ARGS((typval_T *argvars, typval_T *rettv));
     
    4063138492 #ifdef FEAT_FLOAT
    4063238493 static void f_exp __ARGS((typval_T *argvars, typval_T *rettv));
    40633 @@ -719,6 +726,7 @@
     38494@@ -552,6 +560,7 @@
     38495 static void f_getline __ARGS((typval_T *argvars, typval_T *rettv));
     38496 static void f_getmatches __ARGS((typval_T *argvars, typval_T *rettv));
     38497 static void f_getpid __ARGS((typval_T *argvars, typval_T *rettv));
     38498+static void f_getcurpos __ARGS((typval_T *argvars, typval_T *rettv));
     38499 static void f_getpos __ARGS((typval_T *argvars, typval_T *rettv));
     38500 static void f_getqflist __ARGS((typval_T *argvars, typval_T *rettv));
     38501 static void f_getreg __ARGS((typval_T *argvars, typval_T *rettv));
     38502@@ -719,6 +728,7 @@
    4063438503 static void f_synstack __ARGS((typval_T *argvars, typval_T *rettv));
    4063538504 static void f_synconcealed __ARGS((typval_T *argvars, typval_T *rettv));
     
    4063938508 static void f_tabpagenr __ARGS((typval_T *argvars, typval_T *rettv));
    4064038509 static void f_tabpagewinnr __ARGS((typval_T *argvars, typval_T *rettv));
    40641 @@ -739,6 +747,7 @@
     38510@@ -739,6 +749,7 @@
    4064238511 static void f_type __ARGS((typval_T *argvars, typval_T *rettv));
    4064338512 static void f_undofile __ARGS((typval_T *argvars, typval_T *rettv));
     
    4064738516 static void f_virtcol __ARGS((typval_T *argvars, typval_T *rettv));
    4064838517 static void f_visualmode __ARGS((typval_T *argvars, typval_T *rettv));
    40649 @@ -767,7 +776,7 @@
     38518@@ -755,7 +766,7 @@
     38519 static void f_writefile __ARGS((typval_T *argvars, typval_T *rettv));
     38520 static void f_xor __ARGS((typval_T *argvars, typval_T *rettv));
     38521 
     38522-static int list2fpos __ARGS((typval_T *arg, pos_T *posp, int *fnump));
     38523+static int list2fpos __ARGS((typval_T *arg, pos_T *posp, int *fnump, colnr_T *curswantp));
     38524 static pos_T *var2fpos __ARGS((typval_T *varp, int dollar_lnum, int *fnum));
     38525 static int get_env_len __ARGS((char_u **arg));
     38526 static int get_id_len __ARGS((char_u **arg));
     38527@@ -767,7 +778,7 @@
    4065038528 static char_u * make_expanded_name __ARGS((char_u *in_start, char_u *expr_start, char_u *expr_end, char_u *in_end));
    4065138529 static int eval_isnamec __ARGS((int c));
     
    4065638534 static typval_T *alloc_tv __ARGS((void));
    4065738535 static typval_T *alloc_string_tv __ARGS((char_u *string));
    40658 @@ -778,8 +787,8 @@
     38536@@ -778,8 +789,8 @@
    4065938537 static char_u *get_tv_string __ARGS((typval_T *varp));
    4066038538 static char_u *get_tv_string_buf __ARGS((typval_T *varp, char_u *buf));
     
    4066738545 static void vars_clear_ext __ARGS((hashtab_T *ht, int free_val));
    4066838546 static void delete_var __ARGS((hashtab_T *ht, hashitem_T *hi));
    40669 @@ -799,7 +808,7 @@
     38547@@ -799,7 +810,7 @@
    4067038548 static void list_func_head __ARGS((ufunc_T *fp, int indent));
    4067138549 static ufunc_T *find_func __ARGS((char_u *name));
     
    4067638554 static void func_do_profile __ARGS((ufunc_T *fp));
    4067738555 static void prof_sort_list __ARGS((FILE *fd, ufunc_T **sorttab, int st_len, char *title, int prefer_self));
    40678 @@ -828,6 +837,8 @@
     38556@@ -828,6 +839,8 @@
    4067938557 static int searchpair_cmn __ARGS((typval_T *argvars, pos_T *match_pos));
    4068038558 static int search_cmn __ARGS((typval_T *argvars, pos_T *match_pos, int *flagsp));
     
    4068538563 
    4068638564 #ifdef EBCDIC
    40687 @@ -869,6 +880,7 @@
     38565@@ -869,6 +882,7 @@
    4068838566            hash_add(&compat_hashtab, p->vv_di.di_key);
    4068938567     }
     
    4069338571 
    4069438572 #ifdef EBCDIC
    40695 @@ -915,12 +927,13 @@
     38573@@ -915,12 +929,13 @@
    4069638574     /* autoloaded script names */
    4069738575     ga_clear_strings(&ga_loaded);
     
    4071038588 
    4071138589     /* unreferenced lists and dicts */
    40712 @@ -1054,7 +1067,7 @@
     38590@@ -1054,7 +1069,7 @@
    4071338591     ga_init2(&redir_ga, (int)sizeof(char), 500);
    4071438592 
     
    4071938597     if (redir_endp == NULL || redir_lval->ll_name == NULL || *redir_endp != NUL)
    4072038598     {
    40721 @@ -1145,7 +1158,7 @@
     38599@@ -1145,7 +1160,7 @@
    4072238600            /* Call get_lval() again, if it's inside a Dict or List it may
    4072338601             * have changed. */
     
    4072838606                set_var_lval(redir_lval, redir_endp, &tv, FALSE, (char_u *)".");
    4072938607            clear_lval(redir_lval);
    40730 @@ -1848,8 +1861,9 @@
     38608@@ -1848,8 +1863,9 @@
    4073138609        return;
    4073238610     if (argend > arg && argend[-1] == '.')  /* for var.='str' */
     
    4074038618        /*
    4074138619         * ":let" without "=": list variables
    40742 @@ -1878,12 +1892,14 @@
     38620@@ -1878,12 +1894,14 @@
    4074338621     {
    4074438622        op[0] = '=';
     
    4075938637        if (eap->skip)
    4076038638            ++emsg_skip;
    40761 @@ -2234,7 +2250,7 @@
     38639@@ -2234,7 +2252,7 @@
    4076238640            {
    4076338641                if (tofree != NULL)
     
    4076838646                else
    4076938647                {
    40770 @@ -2445,7 +2461,7 @@
     38648@@ -2445,7 +2463,7 @@
    4077138649            p = get_tv_string_chk(tv);
    4077238650            if (p != NULL && op != NULL && *op == '.')
     
    4077738655                {
    4077838656                    p = ptofree = concat_str(s, p);
    40779 @@ -2469,7 +2485,7 @@
     38657@@ -2469,7 +2487,7 @@
    4078038658     {
    4078138659        lval_T  lv;
     
    4078638664        {
    4078738665            if (endchars != NULL && vim_strchr(endchars, *skipwhite(p)) == NULL)
    40788 @@ -2514,18 +2530,22 @@
     38666@@ -2514,18 +2532,22 @@
    4078938667  * "unlet" is TRUE for ":unlet": slightly different behavior when something is
    4079038668  * wrong; must end in space or cmd separator.
     
    4081138689 {
    4081238690     char_u     *p;
    40813 @@ -2539,6 +2559,7 @@
     38691@@ -2539,6 +2561,7 @@
    4081438692     char_u     *key = NULL;
    4081538693     int                len;
     
    4081938697     /* Clear everything in "lp". */
    4082038698     vim_memset(lp, 0, sizeof(lval_T));
    40821 @@ -2586,7 +2607,7 @@
     38699@@ -2586,7 +2609,7 @@
    4082238700 
    4082338701     cc = *p;
     
    4082838706        EMSG2(_(e_undefvar), lp->ll_name);
    4082938707     *p = cc;
    40830 @@ -2899,7 +2920,7 @@
     38708@@ -2899,7 +2922,7 @@
    4083138709 
    4083238710                /* handle +=, -= and .= */
     
    4083738715                    if (tv_op(&tv, rettv, op) == OK)
    4083838716                        set_var(lp->ll_name, &tv, FALSE);
    40839 @@ -3420,7 +3441,7 @@
     38717@@ -3420,7 +3443,7 @@
    4084038718 
    4084138719     /* If it is the name of a variable of type VAR_FUNC use its contents. */
     
    4084638724     /* Skip white space to allow ":call func ()".  Not good, but required for
    4084738725      * backward compatibility. */
    40848 @@ -3551,7 +3572,7 @@
     38726@@ -3551,7 +3574,7 @@
    4084938727     do
    4085038728     {
     
    4085538733        if (lv.ll_name == NULL)
    4085638734            error = TRUE;           /* error but continue parsing */
    40857 @@ -3704,7 +3725,7 @@
     38735@@ -3704,7 +3727,7 @@
    4085838736            ret = FAIL;
    4085938737        else
     
    4086438742                ret = FAIL;
    4086538743            else
    40866 @@ -5103,7 +5124,8 @@
     38744@@ -4410,7 +4433,7 @@
     38745                    if (rettv->v_type != var2.v_type)
     38746                        EMSG(_("E691: Can only compare List with List"));
     38747                    else
     38748-                       EMSG(_("E692: Invalid operation for Lists"));
     38749+                       EMSG(_("E692: Invalid operation for List"));
     38750                    clear_tv(rettv);
     38751                    clear_tv(&var2);
     38752                    return FAIL;
     38753@@ -5103,7 +5126,8 @@
    4086738754                if (evaluate)
    4086838755                {
     
    4087438761                if (**arg != NUL)
    4087538762                    ++*arg;
    40876 @@ -5147,7 +5169,7 @@
     38763@@ -5147,7 +5171,7 @@
    4087738764            {
    4087838765                /* If "s" is the name of a variable of type VAR_FUNC
     
    4088338770                /* Invoke the function. */
    4088438771                ret = get_func_tv(s, len, rettv, arg,
    40885 @@ -5174,7 +5196,7 @@
     38772@@ -5174,7 +5198,7 @@
    4088638773                }
    4088738774            }
     
    4089238779                ret = OK;
    4089338780        }
    40894 @@ -6413,6 +6435,16 @@
     38781@@ -5976,7 +6000,7 @@
     38782     list_T  *l;
     38783     listitem_T *item;
     38784 {
     38785-    list_remove(l, item, item);
     38786+    vimlist_remove(l, item, item);
     38787     listitem_free(item);
     38788 }
     38789 
     38790@@ -6413,6 +6437,16 @@
    4089538791     if (ni == NULL)
    4089638792        return FAIL;
     
    4090938805        /* Append new item at end of list. */
    4091038806        list_append(l, ni);
    40911 @@ -6434,7 +6466,6 @@
     38807@@ -6434,7 +6468,6 @@
    4091238808        item->li_prev = ni;
    4091338809        ++l->lv_len;
     
    4091738813 
    4091838814 /*
    40919 @@ -7860,6 +7891,7 @@
     38815@@ -6546,9 +6579,11 @@
     38816 /*
     38817  * Remove items "item" to "item2" from list "l".
     38818  * Does not free the listitem or the value!
     38819+ * This used to be called list_remove, but that conflicts with a Sun header
     38820+ * file.
     38821  */
     38822     void
     38823-list_remove(l, item, item2)
     38824+vimlist_remove(l, item, item2)
     38825     list_T     *l;
     38826     listitem_T *item;
     38827     listitem_T *item2;
     38828@@ -7767,7 +7802,7 @@
     38829  * Get the value of an environment variable.
     38830  * "arg" is pointing to the '$'.  It is advanced to after the name.
     38831  * If the environment variable was not set, silently assume it is empty.
     38832- * Always return OK.
     38833+ * Return FAIL if the name is invalid.
     38834  */
     38835     static int
     38836 get_env_tv(arg, rettv, evaluate)
     38837@@ -7786,32 +7821,33 @@
     38838     len = get_env_len(arg);
     38839     if (evaluate)
     38840     {
     38841-       if (len != 0)
     38842+       if (len == 0)
     38843+           return FAIL; /* can't be an environment variable */
     38844+
     38845+       cc = name[len];
     38846+       name[len] = NUL;
     38847+       /* first try vim_getenv(), fast for normal environment vars */
     38848+       string = vim_getenv(name, &mustfree);
     38849+       if (string != NULL && *string != NUL)
     38850        {
     38851-           cc = name[len];
     38852-           name[len] = NUL;
     38853-           /* first try vim_getenv(), fast for normal environment vars */
     38854-           string = vim_getenv(name, &mustfree);
     38855-           if (string != NULL && *string != NUL)
     38856-           {
     38857-               if (!mustfree)
     38858-                   string = vim_strsave(string);
     38859-           }
     38860-           else
     38861-           {
     38862-               if (mustfree)
     38863-                   vim_free(string);
     38864+           if (!mustfree)
     38865+               string = vim_strsave(string);
     38866+       }
     38867+       else
     38868+       {
     38869+           if (mustfree)
     38870+               vim_free(string);
     38871 
     38872-               /* next try expanding things like $VIM and ${HOME} */
     38873-               string = expand_env_save(name - 1);
     38874-               if (string != NULL && *string == '$')
     38875-               {
     38876-                   vim_free(string);
     38877-                   string = NULL;
     38878-               }
     38879+           /* next try expanding things like $VIM and ${HOME} */
     38880+           string = expand_env_save(name - 1);
     38881+           if (string != NULL && *string == '$')
     38882+           {
     38883+               vim_free(string);
     38884+               string = NULL;
     38885            }
     38886-           name[len] = cc;
     38887        }
     38888+       name[len] = cc;
     38889+
     38890        rettv->v_type = VAR_STRING;
     38891        rettv->vval.v_string = string;
     38892     }
     38893@@ -7841,6 +7877,7 @@
     38894     {"append",         2, 2, f_append},
     38895     {"argc",           0, 0, f_argc},
     38896     {"argidx",         0, 0, f_argidx},
     38897+    {"arglistid",      0, 2, f_arglistid},
     38898     {"argv",           0, 1, f_argv},
     38899 #ifdef FEAT_FLOAT
     38900     {"asin",           1, 1, f_asin},  /* WJMc */
     38901@@ -7860,6 +7897,7 @@
    4092038902     {"bufwinnr",       1, 1, f_bufwinnr},
    4092138903     {"byte2line",      1, 1, f_byte2line},
     
    4092538907 #ifdef FEAT_FLOAT
    4092638908     {"ceil",           1, 1, f_ceil},
    40927 @@ -7893,6 +7925,7 @@
     38909@@ -7893,6 +7931,7 @@
    4092838910     {"eval",           1, 1, f_eval},
    4092938911     {"eventhandler",   0, 0, f_eventhandler},
     
    4093338915 #ifdef FEAT_FLOAT
    4093438916     {"exp",            1, 1, f_exp},
    40935 @@ -7941,7 +7974,7 @@
     38917@@ -7929,6 +7968,7 @@
     38918     {"getcmdline",     0, 0, f_getcmdline},
     38919     {"getcmdpos",      0, 0, f_getcmdpos},
     38920     {"getcmdtype",     0, 0, f_getcmdtype},
     38921+    {"getcurpos",      0, 0, f_getcurpos},
     38922     {"getcwd",         0, 0, f_getcwd},
     38923     {"getfontname",    0, 1, f_getfontname},
     38924     {"getfperm",       1, 1, f_getfperm},
     38925@@ -7941,7 +7981,7 @@
    4093638926     {"getpid",         0, 0, f_getpid},
    4093738927     {"getpos",         1, 1, f_getpos},
     
    4094238932     {"gettabvar",      2, 3, f_gettabvar},
    4094338933     {"gettabwinvar",   3, 4, f_gettabwinvar},
    40944 @@ -7992,7 +8025,7 @@
     38934@@ -7949,7 +7989,7 @@
     38935     {"getwinposy",     0, 0, f_getwinposy},
     38936     {"getwinvar",      2, 3, f_getwinvar},
     38937     {"glob",           1, 3, f_glob},
     38938-    {"globpath",       2, 3, f_globpath},
     38939+    {"globpath",       2, 4, f_globpath},
     38940     {"has",            1, 1, f_has},
     38941     {"has_key",                2, 2, f_has_key},
     38942     {"haslocaldir",    0, 0, f_haslocaldir},
     38943@@ -7992,7 +8032,7 @@
    4094538944     {"log10",          1, 1, f_log10},
    4094638945 #endif
     
    4095138950     {"map",            2, 2, f_map},
    4095238951     {"maparg",         1, 4, f_maparg},
    40953 @@ -8100,7 +8133,7 @@
     38952@@ -8100,7 +8140,7 @@
    4095438953     {"strridx",                2, 3, f_strridx},
    4095538954     {"strtrans",       1, 1, f_strtrans},
     
    4096038959     {"synID",          3, 3, f_synID},
    4096138960     {"synIDattr",      2, 3, f_synIDattr},
    40962 @@ -8108,6 +8141,7 @@
     38961@@ -8108,6 +8148,7 @@
    4096338962     {"synconcealed",   2, 2, f_synconcealed},
    4096438963     {"synstack",       2, 2, f_synstack},
     
    4096838967     {"tabpagenr",      0, 1, f_tabpagenr},
    4096938968     {"tabpagewinnr",   1, 2, f_tabpagewinnr},
    40970 @@ -8128,6 +8162,7 @@
     38969@@ -8128,6 +8169,7 @@
    4097138970     {"type",           1, 1, f_type},
    4097238971     {"undofile",       1, 1, f_undofile},
     
    4097638975     {"virtcol",                1, 1, f_virtcol},
    4097738976     {"visualmode",     0, 1, f_visualmode},
    40978 @@ -8269,16 +8304,17 @@
     38977@@ -8269,16 +8311,17 @@
    4097938978  * name it contains, otherwise return "name".
    4098038979  */
     
    4099638995     if (v != NULL && v->di_tv.v_type == VAR_FUNC)
    4099738996     {
    40998 @@ -8449,33 +8485,39 @@
     38997@@ -8449,33 +8492,39 @@
    4099938998     /* execute the function if no errors detected and executing */
    4100038999     if (evaluate && error == ERROR_NONE)
     
    4104239041 
    4104339042            if (fp != NULL)
    41044 @@ -9176,13 +9218,11 @@
     39043@@ -8814,6 +8863,41 @@
     39044 }
     39045 
     39046 /*
     39047+ * "arglistid()" function
     39048+ */
     39049+    static void
     39050+f_arglistid(argvars, rettv)
     39051+    typval_T   *argvars UNUSED;
     39052+    typval_T   *rettv;
     39053+{
     39054+    win_T      *wp;
     39055+    tabpage_T  *tp = NULL;
     39056+    long       n;
     39057+
     39058+    rettv->vval.v_number = -1;
     39059+    if (argvars[0].v_type != VAR_UNKNOWN)
     39060+    {
     39061+       if (argvars[1].v_type != VAR_UNKNOWN)
     39062+       {
     39063+           n = get_tv_number(&argvars[1]);
     39064+           if (n >= 0)
     39065+               tp = find_tabpage(n);
     39066+       }
     39067+       else
     39068+           tp = curtab;
     39069+
     39070+       if (tp != NULL)
     39071+       {
     39072+           wp = find_win_by_nr(&argvars[0], tp);
     39073+           if (wp != NULL)
     39074+               rettv->vval.v_number = wp->w_alist->id;
     39075+       }
     39076+    }
     39077+    else
     39078+       rettv->vval.v_number = curwin->w_alist->id;
     39079+}
     39080+
     39081+/*
     39082  * "argv(nr)" function
     39083  */
     39084     static void
     39085@@ -9176,13 +9260,11 @@
    4104539086 #endif
    4104639087 }
     
    4105839099 #ifdef FEAT_MBYTE
    4105939100     char_u     *t;
    41060 @@ -9202,7 +9242,10 @@
     39101@@ -9202,7 +9284,10 @@
    4106139102     {
    4106239103        if (*t == NUL)          /* EOL reached */
     
    4107039111     rettv->vval.v_number = (varnumber_T)(t - str);
    4107139112 #else
    41072 @@ -9211,6 +9254,28 @@
     39113@@ -9211,6 +9296,28 @@
    4107339114 #endif
    4107439115 }
     
    4109939140 func_call(name, args, selfdict, rettv)
    4110039141     char_u     *name;
    41101 @@ -9994,7 +10059,22 @@
     39142@@ -9731,14 +9838,17 @@
     39143     if (argvars[1].v_type == VAR_UNKNOWN)
     39144     {
     39145        pos_T       pos;
     39146+       colnr_T     curswant = -1;
     39147 
     39148-       if (list2fpos(argvars, &pos, NULL) == FAIL)
     39149+       if (list2fpos(argvars, &pos, NULL, &curswant) == FAIL)
     39150            return;
     39151        line = pos.lnum;
     39152        col = pos.col;
     39153 #ifdef FEAT_VIRTUALEDIT
     39154        coladd = pos.coladd;
     39155 #endif
     39156+       if (curswant >= 0)
     39157+           curwin->w_curswant = curswant - 1;
     39158     }
     39159     else
     39160     {
     39161@@ -9994,7 +10104,22 @@
    4110239162     typval_T   *argvars;
    4110339163     typval_T   *rettv;
     
    4112339183 
    4112439184 /*
    41125 @@ -10010,8 +10090,6 @@
     39185@@ -10010,8 +10135,6 @@
    4112639186     int                n = FALSE;
    4112739187     int                len = 0;
     
    4113239192     if (*p == '$')                     /* environment variable */
    4113339193     {
    41134 @@ -10062,7 +10140,7 @@
     39194@@ -10062,7 +10185,7 @@
    4113539195        {
    4113639196            if (tofree != NULL)
     
    4114139201            {
    4114239202                /* handle d.key, l[idx], f(expr) */
    41143 @@ -10078,8 +10156,6 @@
     39203@@ -10078,8 +10201,6 @@
    4114439204     }
    4114539205 
     
    4115039210 
    4115139211 #ifdef FEAT_FLOAT
    41152 @@ -11090,6 +11166,8 @@
     39212@@ -11090,6 +11211,8 @@
    4115339213 {
    4115439214     char_u     *p;
     
    4115939219        return;
    4116039220 
    41161 @@ -11102,8 +11180,6 @@
     39221@@ -11102,8 +11225,6 @@
    4116239222            p = ml_get_buf(buf, start, FALSE);
    4116339223        else
     
    4116839228     }
    4116939229     else
    41170 @@ -11734,6 +11810,7 @@
     39230@@ -11234,13 +11355,14 @@
     39231            n = safe_vgetc();
     39232        else if (get_tv_number_chk(&argvars[0], &error) == 1)
     39233            /* getchar(1): only check if char avail */
     39234-           n = vpeekc();
     39235-       else if (error || vpeekc() == NUL)
     39236+           n = vpeekc_any();
     39237+       else if (error || vpeekc_any() == NUL)
     39238            /* illegal argument or getchar(0) and no char avail: return zero */
     39239            n = 0;
     39240        else
     39241            /* getchar(0) and char avail: return char */
     39242            n = safe_vgetc();
     39243+
     39244        if (n == K_IGNORE)
     39245            continue;
     39246        break;
     39247@@ -11660,6 +11782,19 @@
     39248     rettv->vval.v_number = mch_get_pid();
     39249 }
     39250 
     39251+static void getpos_both __ARGS((typval_T *argvars, typval_T *rettv, int getcurpos));
     39252+
     39253+/*
     39254+ * "getcurpos()" function
     39255+ */
     39256+    static void
     39257+f_getcurpos(argvars, rettv)
     39258+    typval_T   *argvars;
     39259+    typval_T   *rettv;
     39260+{
     39261+    getpos_both(argvars, rettv, TRUE);
     39262+}
     39263+
     39264 /*
     39265  * "getpos(string)" function
     39266  */
     39267@@ -11668,6 +11803,15 @@
     39268     typval_T   *argvars;
     39269     typval_T   *rettv;
     39270 {
     39271+    getpos_both(argvars, rettv, FALSE);
     39272+}
     39273+
     39274+    static void
     39275+getpos_both(argvars, rettv, getcurpos)
     39276+    typval_T   *argvars;
     39277+    typval_T   *rettv;
     39278+    int                getcurpos;
     39279+{
     39280     pos_T      *fp;
     39281     list_T     *l;
     39282     int                fnum = -1;
     39283@@ -11675,7 +11819,10 @@
     39284     if (rettv_list_alloc(rettv) == OK)
     39285     {
     39286        l = rettv->vval.v_list;
     39287-       fp = var2fpos(&argvars[0], TRUE, &fnum);
     39288+       if (getcurpos)
     39289+           fp = &curwin->w_cursor;
     39290+       else
     39291+           fp = var2fpos(&argvars[0], TRUE, &fnum);
     39292        if (fnum != -1)
     39293            list_append_number(l, (varnumber_T)fnum);
     39294        else
     39295@@ -11690,6 +11837,8 @@
     39296                                (fp != NULL) ? (varnumber_T)fp->coladd :
     39297 #endif
     39298                                                              (varnumber_T)0);
     39299+       if (getcurpos)
     39300+           list_append_number(l, (varnumber_T)curwin->w_curswant + 1);
     39301     }
     39302     else
     39303        rettv->vval.v_number = FALSE;
     39304@@ -11734,6 +11883,7 @@
    4117139305     char_u     *strregname;
    4117239306     int                regname;
     
    4117639310 
    4117739311     if (argvars[0].v_type != VAR_UNKNOWN)
    41178 @@ -11741,17 +11818,34 @@
     39312@@ -11741,17 +11891,34 @@
    4117939313        strregname = get_tv_string_chk(&argvars[0]);
    4118039314        error = strregname == NULL;
     
    4121439348 
    4121539349 /*
    41216 @@ -11791,12 +11885,10 @@
     39350@@ -11791,12 +11958,10 @@
    4121739351     {
    4121839352        case MLINE: buf[0] = 'V'; break;
     
    4122739361     rettv->v_type = VAR_STRING;
    4122839362     rettv->vval.v_string = vim_strsave(buf);
    41229 @@ -12135,6 +12227,9 @@
     39363@@ -12056,18 +12221,37 @@
     39364     char_u     buf1[NUMBUFLEN];
     39365     char_u     *file = get_tv_string_buf_chk(&argvars[1], buf1);
     39366     int                error = FALSE;
     39367+    garray_T   ga;
     39368+    int                i;
     39369 
     39370     /* When the optional second argument is non-zero, don't remove matches
     39371     * for 'wildignore' and don't put matches for 'suffixes' at the end. */
     39372-    if (argvars[2].v_type != VAR_UNKNOWN
     39373-                               && get_tv_number_chk(&argvars[2], &error))
     39374-       flags |= WILD_KEEP_ALL;
     39375     rettv->v_type = VAR_STRING;
     39376-    if (file == NULL || error)
     39377-       rettv->vval.v_string = NULL;
     39378+    if (argvars[2].v_type != VAR_UNKNOWN)
     39379+    {
     39380+       if (get_tv_number_chk(&argvars[2], &error))
     39381+           flags |= WILD_KEEP_ALL;
     39382+       if (argvars[3].v_type != VAR_UNKNOWN
     39383+                                   && get_tv_number_chk(&argvars[3], &error))
     39384+       {
     39385+           rettv->v_type = VAR_LIST;
     39386+           rettv->vval.v_list = NULL;
     39387+       }
     39388+    }
     39389+    if (file != NULL && !error)
     39390+    {
     39391+       ga_init2(&ga, (int)sizeof(char_u *), 10);
     39392+       globpath(get_tv_string(&argvars[0]), file, &ga, flags);
     39393+       if (rettv->v_type == VAR_STRING)
     39394+           rettv->vval.v_string = ga_concat_strings(&ga, "\n");
     39395+       else if (rettv_list_alloc(rettv) != FAIL)
     39396+           for (i = 0; i < ga.ga_len; ++i)
     39397+               list_append_string(rettv->vval.v_list,
     39398+                                           ((char_u **)(ga.ga_data))[i], -1);
     39399+       ga_clear_strings(&ga);
     39400+    }
     39401     else
     39402-       rettv->vval.v_string = globpath(get_tv_string(&argvars[0]), file,
     39403-                                                                      flags);
     39404+       rettv->vval.v_string = NULL;
     39405 }
     39406 
     39407 /*
     39408@@ -12135,6 +12319,9 @@
    4123039409 #ifndef CASE_INSENSITIVE_FILENAME
    4123139410        "fname_case",
     
    4123739416        "arabic",
    4123839417 #endif
    41239 @@ -12507,9 +12602,7 @@
     39418@@ -12507,9 +12694,7 @@
    4124039419 #ifdef FEAT_VIRTUALEDIT
    4124139420        "virtualedit",
     
    4124739426        "visualextra",
    4124839427 #endif
    41249 @@ -12538,7 +12631,12 @@
     39428@@ -12538,7 +12723,12 @@
    4125039429        "xfontset",
    4125139430 #endif
     
    4126139440 #ifdef USE_XSMP
    4126239441        "xsmp",
    41263 @@ -12569,7 +12667,26 @@
     39442@@ -12569,7 +12759,26 @@
    4126439443     if (n == FALSE)
    4126539444     {
     
    4128939468            n = (starting != 0);
    4129039469 #ifdef FEAT_MBYTE
    41291 @@ -13045,9 +13162,18 @@
     39470@@ -13045,9 +13254,18 @@
    4129239471        }
    4129339472 
     
    4130839487                && argvars[1].v_type != VAR_UNKNOWN
    4130939488                && argvars[2].v_type != VAR_UNKNOWN)
    41310 @@ -13298,8 +13424,8 @@
     39489@@ -13298,8 +13516,8 @@
    4131139490     dictitem_T *di;
    4131239491 
     
    4131939498     {
    4132039499        if (*end != NUL)
    41321 @@ -13312,7 +13438,7 @@
     39500@@ -13312,7 +13530,7 @@
    4132239501                    rettv->vval.v_number = 1;       /* always locked */
    4132339502                else
     
    4132839507                    {
    4132939508                        /* Consider a variable locked when:
    41330 @@ -13846,6 +13972,7 @@
     39509@@ -13846,6 +14064,7 @@
    4133139510     int                type;
    4133239511 {
     
    4133639515     char_u     *pat;
    4133739516     regmatch_T regmatch;
    41338 @@ -13885,7 +14012,10 @@
     39517@@ -13885,7 +14104,10 @@
    4133939518        li = l->lv_first;
    4134039519     }
     
    4134739526     pat = get_tv_string_buf_chk(&argvars[1], patbuf);
    4134839527     if (pat == NULL)
    41349 @@ -13909,7 +14039,7 @@
     39528@@ -13909,7 +14131,7 @@
    4135039529        {
    4135139530            if (start < 0)
     
    4135639535            /* When "count" argument is there ignore matches before "start",
    4135739536             * otherwise skip part of the string.  Differs when pattern is "^"
    41358 @@ -13917,7 +14047,10 @@
     39537@@ -13917,7 +14139,10 @@
    4135939538            if (argvars[3].v_type != VAR_UNKNOWN)
    4136039539                startcol = start;
     
    4136739546 
    4136839547        if (argvars[3].v_type != VAR_UNKNOWN)
    41369 @@ -13967,6 +14100,12 @@
     39548@@ -13967,6 +14192,12 @@
    4137039549 #else
    4137139550                startcol = (colnr_T)(regmatch.startp[0] + 1 - str);
     
    4138039559        }
    4138139560 
    41382 @@ -14095,8 +14234,8 @@
     39561@@ -14095,8 +14326,8 @@
    4138339562            }
    4138439563            else
     
    4139139570        }
    4139239571 #endif
    41393 @@ -14292,14 +14431,23 @@
     39572@@ -14292,14 +14523,23 @@
    4139439573        return;
    4139539574 
     
    4142139600 #endif
    4142239601 
    41423 @@ -14316,7 +14464,6 @@
     39602@@ -14316,7 +14556,6 @@
    4142439603     buf[1] = NUL;
    4142539604     buf[2] = NUL;
     
    4142939608     {
    4143039609        if (VIsual_select)
    41431 @@ -14324,9 +14471,7 @@
     39610@@ -14324,9 +14563,7 @@
    4143239611        else
    4143339612            buf[0] = VIsual_mode;
     
    4144039619     {
    4144139620        buf[0] = 'r';
    41442 @@ -16655,8 +16800,6 @@
     39621@@ -15289,7 +15526,7 @@
     39622            if (argvars[2].v_type == VAR_UNKNOWN)
     39623            {
     39624                /* Remove one item, return its value. */
     39625-               list_remove(l, item, item);
     39626+               vimlist_remove(l, item, item);
     39627                *rettv = item->li_tv;
     39628                vim_free(item);
     39629            }
     39630@@ -15315,7 +15552,7 @@
     39631                        EMSG(_(e_invrange));
     39632                    else
     39633                    {
     39634-                       list_remove(l, item, item2);
     39635+                       vimlist_remove(l, item, item2);
     39636                        if (rettv_list_alloc(rettv) == OK)
     39637                        {
     39638                            l = rettv->vval.v_list;
     39639@@ -16583,12 +16820,13 @@
     39640     pos_T      pos;
     39641     int                fnum;
     39642     char_u     *name;
     39643+    colnr_T    curswant = -1;
     39644 
     39645     rettv->vval.v_number = -1;
     39646     name = get_tv_string_chk(argvars);
     39647     if (name != NULL)
     39648     {
     39649-       if (list2fpos(&argvars[1], &pos, &fnum) == OK)
     39650+       if (list2fpos(&argvars[1], &pos, &fnum, &curswant) == OK)
     39651        {
     39652            if (--pos.col < 0)
     39653                pos.col = 0;
     39654@@ -16598,6 +16836,8 @@
     39655                if (fnum == curbuf->b_fnum)
     39656                {
     39657                    curwin->w_cursor = pos;
     39658+                   if (curswant >= 0)
     39659+                       curwin->w_curswant = curswant - 1;
     39660                    check_cursor();
     39661                    rettv->vval.v_number = 0;
     39662                }
     39663@@ -16655,8 +16895,6 @@
    4144339664     regname = *strregname;
    4144439665     if (regname == 0 || regname == '@')
     
    4144939670     if (argvars[2].v_type != VAR_UNKNOWN)
    4145039671     {
    41451 @@ -16675,7 +16818,6 @@
     39672@@ -16675,7 +16913,6 @@
    4145239673                case 'V': case 'l':     /* line-wise selection */
    4145339674                    yank_type = MLINE;
     
    4145739678                    yank_type = MBLOCK;
    4145839679                    if (VIM_ISDIGIT(stropt[1]))
    41459 @@ -16685,14 +16827,62 @@
     39680@@ -16685,14 +16922,62 @@
    4146039681                        --stropt;
    4146139682                    }
     
    4152339744 }
    4152439745 
    41525 @@ -16869,7 +17059,7 @@
     39746@@ -16869,7 +17154,7 @@
    4152639747     typval_T   *rettv;
    4152739748 {
     
    4153239753 }
    4153339754 
    41534 @@ -16881,7 +17071,7 @@
     39755@@ -16881,7 +17166,7 @@
    4153539756     typval_T   *argvars UNUSED;
    4153639757     typval_T   *rettv;
     
    4154139762 
    4154239763 /*
    41543 @@ -16951,10 +17141,11 @@
     39764@@ -16951,10 +17236,11 @@
    4154439765 static char_u  *item_compare_func;
    4154539766 static dict_T  *item_compare_selfdict;
     
    4155439775     static int
    4155539776 #ifdef __BORLANDC__
    41556 @@ -17028,9 +17219,10 @@
     39777@@ -17028,9 +17314,10 @@
    4155739778  * "sort({list})" function
    4155839779  */
     
    4156639787     list_T     *l;
    4156739788     listitem_T *li;
    41568 @@ -17039,12 +17231,12 @@
     39789@@ -17039,12 +17326,12 @@
    4156939790     long       i;
    4157039791 
     
    4158139802        rettv->vval.v_list = l;
    4158239803        rettv->v_type = VAR_LIST;
    41583 @@ -17091,29 +17283,72 @@
     39804@@ -17091,29 +17378,72 @@
    4158439805        ptrs = (listitem_T **)alloc((int)(len * sizeof(listitem_T *)));
    4158539806        if (ptrs == NULL)
     
    4167039891        }
    4167139892 
    41672 @@ -17122,6 +17357,28 @@
     39893@@ -17122,6 +17452,28 @@
    4167339894 }
    4167439895 
     
    4169939920  */
    4170039921     static void
    41701 @@ -17709,9 +17966,29 @@
     39922@@ -17709,9 +18061,29 @@
    4170239923     typval_T   *argvars;
    4170339924     typval_T   *rettv;
     
    4173239953 
    4173339954 /*
    41734 @@ -17979,13 +18256,11 @@
     39955@@ -17979,13 +18351,11 @@
    4173539956 #endif
    4173639957 }
     
    4174839969     char_u     *res = NULL;
    4174939970     char_u     *p;
    41750 @@ -17993,9 +18268,12 @@
     39971@@ -17993,9 +18363,12 @@
    4175139972     char_u     buf[NUMBUFLEN];
    4175239973     int                err = FALSE;
     
    4176239983     if (argvars[1].v_type != VAR_UNKNOWN)
    4176339984     {
    41764 @@ -18006,74 +18284,159 @@
     39985@@ -18006,74 +18379,159 @@
    4176539986        if ((infile = vim_tempname('i')) == NULL)
    4176639987        {
     
    4182940050+       if (res == NULL)
    4183040051+           goto errret;
    41831  
    41832 -       for (s = res; *s; ++s)
     40052+
    4183340053+       list = list_alloc();
    4183440054+       if (list == NULL)
    4183540055+           goto errret;
    41836 +
     40056 
     40057-       for (s = res; *s; ++s)
    4183740058+       for (i = 0; i < len; ++i)
    4183840059        {
     
    4195640177 
    4195740178 /*
    41958 @@ -18688,7 +19051,6 @@
     40179@@ -18688,7 +19146,6 @@
    4195940180     typval_T   *argvars UNUSED;
    4196040181     typval_T   *rettv UNUSED;
     
    4196440185 
    4196540186     rettv->v_type = VAR_STRING;
    41966 @@ -18699,7 +19061,6 @@
     40187@@ -18699,7 +19156,6 @@
    4196740188     /* A non-zero number or non-empty string argument: reset mode. */
    4196840189     if (non_zero_arg(&argvars[0]))
     
    4197240193 
    4197340194 /*
    41974 @@ -18923,6 +19284,49 @@
     40195@@ -18839,20 +19295,30 @@
     40196        EMSG(_(e_invarg));
     40197     else
     40198     {
     40199-       curwin->w_cursor.lnum = get_dict_number(dict, (char_u *)"lnum");
     40200-       curwin->w_cursor.col = get_dict_number(dict, (char_u *)"col");
     40201+       if (dict_find(dict, (char_u *)"lnum", -1) != NULL)
     40202+           curwin->w_cursor.lnum = get_dict_number(dict, (char_u *)"lnum");
     40203+       if (dict_find(dict, (char_u *)"col", -1) != NULL)
     40204+           curwin->w_cursor.col = get_dict_number(dict, (char_u *)"col");
     40205 #ifdef FEAT_VIRTUALEDIT
     40206-       curwin->w_cursor.coladd = get_dict_number(dict, (char_u *)"coladd");
     40207+       if (dict_find(dict, (char_u *)"coladd", -1) != NULL)
     40208+           curwin->w_cursor.coladd = get_dict_number(dict, (char_u *)"coladd");
     40209 #endif
     40210-       curwin->w_curswant = get_dict_number(dict, (char_u *)"curswant");
     40211-       curwin->w_set_curswant = FALSE;
     40212+       if (dict_find(dict, (char_u *)"curswant", -1) != NULL)
     40213+       {
     40214+           curwin->w_curswant = get_dict_number(dict, (char_u *)"curswant");
     40215+           curwin->w_set_curswant = FALSE;
     40216+       }
     40217 
     40218-       set_topline(curwin, get_dict_number(dict, (char_u *)"topline"));
     40219+       if (dict_find(dict, (char_u *)"topline", -1) != NULL)
     40220+           set_topline(curwin, get_dict_number(dict, (char_u *)"topline"));
     40221 #ifdef FEAT_DIFF
     40222-       curwin->w_topfill = get_dict_number(dict, (char_u *)"topfill");
     40223+       if (dict_find(dict, (char_u *)"topfill", -1) != NULL)
     40224+           curwin->w_topfill = get_dict_number(dict, (char_u *)"topfill");
     40225 #endif
     40226-       curwin->w_leftcol = get_dict_number(dict, (char_u *)"leftcol");
     40227-       curwin->w_skipcol = get_dict_number(dict, (char_u *)"skipcol");
     40228+       if (dict_find(dict, (char_u *)"leftcol", -1) != NULL)
     40229+           curwin->w_leftcol = get_dict_number(dict, (char_u *)"leftcol");
     40230+       if (dict_find(dict, (char_u *)"skipcol", -1) != NULL)
     40231+           curwin->w_skipcol = get_dict_number(dict, (char_u *)"skipcol");
     40232 
     40233        check_cursor();
     40234        win_new_height(curwin, curwin->w_height);
     40235@@ -18923,6 +19389,49 @@
    4197540236 }
    4197640237 
     
    4202240283  */
    4202340284     static void
    42024 @@ -18933,10 +19337,7 @@
     40285@@ -18933,10 +19442,7 @@
    4202540286     int                binary = FALSE;
    4202640287     char_u     *fname;
     
    4203340294     if (check_restricted() || check_secure())
    4203440295        return;
    42035 @@ -18963,33 +19364,8 @@
     40296@@ -18963,33 +19469,8 @@
    4203640297     }
    4203740298     else
     
    4206940330     }
    4207040331 
    42071 @@ -19073,14 +19449,12 @@
     40332@@ -19073,14 +19554,12 @@
    4207240333        return NULL;
    4207340334     if (name[0] == '.')                                /* cursor */
     
    4208440345     {
    4208540346        pp = getmark_buf_fnum(curbuf, name[1], FALSE, fnum);
    42086 @@ -19719,11 +20093,12 @@
     40347@@ -19135,21 +19614,22 @@
     40348  * validity.
     40349  */
     40350     static int
     40351-list2fpos(arg, posp, fnump)
     40352+list2fpos(arg, posp, fnump, curswantp)
     40353     typval_T   *arg;
     40354     pos_T      *posp;
     40355     int                *fnump;
     40356+    colnr_T    *curswantp;
     40357 {
     40358     list_T     *l = arg->vval.v_list;
     40359     long       i = 0;
     40360     long       n;
     40361 
     40362-    /* List must be: [fnum, lnum, col, coladd], where "fnum" is only there
     40363-     * when "fnump" isn't NULL and "coladd" is optional. */
     40364+    /* List must be: [fnum, lnum, col, coladd, curswant], where "fnum" is only
     40365+     * there when "fnump" isn't NULL; "coladd" and "curswant" are optional. */
     40366     if (arg->v_type != VAR_LIST
     40367            || l == NULL
     40368            || l->lv_len < (fnump == NULL ? 2 : 3)
     40369-           || l->lv_len > (fnump == NULL ? 3 : 4))
     40370+           || l->lv_len > (fnump == NULL ? 4 : 5))
     40371        return FAIL;
     40372 
     40373     if (fnump != NULL)
     40374@@ -19173,13 +19653,16 @@
     40375     posp->col = n;
     40376 
     40377 #ifdef FEAT_VIRTUALEDIT
     40378-    n = list_find_nr(l, i, NULL);
     40379+    n = list_find_nr(l, i, NULL);      /* off */
     40380     if (n < 0)
     40381        posp->coladd = 0;
     40382     else
     40383        posp->coladd = n;
     40384 #endif
     40385 
     40386+    if (curswantp != NULL)
     40387+       *curswantp = list_find_nr(l, i + 1, NULL);  /* curswant */
     40388+
     40389     return OK;
     40390 }
     40391 
     40392@@ -19719,11 +20202,12 @@
    4208740393  * Return OK or FAIL.
    4208840394  */
     
    4209840404     int                ret = OK;
    4209940405     typval_T   *tv = NULL;
    42100 @@ -19750,7 +20125,7 @@
     40406@@ -19750,7 +20234,7 @@
    4210140407      */
    4210240408     else
     
    4210740413            tv = &v->di_tv;
    4210840414     }
    42109 @@ -19790,24 +20165,30 @@
     40415@@ -19790,24 +20274,30 @@
    4211040416     while (ret == OK
    4211140417            && (**arg == '['
     
    4214440450            /* Stop the expression evaluation when immediately aborting on
    4214540451             * error, or when an interrupt occurred or an exception was thrown
    42146 @@ -20094,6 +20475,9 @@
     40452@@ -20094,6 +20584,9 @@
    4214740453     return res != NULL ? res : (char_u *)"";
    4214840454 }
     
    4215440460 get_tv_string_chk(varp)
    4215540461     typval_T   *varp;
    42156 @@ -20146,9 +20530,10 @@
     40462@@ -20146,9 +20639,10 @@
    4215740463  * hashtab_T used.
    4215840464  */
     
    4216640472     char_u     *varname;
    4216740473     hashtab_T  *ht;
    42168 @@ -20158,7 +20543,7 @@
     40474@@ -20158,7 +20652,7 @@
    4216940475        *htp = ht;
    4217040476     if (ht == NULL)
     
    4217540481 
    4217640482 /*
    42177 @@ -20166,11 +20551,11 @@
     40483@@ -20166,11 +20660,11 @@
    4217840484  * Returns NULL if not found.
    4217940485  */
     
    4218940495     hashitem_T *hi;
    4219040496 
    42191 @@ -20202,7 +20587,7 @@
     40497@@ -20202,7 +20696,7 @@
    4219240498         * worked find the variable again.  Don't auto-load a script if it was
    4219340499         * loaded already, otherwise it would be loaded every time when
     
    4219840504            /* Note: script_autoload() may make "hi" invalid. It must either
    4219940505             * be obtained again or not used. */
    42200 @@ -20282,7 +20667,7 @@
     40506@@ -20282,7 +20776,7 @@
    4220140507 {
    4220240508     dictitem_T *v;
     
    4220740513        return NULL;
    4220840514     return get_tv_string(&v->di_tv);
    42209 @@ -20560,6 +20945,13 @@
     40515@@ -20560,6 +21054,13 @@
    4221040516                v->di_tv.vval.v_number = get_tv_number(tv);
    4221140517                if (STRCMP(varname, "searchforward") == 0)
     
    4222140527            return;
    4222240528        }
    42223 @@ -21206,6 +21598,8 @@
     40529@@ -20650,7 +21151,8 @@
     40530     char_u *name;    /* points to start of variable name */
     40531     int    new_var;  /* TRUE when creating the variable */
     40532 {
     40533-    if (!(vim_strchr((char_u *)"wbs", name[0]) != NULL && name[1] == ':')
     40534+    /* Allow for w: b: s: and t:. */
     40535+    if (!(vim_strchr((char_u *)"wbst", name[0]) != NULL && name[1] == ':')
     40536            && !ASCII_ISUPPER((name[0] != NUL && name[1] == ':')
     40537                                                     ? name[2] : name[0]))
     40538     {
     40539@@ -21206,6 +21708,8 @@
    4222440540      * dict.func    existing dict entry that's not a Funcref
    4222540541      *             "name" == NULL, "fudi.fd_dict" set,
     
    4223040546     p = eap->arg;
    4223140547     name = trans_function_name(&p, eap->skip, 0, &fudi);
    42232 @@ -21361,6 +21755,7 @@
     40548@@ -21361,6 +21865,7 @@
    4223340549                if (STRCMP(((char_u **)(newargs.ga_data))[i], arg) == 0)
    4223440550                {
     
    4223840554                }
    4223940555 
    42240 @@ -21604,7 +21999,7 @@
     40556@@ -21604,7 +22109,7 @@
    4224140557      */
    4224240558     if (fudi.fd_dict == NULL)
     
    4224740563        {
    4224840564            emsg_funcname(N_("E707: Function name conflicts with variable: %s"),
    42249 @@ -21762,8 +22157,9 @@
     40565@@ -21762,8 +22267,9 @@
    4225040566  * Also handles a Funcref in a List or Dictionary.
    4225140567  * Returns the function name in allocated memory, or NULL for failure.
     
    4225940575  */
    4226040576     static char_u *
    42261 @@ -21801,7 +22197,8 @@
     40577@@ -21801,7 +22307,8 @@
    4226240578     if (lead > 2)
    4226340579        start += lead;
     
    4226940585     if (end == start)
    4227040586     {
    42271 @@ -21863,14 +22260,14 @@
     40587@@ -21863,14 +22370,14 @@
    4227240588     if (lv.ll_exp_name != NULL)
    4227340589     {
     
    4228640602            name = NULL;
    4228740603     }
    42288 @@ -21896,7 +22293,8 @@
     40604@@ -21878,6 +22385,14 @@
     40605     {
     40606        name = vim_strsave(name);
     40607        *pp = end;
     40608+       if (STRNCMP(name, "<SNR>", 5) == 0)
     40609+       {
     40610+           /* Change "<SNR>" to the byte sequence. */
     40611+           name[0] = K_SPECIAL;
     40612+           name[1] = KS_EXTRA;
     40613+           name[2] = (int)KE_SNR;
     40614+           mch_memmove(name + 3, name + 5, STRLEN(name + 5) + 1);
     40615+       }
     40616        goto theend;
     40617     }
     40618 
     40619@@ -21896,7 +22411,8 @@
    4228940620     }
    4229040621     else
     
    4229640627        len = (int)(end - lv.ll_name);
    4229740628     }
    42298 @@ -21924,11 +22322,23 @@
     40629@@ -21924,11 +22440,23 @@
    4229940630            lead += (int)STRLEN(sid_buf);
    4230040631        }
     
    4232240653     if (name != NULL)
    4232340654     {
    42324 @@ -21941,7 +22351,7 @@
     40655@@ -21941,7 +22469,7 @@
    4232540656                STRCPY(name + 3, sid_buf);
    4232640657        }
     
    4233140662     *pp = end;
    4233240663 
    42333 @@ -22062,7 +22472,7 @@
     40664@@ -22062,7 +22590,7 @@
    4233440665 translated_function_exists(name)
    4233540666     char_u     *name;
     
    4234040671     return find_func(name) != NULL;
    4234140672 }
    42342 @@ -22078,7 +22488,8 @@
     40673@@ -22078,7 +22606,8 @@
    4234340674     char_u  *p;
    4234440675     int            n = FALSE;
     
    4235040681 
    4235140682     /* Only accept "funcname", "funcname ", "funcname (..." and
    42352 @@ -22109,14 +22520,20 @@
     40683@@ -22109,14 +22638,20 @@
    4235340684 
    4235440685 /*
     
    4237540706 
    4237640707 #if defined(FEAT_PROFILE) || defined(PROTO)
    42377 @@ -22325,10 +22742,6 @@
     40708@@ -22325,10 +22860,6 @@
    4237840709     int                ret = FALSE;
    4237940710     int                i;
     
    4238640717     p = vim_strchr(name, AUTOLOAD_CHAR);
    4238740718     if (p == NULL || p == name)
    42388 @@ -24260,6 +24673,17 @@
     40719@@ -24260,6 +24791,17 @@
    4238940720        }
    4239040721     }
     
    4240440735 }
    4240540736 
    42406 @@ -24283,6 +24707,7 @@
     40737@@ -24283,6 +24825,7 @@
    4240740738     garray_T   ga;
    4240840739     char_u     *ret;
     
    4241240743     /* Make 'cpoptions' empty, so that the 'l' flag doesn't work here */
    4241340744     save_cpo = p_cpo;
    42414 @@ -24299,6 +24724,19 @@
     40745@@ -24299,6 +24842,19 @@
    4241540746        tail = str;
    4241640747        while (vim_regexec_nl(&regmatch, str, (colnr_T)(tail - str)))
     
    4243240763             * Get some space for a temporary buffer to do the substitution
    4243340764             * into.  It will contain:
    42434 @@ -24321,20 +24759,9 @@
     40765@@ -24321,20 +24877,9 @@
    4243540766            (void)vim_regsub(&regmatch, sub, (char_u *)ga.ga_data
    4243640767                                          + ga.ga_len + i, TRUE, TRUE, FALSE);
     
    4245840789diff -Naur vim74.orig/src/ex_cmds.c vim74/src/ex_cmds.c
    4245940790--- vim74.orig/src/ex_cmds.c    2013-08-07 13:15:51.000000000 +0000
    42460 +++ vim74/src/ex_cmds.c 2014-04-27 05:20:58.141769246 +0000
     40791+++ vim74/src/ex_cmds.c 2014-06-01 00:43:14.247480031 +0000
    4246140792@@ -1012,7 +1012,18 @@
    4246240793 
     
    4247940810        bangredo = FALSE;
    4248040811     }
    42481 @@ -3253,21 +3264,21 @@
     40812@@ -1541,7 +1552,18 @@
     40813     char_u     *buf;
     40814     long_u     len;
     40815 
     40816-    len = (long_u)STRLEN(cmd) + 3;                     /* "()" + NUL */
     40817+#if (defined(UNIX) && !defined(ARCHIE)) || defined(OS2)
     40818+    int                is_fish_shell;
     40819+    char_u     *shell_name = get_isolated_shell_name();
     40820+
     40821+    /* Account for fish's different syntax for subshells */
     40822+    is_fish_shell = (fnamecmp(shell_name, "fish") == 0);
     40823+    vim_free(shell_name);
     40824+    if (is_fish_shell)
     40825+       len = (long_u)STRLEN(cmd) + 13;         /* "begin; " + "; end" + NUL */
     40826+    else
     40827+#endif
     40828+       len = (long_u)STRLEN(cmd) + 3;                  /* "()" + NUL */
     40829     if (itmp != NULL)
     40830        len += (long_u)STRLEN(itmp) + 9;                /* " { < " + " } " */
     40831     if (otmp != NULL)
     40832@@ -1556,7 +1578,12 @@
     40833      * redirecting input and/or output.
     40834      */
     40835     if (itmp != NULL || otmp != NULL)
     40836-       vim_snprintf((char *)buf, len, "(%s)", (char *)cmd);
     40837+    {
     40838+       if (is_fish_shell)
     40839+           vim_snprintf((char *)buf, len, "begin; %s; end", (char *)cmd);
     40840+       else
     40841+           vim_snprintf((char *)buf, len, "(%s)", (char *)cmd);
     40842+    }
     40843     else
     40844        STRCPY(buf, cmd);
     40845     if (itmp != NULL)
     40846@@ -1566,7 +1593,7 @@
     40847     }
     40848 #else
     40849     /*
     40850-     * for shells that don't understand braces around commands, at least allow
     40851+     * For shells that don't understand braces around commands, at least allow
     40852      * the use of commands in a pipe.
     40853      */
     40854     STRCPY(buf, cmd);
     40855@@ -3253,21 +3280,21 @@
    4248240856     if (  ((!other_file && !(flags & ECMD_OLDBUF))
    4248340857            || (curbuf->b_nwindows == 1
     
    4250540879 #ifdef FEAT_AUTOCMD
    4250640880     if ((command != NULL || newlnum > (linenr_T)0)
    42507 @@ -3332,6 +3343,12 @@
     40881@@ -3332,6 +3359,12 @@
    4250840882 #endif
    4250940883            buf = buflist_new(ffname, sfname, 0L,
     
    4251840892        if (buf == NULL)
    4251940893            goto theend;
    42520 @@ -4097,12 +4114,12 @@
     40894@@ -4097,12 +4130,12 @@
    4252140895      * 'scroll' */
    4252240896     if (eap->forceit)
     
    4253440908        bigness = 1;
    4253540909 
    42536 @@ -4409,6 +4426,31 @@
     40910@@ -4298,7 +4331,7 @@
     40911     pos_T      old_cursor = curwin->w_cursor;
     40912     int                start_nsubs;
     40913 #ifdef FEAT_EVAL
     40914-    int         save_ma = 0;
     40915+    int                save_ma = 0;
     40916 #endif
     40917 
     40918     cmd = eap->arg;
     40919@@ -4409,6 +4442,31 @@
    4253740920        endcolumn = (curwin->w_curswant == MAXCOL);
    4253840921     }
     
    4255640939+           eap->flags = EXFLAG_PRINT;
    4255740940+
    42558 +       (void)do_join(eap->line2 - eap->line1 + 1, FALSE, TRUE, FALSE);
     40941+       (void)do_join(eap->line2 - eap->line1 + 1, FALSE, TRUE, FALSE, TRUE);
    4255940942+       sub_nlines = sub_nsubs = eap->line2 - eap->line1 + 1;
    4256040943+       (void)do_sub_msg(FALSE);
     
    4256640949      * Find trailing options.  When '&' is used, keep old options.
    4256740950      */
    42568 @@ -4740,11 +4782,17 @@
     40951@@ -4740,11 +4798,17 @@
    4256940952                            char_u      *resp;
    4257040953                            colnr_T     sc, ec;
     
    4258540968                            for (i = 0; i < (long)sc; ++i)
    4258640969                                msg_putchar(' ');
    42587 @@ -5928,14 +5976,18 @@
     40970@@ -5928,14 +5992,18 @@
    4258840971                               "?", ":?", "?<CR>", "g?", "g?g?", "g??", "z?",
    4258940972                               "/\\?", "/\\z(\\)", "\\=", ":s\\=",
     
    4260140984-                              "\\[pattern]", "\\\\bar", "/\\\\%\\$"};
    4260240985+                              "\\[pattern]", "\\\\bar", "/\\\\%\\$",
    42603 +                               "s/\\\\\\~", "s/\\\\U", "s/\\\\L",
     40986+                              "s/\\\\\\~", "s/\\\\U", "s/\\\\L",
    4260440987+                              "s/\\\\1", "s/\\\\2", "s/\\\\3", "s/\\\\9"};
    4260540988     int flags;
    4260640989 
    4260740990     d = IObuff;                    /* assume IObuff is long enough! */
    42608 @@ -5974,7 +6026,7 @@
     40991@@ -5974,7 +6042,7 @@
    4260940992          /* Replace:
    4261040993           * "[:...:]" with "\[:...:]"
    4261140994           * "[++...]" with "\[++...]"
    4261240995-          * "\{" with "\\{"
    42613 +          * "\{" with "\\{"               -- matching "} \}"
     40996+          * "\{" with "\\{"               -- matching "} \}"
    4261440997           */
    4261540998            if ((arg[0] == '[' && (arg[1] == ':'
    4261640999                         || (arg[1] == '+' && arg[2] == '+')))
    42617 @@ -7658,7 +7710,7 @@
     41000@@ -7223,7 +7291,10 @@
     41001            else
     41002                /* ":sign place {id} file={fname}": change sign type */
     41003                lnum = buf_change_sign_type(buf, id, sp->sn_typenr);
     41004-           update_debug_sign(buf, lnum);
     41005+           if (lnum > 0)
     41006+               update_debug_sign(buf, lnum);
     41007+           else
     41008+               EMSG2(_("E885: Not possible to change sign %s"), sign_name);
     41009        }
     41010        else
     41011            EMSG(_(e_invarg));
     41012@@ -7658,7 +7729,7 @@
    4261841013 # ifdef FEAT_WINDOWS
    4261941014            ++emsg_off;
     
    4262641021diff -Naur vim74.orig/src/ex_cmds.h vim74/src/ex_cmds.h
    4262741022--- vim74.orig/src/ex_cmds.h    2013-06-08 13:08:20.000000000 +0000
    42628 +++ vim74/src/ex_cmds.h 2014-04-27 05:20:58.141769246 +0000
     41023+++ vim74/src/ex_cmds.h 2014-06-01 00:43:14.250813355 +0000
    4262941024@@ -477,6 +477,8 @@
    4263041025                        NEEDARG|EXTRA|NOTRLCOM),
     
    4266441059diff -Naur vim74.orig/src/ex_cmds2.c vim74/src/ex_cmds2.c
    4266541060--- vim74.orig/src/ex_cmds2.c   2013-06-28 18:14:53.000000000 +0000
    42666 +++ vim74/src/ex_cmds2.c        2014-04-27 05:20:58.145102663 +0000
     41061+++ vim74/src/ex_cmds2.c        2014-06-01 00:43:14.284146604 +0000
    4266741062@@ -1436,20 +1436,20 @@
    4266841063 }
     
    4277141166diff -Naur vim74.orig/src/ex_docmd.c vim74/src/ex_docmd.c
    4277241167--- vim74.orig/src/ex_docmd.c   2013-07-24 13:09:37.000000000 +0000
    42773 +++ vim74/src/ex_docmd.c        2014-04-27 05:20:58.148436078 +0000
     41168+++ vim74/src/ex_docmd.c        2014-06-01 00:43:14.294146578 +0000
    4277441169@@ -316,7 +316,6 @@
    4277541170 static void    ex_operators __ARGS((exarg_T *eap));
     
    4293441329     }
    4293541330     if (split)
    42936 @@ -7361,7 +7374,11 @@
     41331@@ -7198,6 +7211,7 @@
     41332     else
     41333     {
     41334        curwin->w_alist->al_refcount = 1;
     41335+       curwin->w_alist->id = ++max_alist_id;
     41336        alist_init(curwin->w_alist);
     41337     }
     41338 }
     41339@@ -7361,7 +7375,11 @@
    4293741340 {
    4293841341     /* Set recoverymode right away to avoid the ATTENTION prompt. */
     
    4294741350                             || setfname(curbuf, eap->arg, NULL, TRUE) == OK))
    4294841351        ml_recover();
    42949 @@ -7910,6 +7927,8 @@
     41352@@ -7910,6 +7928,8 @@
    4295041353                                               ? ECMD_ONE : eap->do_ecmd_lnum,
    4295141354                    (P_HID(curbuf) ? ECMD_HIDE : 0)
     
    4295641359                    + (eap->cmdidx == CMD_badd ? ECMD_ADDBUF : 0 )
    4295741360 #endif
    42958 @@ -8036,6 +8055,8 @@
     41361@@ -8036,6 +8056,8 @@
    4295941362 {
    4296041363 #ifdef FEAT_SCROLLBIND
     
    4296541368     long       y;
    4296641369     linenr_T   old_linenr = curwin->w_cursor.lnum;
    42967 @@ -8067,13 +8088,13 @@
     41370@@ -8067,13 +8089,13 @@
    4296841371 
    4296941372 
     
    4298141384            if (y > 0)
    4298241385                scrollup(y, TRUE);
    42983 @@ -8087,7 +8108,8 @@
     41386@@ -8087,7 +8109,8 @@
    4298441387 #endif
    4298541388        }
     
    4299141394     {
    4299241395        did_syncbind = TRUE;
    42993 @@ -8207,6 +8229,7 @@
     41396@@ -8207,6 +8230,7 @@
    4299441397     int                local;
    4299541398 {
     
    4299941402     {
    4300041403        /* If still in global directory, need to remember current
    43001 @@ -8223,7 +8246,6 @@
     41404@@ -8223,7 +8247,6 @@
    4300241405         * name. */
    4300341406        vim_free(globaldir);
     
    4300741410 
    4300841411     shorten_fnames(TRUE);
    43009 @@ -8350,7 +8372,7 @@
     41412@@ -8350,7 +8373,7 @@
    4301041413     {
    4301141414        n = W_WINROW(curwin) + curwin->w_wrow - msg_scrolled;
     
    4301641419 
    4301741420     len = eap->line2;
    43018 @@ -8556,6 +8578,9 @@
     41421@@ -8556,6 +8579,9 @@
    4301941422        beginline(BL_SOL | BL_FIX);
    4302041423     }
     
    4302641429     {
    4302741430        case CMD_delete:
    43028 @@ -8647,7 +8672,7 @@
     41431@@ -8647,7 +8673,7 @@
    4302941432 /*
    4303041433  * Print the current line if flags were given to the Ex command.
     
    4303541438     exarg_T    *eap;
    4303641439 {
    43037 @@ -8965,11 +8990,7 @@
     41440@@ -8692,7 +8718,7 @@
     41441        }
     41442        ++eap->line2;
     41443     }
     41444-    (void)do_join(eap->line2 - eap->line1 + 1, !eap->forceit, TRUE, TRUE);
     41445+    (void)do_join(eap->line2 - eap->line1 + 1, !eap->forceit, TRUE, TRUE, TRUE);
     41446     beginline(BL_WHITE | BL_FIX);
     41447     ex_may_print(eap);
     41448 }
     41449@@ -8965,11 +8991,7 @@
    4303841450     RedrawingDisabled = 0;
    4303941451     p_lz = FALSE;
     
    4304841460     if (need_maketitle)
    4304941461        maketitle();
    43050 @@ -9004,11 +9025,7 @@
     41462@@ -9004,11 +9026,7 @@
    4305141463        status_redraw_all();
    4305241464     else
     
    4306141473     p_lz = p;
    4306241474     out_flush();
    43063 @@ -10355,7 +10372,7 @@
     41475@@ -10273,6 +10291,7 @@
     41476     char_u     *sname;
     41477     win_T      *edited_win = NULL;
     41478     int                tabnr;
     41479+    int                restore_stal = FALSE;
     41480     win_T      *tab_firstwin;
     41481     frame_T    *tab_topframe;
     41482     int                cur_arg_idx = 0;
     41483@@ -10355,7 +10374,7 @@
    4306441484     }
    4306541485 
     
    4307041490        return FAIL;
    4307141491 
    43072 @@ -10929,9 +10946,9 @@
     41492@@ -10382,6 +10401,19 @@
     41493 #endif
     41494 
     41495     /*
     41496+     * When there are two or more tabpages and 'showtabline' is 1 the tabline
     41497+     * will be displayed when creating the next tab.  That resizes the windows
     41498+     * in the first tab, which may cause problems.  Set 'showtabline' to 2
     41499+     * temporarily to avoid that.
     41500+     */
     41501+    if (p_stal == 1 && first_tabpage->tp_next != NULL)
     41502+    {
     41503+       if (put_line(fd, "set stal=2") == FAIL)
     41504+           return FAIL;
     41505+       restore_stal = TRUE;
     41506+    }
     41507+
     41508+    /*
     41509      * May repeat putting Windows for each tab, when "tabpages" is in
     41510      * 'sessionoptions'.
     41511      * Don't use goto_tabpage(), it may change directory and trigger
     41512@@ -10531,6 +10563,8 @@
     41513                || put_eol(fd) == FAIL)
     41514            return FAIL;
     41515     }
     41516+    if (restore_stal && put_line(fd, "set stal=1") == FAIL)
     41517+       return FAIL;
     41518 
     41519     /*
     41520      * Wipe out an empty unnamed buffer we started in.
     41521@@ -10929,9 +10963,9 @@
    4307341522     char_u     *buf = NULL;
    4307441523     char_u     *s;
     
    4308341532     for (i = 0; i < gap->ga_len; ++i)
    4308441533     {
    43085 @@ -10948,7 +10965,9 @@
     41534@@ -10948,7 +10982,9 @@
    4308641535                    s = buf;
    4308741536                }
     
    4309441543                vim_free(buf);
    4309541544                return FAIL;
    43096 @@ -10956,7 +10975,7 @@
     41545@@ -10956,7 +10992,7 @@
    4309741546            vim_free(buf);
    4309841547        }
     
    4310341552 
    4310441553 /*
    43105 @@ -11389,7 +11408,7 @@
     41554@@ -11389,7 +11425,7 @@
    4310641555 ex_nohlsearch(eap)
    4310741556     exarg_T    *eap UNUSED;
     
    4311441563diff -Naur vim74.orig/src/ex_eval.c vim74/src/ex_eval.c
    4311541564--- vim74.orig/src/ex_eval.c    2013-06-08 13:50:28.000000000 +0000
    43116 +++ vim74/src/ex_eval.c 2014-04-27 05:20:58.148436078 +0000
     41565+++ vim74/src/ex_eval.c 2014-06-01 00:43:14.320813177 +0000
    4311741566@@ -321,6 +321,17 @@
    4311841567 }
     
    4330041749diff -Naur vim74.orig/src/ex_getln.c vim74/src/ex_getln.c
    4330141750--- vim74.orig/src/ex_getln.c   2013-07-05 17:44:21.000000000 +0000
    43302 +++ vim74/src/ex_getln.c        2014-04-27 05:20:58.151769494 +0000
     41751+++ vim74/src/ex_getln.c        2014-06-01 00:43:14.327479827 +0000
    4330341752@@ -2280,7 +2280,7 @@
    4330441753 
     
    4334041789  * the name into allocated memory and prepend "^".
    4334141790  */
    43342 @@ -5498,6 +5498,9 @@
     41791@@ -5095,9 +5095,9 @@
     41792     char_u     ***file;
     41793     char       *dirnames[];
     41794 {
     41795-    char_u     *matches;
     41796     char_u     *s;
     41797     char_u     *e;
     41798+    char_u     *match;
     41799     garray_T   ga;
     41800     int                i;
     41801     int                pat_len;
     41802@@ -5116,33 +5116,27 @@
     41803            return FAIL;
     41804        }
     41805        sprintf((char *)s, "%s/%s*.vim", dirnames[i], pat);
     41806-       matches = globpath(p_rtp, s, 0);
     41807+       globpath(p_rtp, s, &ga, 0);
     41808        vim_free(s);
     41809-       if (matches == NULL)
     41810-           continue;
     41811+    }
     41812 
     41813-       for (s = matches; *s != NUL; s = e)
     41814-       {
     41815-           e = vim_strchr(s, '\n');
     41816-           if (e == NULL)
     41817-               e = s + STRLEN(s);
     41818-           if (ga_grow(&ga, 1) == FAIL)
     41819-               break;
     41820-           if (e - 4 > s && STRNICMP(e - 4, ".vim", 4) == 0)
     41821-           {
     41822-               for (s = e - 4; s > matches; mb_ptr_back(matches, s))
     41823-                   if (*s == '\n' || vim_ispathsep(*s))
     41824-                       break;
     41825-               ++s;
     41826-               ((char_u **)ga.ga_data)[ga.ga_len] =
     41827-                                           vim_strnsave(s, (int)(e - s - 4));
     41828-               ++ga.ga_len;
     41829-           }
     41830-           if (*e != NUL)
     41831-               ++e;
     41832+    for (i = 0; i < ga.ga_len; ++i)
     41833+    {
     41834+       match = ((char_u **)ga.ga_data)[i];
     41835+       s = match;
     41836+       e = s + STRLEN(s);
     41837+       if (e - 4 > s && STRNICMP(e - 4, ".vim", 4) == 0)
     41838+       {
     41839+           e -= 4;
     41840+           for (s = e; s > match; mb_ptr_back(match, s))
     41841+               if (s < match || vim_ispathsep(*s))
     41842+                   break;
     41843+           ++s;
     41844+           *e = NUL;
     41845+           mch_memmove(match, s, e - s + 1);
     41846        }
     41847-       vim_free(matches);
     41848     }
     41849+
     41850     if (ga.ga_len == 0)
     41851        return FAIL;
     41852 
     41853@@ -5160,33 +5154,28 @@
     41854 #if defined(FEAT_CMDL_COMPL) || defined(FEAT_EVAL) || defined(PROTO)
     41855 /*
     41856  * Expand "file" for all comma-separated directories in "path".
     41857- * Returns an allocated string with all matches concatenated, separated by
     41858- * newlines.  Returns NULL for an error or no matches.
     41859+ * Adds the matches to "ga".  Caller must init "ga".
     41860  */
     41861-    char_u *
     41862-globpath(path, file, expand_options)
     41863+    void
     41864+globpath(path, file, ga, expand_options)
     41865     char_u     *path;
     41866     char_u     *file;
     41867+    garray_T   *ga;
     41868     int                expand_options;
     41869 {
     41870     expand_T   xpc;
     41871     char_u     *buf;
     41872-    garray_T   ga;
     41873     int                i;
     41874-    int                len;
     41875     int                num_p;
     41876     char_u     **p;
     41877-    char_u     *cur = NULL;
     41878 
     41879     buf = alloc(MAXPATHL);
     41880     if (buf == NULL)
     41881-       return NULL;
     41882+       return;
     41883 
     41884     ExpandInit(&xpc);
     41885     xpc.xp_context = EXPAND_FILES;
     41886 
     41887-    ga_init2(&ga, 1, 100);
     41888-
     41889     /* Loop over all entries in {path}. */
     41890     while (*path != NUL)
     41891     {
     41892@@ -5207,30 +5196,23 @@
     41893                             WILD_SILENT|expand_options) != FAIL && num_p > 0)
     41894            {
     41895                ExpandEscape(&xpc, buf, num_p, p, WILD_SILENT|expand_options);
     41896-               for (len = 0, i = 0; i < num_p; ++i)
     41897-                   len += (int)STRLEN(p[i]) + 1;
     41898 
     41899-               /* Concatenate new results to previous ones. */
     41900-               if (ga_grow(&ga, len) == OK)
     41901+               if (ga_grow(ga, num_p) == OK)
     41902                {
     41903-                   cur = (char_u *)ga.ga_data + ga.ga_len;
     41904                    for (i = 0; i < num_p; ++i)
     41905                    {
     41906-                       STRCPY(cur, p[i]);
     41907-                       cur += STRLEN(p[i]);
     41908-                       *cur++ = '\n';
     41909+                       ((char_u **)ga->ga_data)[ga->ga_len] =
     41910+                                       vim_strnsave(p[i], (int)STRLEN(p[i]));
     41911+                       ++ga->ga_len;
     41912                    }
     41913-                   ga.ga_len += len;
     41914                }
     41915+
     41916                FreeWild(num_p, p);
     41917            }
     41918        }
     41919     }
     41920-    if (cur != NULL)
     41921-       *--cur = 0; /* Replace trailing newline with NUL */
     41922 
     41923     vim_free(buf);
     41924-    return (char_u *)ga.ga_data;
     41925 }
     41926 
     41927 #endif
     41928@@ -5498,6 +5480,9 @@
    4334341929     if (hislen == 0)           /* no history */
    4334441930        return;
     
    4335241938diff -Naur vim74.orig/src/feature.h vim74/src/feature.h
    4335341939--- vim74.orig/src/feature.h    2013-05-18 18:18:20.000000000 +0000
    43354 +++ vim74/src/feature.h 2014-04-27 05:20:58.151769494 +0000
     41940+++ vim74/src/feature.h 2014-06-01 00:43:14.384146349 +0000
    4335541941@@ -211,18 +211,11 @@
    4335641942 #endif
     
    4341942005diff -Naur vim74.orig/src/fileio.c vim74/src/fileio.c
    4342042006--- vim74.orig/src/fileio.c     2013-08-05 19:58:03.000000000 +0000
    43421 +++ vim74/src/fileio.c  2014-04-27 05:20:58.155102910 +0000
     42007+++ vim74/src/fileio.c  2014-06-01 00:43:14.407479623 +0000
    4342242008@@ -428,13 +428,13 @@
    4342342009        }
     
    4358542171     {
    4358642172        EMSG2(errmsg, to);
    43587 @@ -7550,7 +7559,7 @@
     42173@@ -6888,6 +6897,7 @@
     42174            && buf->b_mtime != 0
     42175            && ((stat_res = mch_stat((char *)buf->b_ffname, &st)) < 0
     42176                || time_differs((long)st.st_mtime, buf->b_mtime)
     42177+               || st.st_size != buf->b_orig_size
     42178 #ifdef HAVE_ST_MODE
     42179                || (int)st.st_mode != buf->b_orig_mode
     42180 #else
     42181@@ -7550,7 +7560,7 @@
    4358842182     p = (char_u *)tempnam("tmp:", (char *)itmp);
    4358942183     if (p != NULL)
     
    4359442188        STRCPY(itmp, p);
    4359542189        STRCAT(itmp, ".txt");
    43596 @@ -9321,7 +9330,9 @@
     42190@@ -9321,7 +9331,9 @@
    4359742191      */
    4359842192     if (fname_io == NULL)
     
    4360542199        else if (buf != NULL)
    4360642200            autocmd_fname = buf->b_ffname;
    43607 @@ -9374,14 +9385,15 @@
     42201@@ -9374,14 +9386,15 @@
    4360842202     else
    4360942203     {
     
    4362342217            fname = vim_strsave(fname);
    4362442218        else
    43625 @@ -9536,13 +9548,19 @@
     42219@@ -9536,13 +9549,19 @@
    4362642220 
    4362742221     /*
     
    4364642240diff -Naur vim74.orig/src/fold.c vim74/src/fold.c
    4364742241--- vim74.orig/src/fold.c       2013-06-15 14:57:24.000000000 +0000
    43648 +++ vim74/src/fold.c    2014-04-27 05:20:58.158436326 +0000
     42242+++ vim74/src/fold.c    2014-06-01 00:43:14.437479547 +0000
    4364942243@@ -430,11 +430,9 @@
    4365042244     }
     
    4369842292diff -Naur vim74.orig/src/getchar.c vim74/src/getchar.c
    4369942293--- vim74.orig/src/getchar.c    2013-06-29 11:43:27.000000000 +0000
    43700 +++ vim74/src/getchar.c 2014-04-27 05:20:58.158436326 +0000
     42294+++ vim74/src/getchar.c 2014-06-01 00:43:14.447479521 +0000
    4370142295@@ -40,13 +40,13 @@
    4370242296 
     
    4410042694     set_input_buf(tp->save_inputbuf);
    4410142695 # endif
     42696@@ -1846,7 +1883,7 @@
     42697 }
     42698 #endif
     42699 
     42700-#if defined(FEAT_INS_EXPAND) || defined(PROTO)
     42701+#if defined(FEAT_INS_EXPAND) || defined(FEAT_EVAL) || defined(PROTO)
     42702 /*
     42703  * Check if any character is available, also half an escape sequence.
     42704  * Trick: when no typeahead found, but there is something in the typeahead
    4410242705@@ -1992,7 +2029,7 @@
    4410342706                typeahead_char = 0;
     
    4417542778diff -Naur vim74.orig/src/globals.h vim74/src/globals.h
    4417642779--- vim74.orig/src/globals.h    2013-07-04 17:53:44.000000000 +0000
    44177 +++ vim74/src/globals.h 2014-04-27 05:20:58.161769742 +0000
     42780+++ vim74/src/globals.h 2014-06-01 00:43:14.474146120 +0000
    4417842781@@ -386,6 +386,11 @@
    4417942782 /* When deleting the current buffer, another one must be loaded.  If we know
     
    4418842791 
    4418942792 #ifdef FEAT_MOUSE
    44190 @@ -662,7 +667,6 @@
     42793@@ -596,6 +601,7 @@
     42794  * to this when the window is using the global argument list.
     42795  */
     42796 EXTERN alist_T global_alist;   /* global argument list */
     42797+EXTERN int     max_alist_id INIT(= 0);     /* the previous argument list id */
     42798 EXTERN int     arg_had_last INIT(= FALSE); /* accessed last file in
     42799                                               global_alist */
     42800 
     42801@@ -662,7 +668,6 @@
    4419142802                                /* set to TRUE when "-s" commandline argument
    4419242803                                 * used for ex */
     
    4419642807 EXTERN int     VIsual_active INIT(= FALSE);
    4419742808                                /* whether Visual mode is active */
    44198 @@ -677,7 +681,6 @@
     42809@@ -677,7 +682,6 @@
    4419942810 
    4420042811 EXTERN int     redo_VIsual_busy INIT(= FALSE);
     
    4420442815 #ifdef FEAT_MOUSE
    4420542816 /*
    44206 @@ -752,6 +755,12 @@
     42817@@ -752,6 +756,12 @@
    4420742818  */
    4420842819 EXTERN pos_T   Insstart;               /* This is where the latest
     
    4421742828 /*
    4421842829  * Stuff for VREPLACE mode.
    44219 @@ -979,11 +988,6 @@
     42830@@ -979,11 +989,6 @@
    4422042831 EXTERN int     readonlymode INIT(= FALSE); /* Set to TRUE for "view" */
    4422142832 EXTERN int     recoverymode INIT(= FALSE); /* Set to TRUE for "-r" option */
     
    4422942840 #ifdef DO_INIT
    4423042841                    = {NULL, NULL, 0, 0, 0, 0, 0, 0, 0}
    44231 @@ -1177,11 +1181,9 @@
     42842@@ -1177,11 +1182,9 @@
    4423242843 EXTERN int     fill_diff INIT(= '-');
    4423342844 #endif
     
    4424142852 #ifdef FEAT_CMDWIN
    4424242853 EXTERN int     cedit_key INIT(= -1);   /* key value of 'cedit' option */
    44243 @@ -1490,6 +1492,7 @@
     42854@@ -1331,6 +1334,9 @@
     42855 #if defined(UNIX) || defined(VMS)
     42856 EXTERN int     term_is_xterm INIT(= FALSE);    /* xterm-like 'term' */
     42857 #endif
     42858+#if defined(UNIX)
     42859+EXTERN int     xterm_conflict_mouse INIT(= FALSE);
     42860+#endif
     42861 
     42862 #ifdef BACKSLASH_IN_FILENAME
     42863 EXTERN char    psepc INIT(= '\\');     /* normal path separator character */
     42864@@ -1490,6 +1496,7 @@
    4424442865 EXTERN char_u e_notopen[]      INIT(= N_("E484: Can't open file %s"));
    4424542866 EXTERN char_u e_notread[]      INIT(= N_("E485: Can't read file %s"));
     
    4425142872diff -Naur vim74.orig/src/gui.c vim74/src/gui.c
    4425242873--- vim74.orig/src/gui.c        2013-06-30 15:41:48.000000000 +0000
    44253 +++ vim74/src/gui.c     2014-04-27 05:20:58.161769742 +0000
     42874+++ vim74/src/gui.c     2014-06-01 00:43:14.494146069 +0000
    4425442875@@ -3132,11 +3132,9 @@
    4425542876      */
     
    4426642887diff -Naur vim74.orig/src/gui_gtk_x11.c vim74/src/gui_gtk_x11.c
    4426742888--- vim74.orig/src/gui_gtk_x11.c        2013-06-30 15:42:13.000000000 +0000
    44268 +++ vim74/src/gui_gtk_x11.c     2014-04-27 05:20:58.171769991 +0000
     42889+++ vim74/src/gui_gtk_x11.c     2014-06-01 00:43:14.634145713 +0000
    4426942890@@ -732,7 +732,10 @@
    4427042891 gui_mch_start_blink(void)
     
    4427842899     if (blink_waittime && blink_ontime && blink_offtime && gui.in_focus)
    4427942900     {
     42901@@ -2051,6 +2054,7 @@
     42902 
     42903     ssop_flags = save_ssop_flags;
     42904     g_free(mksession_cmdline);
     42905+
     42906     /*
     42907      * Reopen the file and append a command to restore v:this_session,
     42908      * as if this save never happened. This is to avoid conflicts with
     42909@@ -3139,10 +3143,14 @@
     42910        gnome_program_init(VIMPACKAGE, VIM_VERSION_SHORT,
     42911                           LIBGNOMEUI_MODULE, gui_argc, gui_argv, NULL);
     42912 # if defined(FEAT_FLOAT) && defined(LC_NUMERIC)
     42913-       /* Make sure strtod() uses a decimal point, not a comma. Gnome init
     42914-        * may change it. */
     42915-       if (setlocale(LC_NUMERIC, NULL) != (char *) "C")
     42916-          setlocale(LC_NUMERIC, "C");
     42917+       {
     42918+           char *p = setlocale(LC_NUMERIC, NULL);
     42919+
     42920+           /* Make sure strtod() uses a decimal point, not a comma. Gnome
     42921+            * init may change it. */
     42922+           if (p == NULL || strcmp(p, "C") != 0)
     42923+              setlocale(LC_NUMERIC, "C");
     42924+       }
     42925 # endif
     42926     }
     42927 #endif
    4428042928diff -Naur vim74.orig/src/gui_mac.c vim74/src/gui_mac.c
    4428142929--- vim74.orig/src/gui_mac.c    2013-05-06 02:06:04.000000000 +0000
    44282 +++ vim74/src/gui_mac.c 2014-04-27 05:20:58.175103406 +0000
     42930+++ vim74/src/gui_mac.c 2014-06-01 00:43:14.654145662 +0000
    4428342931@@ -1068,11 +1068,7 @@
    4428442932     }
     
    4431342961diff -Naur vim74.orig/src/gui_w48.c vim74/src/gui_w48.c
    4431442962--- vim74.orig/src/gui_w48.c    2013-08-10 11:36:45.000000000 +0000
    44315 +++ vim74/src/gui_w48.c 2014-04-27 05:20:58.181770239 +0000
     42963+++ vim74/src/gui_w48.c 2014-06-01 00:43:14.767478706 +0000
    4431642964@@ -1008,7 +1008,7 @@
    4431742965     static LPARAM last_lParam = 0L;
     
    4437343021     fnames = (char_u **)alloc(cFiles * sizeof(char_u *));
    4437443022 
     43023diff -Naur vim74.orig/src/if_lua.c vim74/src/if_lua.c
     43024--- vim74.orig/src/if_lua.c     2013-06-23 10:55:02.000000000 +0000
     43025+++ vim74/src/if_lua.c  2014-06-01 00:43:14.997478121 +0000
     43026@@ -734,7 +734,7 @@
     43027     if (li == NULL) return 0;
     43028     if (lua_isnil(L, 3)) /* remove? */
     43029     {
     43030-       list_remove(l, li, li);
     43031+       vimlist_remove(l, li, li);
     43032        clear_tv(&li->li_tv);
     43033        vim_free(li);
     43034     }
    4437543035diff -Naur vim74.orig/src/if_perl.xs vim74/src/if_perl.xs
    4437643036--- vim74.orig/src/if_perl.xs   2013-08-02 17:28:50.000000000 +0000
    44377 +++ vim74/src/if_perl.xs        2014-04-27 05:20:58.191770487 +0000
     43037+++ vim74/src/if_perl.xs        2014-06-01 00:43:15.084144567 +0000
    4437843038@@ -14,7 +14,8 @@
    4437943039 #define IN_PERL_FILE   /* don't include if_perl.pro from proto.h */
     
    4454243202diff -Naur vim74.orig/src/if_py_both.h vim74/src/if_py_both.h
    4454343203--- vim74.orig/src/if_py_both.h 2013-07-24 15:09:19.000000000 +0000
    44544 +++ vim74/src/if_py_both.h      2014-04-27 05:20:58.195103903 +0000
     43204+++ vim74/src/if_py_both.h      2014-06-01 00:43:15.114144490 +0000
    4454543205@@ -13,6 +13,11 @@
    4454643206  * Common code for if_python.c and if_python3.c.
     
    4502043680+       {
    4502143681+           lis[slicelen + numreplaced] = lis[numreplaced]->li_prev;
    45022 +           list_remove(l, lis[numreplaced], lis[numreplaced]);
     43682+           vimlist_remove(l, lis[numreplaced], lis[numreplaced]);
    4502343683+           numreplaced++;
    4502443684+       }
     
    4509643756+    {
    4509743757+       li = list_find(l, (long) index);
    45098 +       list_remove(l, li, li);
     43758+       vimlist_remove(l, li, li);
    4509943759+       clear_tv(&li->li_tv);
    4510043760+       vim_free(li);
     
    4537844038diff -Naur vim74.orig/src/if_python.c vim74/src/if_python.c
    4537944039--- vim74.orig/src/if_python.c  2013-07-09 19:40:11.000000000 +0000
    45380 +++ vim74/src/if_python.c       2014-04-27 05:20:58.198437320 +0000
     44040+++ vim74/src/if_python.c       2014-06-01 00:43:15.180810987 +0000
    4538144041@@ -196,6 +196,7 @@
    4538244042 # define PyTuple_Size dll_PyTuple_Size
     
    4548044140diff -Naur vim74.orig/src/if_python3.c vim74/src/if_python3.c
    4548144141--- vim74.orig/src/if_python3.c 2013-07-09 19:53:21.000000000 +0000
    45482 +++ vim74/src/if_python3.c      2014-04-27 05:20:58.198437320 +0000
     44142+++ vim74/src/if_python3.c      2014-06-01 00:43:15.214144236 +0000
    4548344143@@ -97,6 +97,19 @@
    4548444144 #define Py_ssize_t_fmt "n"
     
    4563744297diff -Naur vim74.orig/src/if_ruby.c vim74/src/if_ruby.c
    4563844298--- vim74.orig/src/if_ruby.c    2013-05-20 10:47:48.000000000 +0000
    45639 +++ vim74/src/if_ruby.c 2014-04-27 05:20:58.198437320 +0000
     44299+++ vim74/src/if_ruby.c 2014-06-01 00:43:15.230810860 +0000
    4564044300@@ -88,14 +88,20 @@
    4564144301 # define rb_int2big rb_int2big_stub
     
    4574444404diff -Naur vim74.orig/src/if_tcl.c vim74/src/if_tcl.c
    4574544405--- vim74.orig/src/if_tcl.c     2013-08-02 17:31:15.000000000 +0000
    45746 +++ vim74/src/if_tcl.c  2014-04-27 05:20:58.201770736 +0000
     44406+++ vim74/src/if_tcl.c  2014-06-01 00:43:15.274144083 +0000
    4574744407@@ -165,6 +165,7 @@
    4574844408  */
     
    4577544435                stubs_initialized = TRUE;
    4577644436            }
     44437diff -Naur vim74.orig/src/macros.h vim74/src/macros.h
     44438--- vim74.orig/src/macros.h     2013-06-12 15:07:32.000000000 +0000
     44439+++ vim74/src/macros.h  2014-06-01 00:43:15.400810427 +0000
     44440@@ -264,7 +264,7 @@
     44441 # define mb_ptr_adv(p)     p += has_mbyte ? (*mb_ptr2len)(p) : 1
     44442 /* Advance multi-byte pointer, do not skip over composing chars. */
     44443 # define mb_cptr_adv(p)            p += enc_utf8 ? utf_ptr2len(p) : has_mbyte ? (*mb_ptr2len)(p) : 1
     44444-/* Backup multi-byte pointer. */
     44445+/* Backup multi-byte pointer. Only use with "p" > "s" ! */
     44446 # define mb_ptr_back(s, p)  p -= has_mbyte ? ((*mb_head_off)(s, p - 1) + 1) : 1
     44447 /* get length of multi-byte char, not including composing chars */
     44448 # define mb_cptr2len(p)            (enc_utf8 ? utf_ptr2len(p) : (*mb_ptr2len)(p))
    4577744449diff -Naur vim74.orig/src/main.c vim74/src/main.c
    4577844450--- vim74.orig/src/main.c       2013-07-03 10:36:49.000000000 +0000
    45779 +++ vim74/src/main.c    2014-04-27 05:20:58.208437568 +0000
    45780 @@ -702,6 +702,11 @@
     44451+++ vim74/src/main.c    2014-06-01 00:43:15.424143701 +0000
     44452@@ -322,6 +322,7 @@
     44453     init_yank();               /* init yank buffers */
     44454 
     44455     alist_init(&global_alist); /* Init the argument list to empty. */
     44456+    global_alist.id = 0;
     44457 
     44458     /*
     44459      * Set the default values for the options.
     44460@@ -702,6 +703,11 @@
    4578144461        TIME_MSG("reading viminfo");
    4578244462     }
     
    4579044470 #ifdef FEAT_QUICKFIX
    4579144471     /*
    45792 @@ -812,7 +817,7 @@
     44472@@ -812,7 +818,7 @@
    4579344473     starttermcap();        /* start termcap if not done by wait_return() */
    4579444474     TIME_MSG("start termcap");
     
    4579944479 
    4580044480 #ifdef FEAT_MOUSE
    45801 @@ -1048,13 +1053,11 @@
     44481@@ -1048,13 +1054,11 @@
    4580244482     /* Setup to catch a terminating error from the X server.  Just ignore
    4580344483      * it, restore the state and continue.  This might not always work
     
    4581444494        need_wait_return = FALSE;
    4581544495        global_busy = FALSE;
    45816 @@ -1091,11 +1094,7 @@
     44496@@ -1091,11 +1095,7 @@
    4581744497                check_timestamps(FALSE);
    4581844498            if (need_wait_return)       /* if wait_return still needed ... */
     
    4582744507                need_start_insertmode = FALSE;
    4582844508                stuffReadbuff((char_u *)"i");   /* start insert mode next */
    45829 @@ -1197,7 +1196,7 @@
     44509@@ -1197,7 +1197,7 @@
    4583044510                diff_need_scrollbind = FALSE;
    4583144511            }
     
    4583644516            foldAdjustVisual();
    4583744517 #endif
    45838 @@ -1223,12 +1222,9 @@
     44518@@ -1223,12 +1223,9 @@
    4583944519            update_topline();
    4584044520            validate_cursor();
     
    4585044530            else if (redraw_cmdline || clear_cmdline)
    4585144531                showmode();
    45852 @@ -1606,6 +1602,7 @@
     44532@@ -1606,6 +1603,7 @@
    4585344533 
    4585444534 #ifdef FEAT_EVAL
     
    4585844538 
    4585944539     if (TOLOWER_ASC(initstr[0]) == 'r')
    45860 @@ -2727,6 +2724,7 @@
     44540@@ -2727,6 +2725,7 @@
    4586144541     int                arg_idx;                /* index in argument list */
    4586244542     int                i;
     
    4586644546 # ifdef FEAT_AUTOCMD
    4586744547     /*
    45868 @@ -2816,24 +2814,22 @@
     44548@@ -2816,24 +2815,22 @@
    4586944549 # ifdef FEAT_AUTOCMD
    4587044550     --autocmd_no_enter;
     
    4590544585diff -Naur vim74.orig/src/mark.c vim74/src/mark.c
    4590644586--- vim74.orig/src/mark.c       2013-08-02 15:22:10.000000000 +0000
    45907 +++ vim74/src/mark.c    2014-04-27 05:20:58.208437568 +0000
     44587+++ vim74/src/mark.c    2014-06-01 00:43:15.447476975 +0000
    4590844588@@ -98,7 +98,6 @@
    4590944589        return OK;
     
    4602144701diff -Naur vim74.orig/src/mbyte.c vim74/src/mbyte.c
    4602244702--- vim74.orig/src/mbyte.c      2013-07-05 18:07:21.000000000 +0000
    46023 +++ vim74/src/mbyte.c   2014-04-27 05:20:58.211770985 +0000
     44703+++ vim74/src/mbyte.c   2014-06-01 00:43:15.490810198 +0000
    4602444704@@ -83,10 +83,18 @@
    4602544705 # ifndef WIN32_LEAN_AND_MEAN
     
    4610344783diff -Naur vim74.orig/src/memfile.c vim74/src/memfile.c
    4610444784--- vim74.orig/src/memfile.c    2013-05-23 20:22:22.000000000 +0000
    46105 +++ vim74/src/memfile.c 2014-04-27 05:20:58.211770985 +0000
     44785+++ vim74/src/memfile.c 2014-06-01 00:43:15.514143472 +0000
    4610644786@@ -1358,7 +1358,7 @@
    4610744787        if (fdflags >= 0 && (fdflags & FD_CLOEXEC) == 0)
     
    4611544795diff -Naur vim74.orig/src/memline.c vim74/src/memline.c
    4611644796--- vim74.orig/src/memline.c    2013-05-06 02:01:02.000000000 +0000
    46117 +++ vim74/src/memline.c 2014-04-27 05:20:58.215104401 +0000
     44797+++ vim74/src/memline.c 2014-06-01 00:43:15.537476746 +0000
    4611844798@@ -289,6 +289,9 @@
    4611944799     buf->b_ml.ml_chunksize = NULL;
     
    4631344993diff -Naur vim74.orig/src/menu.c vim74/src/menu.c
    4631444994--- vim74.orig/src/menu.c       2011-04-11 13:17:21.000000000 +0000
    46315 +++ vim74/src/menu.c    2014-04-27 05:20:58.215104401 +0000
     44995+++ vim74/src/menu.c    2014-06-01 00:43:15.557476695 +0000
    4631644996@@ -1640,7 +1640,6 @@
    4631744997        idx = MENU_INDEX_INSERT;
     
    4634745027diff -Naur vim74.orig/src/message.c vim74/src/message.c
    4634845028--- vim74.orig/src/message.c    2013-08-09 18:30:45.000000000 +0000
    46349 +++ vim74/src/message.c 2014-04-27 05:20:58.218437816 +0000
     45029+++ vim74/src/message.c 2014-06-01 00:43:15.597476593 +0000
    4635045030@@ -887,6 +887,8 @@
    4635145031     int                oldState;
     
    4639045070diff -Naur vim74.orig/src/misc1.c vim74/src/misc1.c
    4639145071--- vim74.orig/src/misc1.c      2013-08-03 15:29:33.000000000 +0000
    46392 +++ vim74/src/misc1.c   2014-04-27 05:20:58.218437816 +0000
     45072+++ vim74/src/misc1.c   2014-06-01 00:43:15.620809867 +0000
    4639345073@@ -303,10 +303,18 @@
    4639445074        ml_replace(curwin->w_cursor.lnum, newline, FALSE);
     
    4641945099        {
    4642045100-           int        sw = (int)get_sw_value();
    46421 +           int        sw = (int)get_sw_value(curbuf);
     45101+           int sw = (int)get_sw_value(curbuf);
    4642245102 
    4642345103            if (p_sr)
     
    4643645116  * comment leader.
    4643745117  * "backward" must be true for the "O" command.
    46438 @@ -4800,9 +4808,9 @@
     45118@@ -3117,6 +3125,9 @@
     45119            if (hasAnyFolding(wp))
     45120                set_topline(wp, wp->w_topline);
     45121 #endif
     45122+           /* relative numbering may require updating more */
     45123+           if (wp->w_p_rnu)
     45124+               redraw_win_later(wp, SOME_VALID);
     45125        }
     45126     }
     45127 
     45128@@ -4800,9 +4811,9 @@
    4643945129 
    4644045130     if (fname == NULL)
     
    4644845138        mb_ptr_adv(p2);
    4644945139     }
    46450 @@ -4921,7 +4929,8 @@
     45140@@ -4921,7 +4932,8 @@
    4645145141 }
    4645245142 
     
    4645845148     int
    4645945149 vim_ispathsep(c)
    46460 @@ -4944,6 +4953,20 @@
     45150@@ -4944,6 +4956,20 @@
    4646145151 #endif
    4646245152 }
     
    4647945169 /*
    4648045170  * return TRUE if 'c' is a path list separator.
    46481 @@ -5168,11 +5191,18 @@
     45171@@ -5168,11 +5194,18 @@
    4648245172 #if defined(FEAT_CINDENT) || defined(FEAT_SYN_HL)
    4648345173 
     
    4649845188 find_start_comment(ind_maxcomment)         /* XXX */
    4649945189     int                ind_maxcomment;
    46500 @@ -5290,7 +5320,7 @@
     45190@@ -5290,7 +5323,7 @@
    4650145191 static int     cin_isdefault __ARGS((char_u *));
    4650245192 static char_u  *after_label __ARGS((char_u *l));
     
    4650745197 static int     cin_get_equal_amount __ARGS((linenr_T lnum));
    4650845198 static int     cin_ispreproc __ARGS((char_u *));
    46509 @@ -5299,28 +5329,26 @@
     45199@@ -5299,28 +5332,26 @@
    4651045200 static int     cin_islinecomment __ARGS((char_u *));
    4651145201 static int     cin_isterminated __ARGS((char_u *, int, int));
     
    4654445234  * Skip over white space and C comments within the line.
    4654545235  * Also skip over Perl/shell comments if desired.
    46546 @@ -5337,7 +5365,7 @@
     45236@@ -5337,7 +5368,7 @@
    4654745237 
    4654845238        /* Perl/shell # comment comment continues until eol.  Require a space
     
    4655345243            s += STRLEN(s);
    4655445244            break;
    46555 @@ -5423,8 +5451,7 @@
     45245@@ -5423,8 +5454,7 @@
    4655645246  * Note: curwin->w_cursor must be where we are looking for the label.
    4655745247  */
     
    4656345253     char_u     *s;
    4656445254 
    46565 @@ -5458,7 +5485,7 @@
     45255@@ -5458,7 +5488,7 @@
    4656645256             * If we're in a comment now, skip to the start of the comment.
    4656745257             */
     
    4657245262 
    4657345263            line = ml_get_curline();
    46574 @@ -5704,10 +5731,9 @@
     45264@@ -5704,10 +5734,9 @@
    4657545265  *             ^
    4657645266  */
     
    4658445274     char_u     *l;
    4658545275     int                amount;
    46586 @@ -5717,8 +5743,7 @@
     45276@@ -5717,8 +5746,7 @@
    4658745277     curwin->w_cursor.lnum = lnum;
    4658845278     l = ml_get_curline();
     
    4659445284        amount = get_indent_nolabel(lnum);
    4659545285        l = after_label(ml_get_curline());
    46596 @@ -5962,12 +5987,10 @@
     45286@@ -5962,12 +5990,10 @@
    4659745287  * "min_lnum" is the line before which we will not be looking.
    4659845288  */
     
    4660845298     char_u     *s;
    4660945299     linenr_T   lnum = first_lnum;
    46610 @@ -5981,7 +6004,7 @@
     45300@@ -5981,7 +6007,7 @@
    4661145301        s = *sp;
    4661245302 
     
    4661745307        lnum = trypos->lnum;
    4661845308        if (lnum < min_lnum)
    46619 @@ -6089,10 +6112,9 @@
     45309@@ -6089,10 +6115,9 @@
    4662045310  * ')' and ';'. The condition may be spread over several lines.
    4662145311  */
     
    4662945319     pos_T      cursor_save;
    4663045320     pos_T      *trypos;
    46631 @@ -6112,7 +6134,8 @@
     45321@@ -6112,7 +6137,8 @@
    4663245322            ++p;
    4663345323            ++curwin->w_cursor.col;
     
    4663945329            retval = TRUE;
    4664045330        curwin->w_cursor = cursor_save;
    46641 @@ -6175,10 +6198,8 @@
     45331@@ -6175,10 +6201,8 @@
    4664245332  * Adjust the cursor to the line with "while".
    4664345333  */
     
    4665145341     char_u     *line;
    4665245342     char_u     *p;
    46653 @@ -6202,7 +6223,7 @@
     45343@@ -6202,7 +6226,7 @@
    4665445344                 * before the matching '('.  XXX */
    4665545345                i = (int)(p - line);
     
    4666045350                {
    4666145351                    s = cin_skipcomment(ml_get(trypos->lnum));
    46662 @@ -6394,11 +6415,8 @@
     45352@@ -6394,11 +6418,8 @@
    4666345353 }
    4666445354 
     
    4667345363     int                amount;
    4667445364     colnr_T    vcol;
    46675 @@ -6408,11 +6426,10 @@
     45365@@ -6408,11 +6429,10 @@
    4667645366     {
    4667745367        amount = get_indent();
     
    4668745377     else
    4668845378     {
    46689 @@ -6420,8 +6437,8 @@
     45379@@ -6420,8 +6440,8 @@
    4669045380        getvcol(curwin, &curwin->w_cursor, &vcol, NULL, NULL);
    4669145381        amount = (int)vcol;
     
    4669845388 }
    4669945389 
    46700 @@ -6505,8 +6522,7 @@
     45390@@ -6505,8 +6525,7 @@
    4670145391 /* }       */
    4670245392 
     
    4670845398     pos_T      cursor_save;
    4670945399     pos_T      *trypos;
    46710 @@ -6522,7 +6538,7 @@
     45400@@ -6522,7 +6541,7 @@
    4671145401        pos = NULL;
    4671245402        /* ignore the { if it's in a // or / *  * / comment */
     
    4671745407        if (pos != NULL)
    4671845408            curwin->w_cursor.lnum = pos->lnum;
    46719 @@ -6536,9 +6552,8 @@
     45409@@ -6536,9 +6555,8 @@
    4672045410  * Return NULL if no match found.
    4672145411  */
     
    4672845418     pos_T      cursor_save;
    4672945419     pos_T      *trypos;
    46730 @@ -6555,7 +6570,7 @@
     45420@@ -6555,7 +6573,7 @@
    4673145421            pos_copy = *trypos;     /* copy trypos, findmatch will change it */
    4673245422            trypos = &pos_copy;
     
    4673745427        }
    4673845428     }
    46739 @@ -6570,15 +6585,14 @@
     45429@@ -6570,15 +6588,14 @@
    4674045430  * looking a few lines further.
    4674145431  */
     
    4675745447 
    4675845448 /*
    46759 @@ -6616,201 +6630,229 @@
     45449@@ -6616,201 +6633,229 @@
    4676045450     return retval;
    4676145451 }
     
    4679045480 
    4679145481-    int ind_level = sw;
    46792 +    /* Spaces from the edge of the line an open brace that's at the end of a
    46793 +     * line is imagined to be. */
    46794 +    buf->b_ind_open_imag = 0;
    46795  
     45482-
    4679645483-    /*
    4679745484-     * spaces from the edge of the line an open brace that's at the end of a
     
    4679945486-     */
    4680045487-    int ind_open_imag = 0;
    46801 +    /* Spaces from the prevailing indent for a line that is not preceded by
    46802 +     * an opening brace. */
    46803 +    buf->b_ind_no_brace = 0;
     45488+    /* Spaces from the edge of the line an open brace that's at the end of a
     45489+     * line is imagined to be. */
     45490+    buf->b_ind_open_imag = 0;
    4680445491 
    4680545492-    /*
     
    4680845495-     */
    4680945496-    int ind_no_brace = 0;
    46810 -
     45497+    /* Spaces from the prevailing indent for a line that is not preceded by
     45498+     * an opening brace. */
     45499+    buf->b_ind_no_brace = 0;
     45500 
    4681145501-    /*
    4681245502-     * column where the first { of a function should be located }
     
    4709145781+       if (l[1] == '-')
    4709245782+           n = -n;
    47093 +
     45783 
    4709445784+       /* When adding an entry here, also update the default 'cinoptions' in
    4709545785+        * doc/indent.txt, and add explanation for it! */
     
    4713645826+    }
    4713745827+}
    47138  
     45828+
    4713945829+    int
    4714045830+get_c_indent()
     
    4714345833     int                amount;
    4714445834     int                scope_amount;
    47145 @@ -6845,10 +6887,6 @@
     45835@@ -6845,10 +6890,6 @@
    4714645836 
    4714745837     int                whilelevel;
     
    4715445844     int                iscase;
    4715545845     int                lookfor_break;
    47156 @@ -6857,83 +6895,8 @@
     45846@@ -6857,83 +6898,8 @@
    4715745847     int                original_line_islabel;
    4715845848     int                added_to_amount = 0;
     
    4724045930     /* remember where the cursor was when we started */
    4724145931     cur_curpos = curwin->w_cursor;
    47242 @@ -6967,22 +6930,21 @@
     45932@@ -6967,22 +6933,21 @@
    4724345933 
    4724445934     curwin->w_cursor.col = 0;
     
    4726745957        amount = 0;
    4726845958     }
    47269 @@ -7004,7 +6966,8 @@
     45959@@ -7004,7 +6969,8 @@
    4727045960      * comment, try using the 'comments' option.
    4727145961      */
     
    4727745967        int     lead_start_len = 2;
    4727845968        int     lead_middle_len = 1;
    47279 @@ -7138,7 +7101,7 @@
     45969@@ -7138,7 +7104,7 @@
    4728045970            }
    4728145971            if (amount == -1)                       /* use the comment opener */
     
    4728645976                    start = ml_get(trypos->lnum);
    4728745977                    look = start + trypos->col + 2; /* skip / and * */
    47288 @@ -7147,8 +7110,8 @@
     45978@@ -7147,8 +7113,8 @@
    4728945979                }
    4729045980                getvcol(curwin, trypos, &col, NULL, NULL);
     
    4729745987        }
    4729845988     }
    47299 @@ -7156,9 +7119,9 @@
     45989@@ -7156,9 +7122,9 @@
    4730045990     /*
    4730145991      * Are we inside parentheses or braces?
     
    4731046000     {
    4731146001       if (trypos != NULL && tryposBrace != NULL)
    47312 @@ -7179,7 +7142,7 @@
     46002@@ -7179,7 +7145,7 @@
    4731346003         * If the matching paren is more than one line away, use the indent of
    4731446004         * a previous non-empty line that matches the same paren.
     
    4731946009            /* Line up with the start of the matching paren line. */
    4732046010            amount = get_indent_lnum(curwin->w_cursor.lnum - 1);  /* XXX */
    47321 @@ -7198,7 +7161,7 @@
     46011@@ -7198,7 +7164,7 @@
    4732246012                curwin->w_cursor.lnum = lnum;
    4732346013 
     
    4732846018                    lnum = trypos->lnum + 1;
    4732946019                    continue;
    47330 @@ -7206,8 +7169,7 @@
     46020@@ -7206,8 +7172,7 @@
    4733146021 
    4733246022                /* XXX */
     
    4733846028                        && trypos->col == our_paren_pos.col)
    4733946029                {
    47340 @@ -7235,7 +7197,7 @@
     46030@@ -7235,7 +7200,7 @@
    4734146031            int     ignore_paren_col = 0;
    4734246032            int     is_if_for_while = 0;
     
    4734746037                /* Look for the outermost opening parenthesis on this line
    4734846038                 * and check whether it belongs to an "if", "for" or "while". */
    47349 @@ -7250,7 +7212,7 @@
     46039@@ -7250,7 +7215,7 @@
    4735046040                    curwin->w_cursor.lnum = outermost.lnum;
    4735146041                    curwin->w_cursor.col = outermost.col;
     
    4735646046 
    4735746047                curwin->w_cursor = cursor_save;
    47358 @@ -7261,7 +7223,7 @@
     46048@@ -7261,7 +7226,7 @@
    4735946049                    cin_is_if_for_while_before_offset(line, &outermost.col);
    4736046050            }
     
    4736546055            if (*look == '(')
    4736646056            {
    47367 @@ -7275,7 +7237,8 @@
     46057@@ -7275,7 +7240,8 @@
    4736846058                line = ml_get_curline();
    4736946059                look_col = (int)(look - line);
     
    4737546065                          && trypos->lnum == our_paren_pos.lnum
    4737646066                          && trypos->col < our_paren_pos.col)
    47377 @@ -7284,24 +7247,25 @@
     46067@@ -7284,24 +7250,25 @@
    4737846068                curwin->w_cursor.lnum = save_lnum;
    4737946069                look = ml_get(our_paren_pos.lnum) + look_col;
     
    4740646096                    {
    4740746097                        /* look for opening unmatched paren, indent one level
    47408 @@ -7323,9 +7287,9 @@
     46098@@ -7323,9 +7290,9 @@
    4740946099                        }
    4741046100 
     
    4741846108                    else
    4741946109                    {
    47420 @@ -7351,12 +7315,12 @@
     46110@@ -7351,12 +7318,12 @@
    4742146111                }
    4742246112            }
     
    4743446124            {
    4743546125                if (cur_amount != MAXCOL)
    47436 @@ -7364,39 +7328,39 @@
     46126@@ -7364,39 +7331,39 @@
    4743746127            }
    4743846128            else
     
    4748446174                }
    4748546175                /*
    47486 @@ -7414,7 +7378,7 @@
     46176@@ -7414,7 +7381,7 @@
    4748746177 
    4748846178        /* add extra indent for a comment */
     
    4749346183 
    4749446184       /*
    47495 @@ -7457,8 +7421,8 @@
     46185@@ -7457,8 +7424,8 @@
    4749646186             */
    4749746187            lnum = ourscope;
     
    4750446194 
    4750546195            /*
    47506 @@ -7467,11 +7431,11 @@
     46196@@ -7467,11 +7434,11 @@
    4750746197             *                  ldfd) {
    4750846198             *              }
     
    4751846208            start_brace = BRACE_AT_END;
    4751946209        }
    47520 @@ -7487,7 +7451,7 @@
     46210@@ -7487,7 +7454,7 @@
    4752146211             * they may want closing braces to line up with something
    4752246212             * other than the open brace.  indulge them, if so.
     
    4752746217        else
    4752846218        {
    47529 @@ -7500,14 +7464,12 @@
     46219@@ -7500,14 +7467,12 @@
    4753046220            lookfor = LOOKFOR_INITIAL;
    4753146221            if (cin_iselse(theline))
     
    4754446234                    amount = get_indent();      /* XXX */
    4754546235                    goto theend;
    47546 @@ -7524,12 +7486,12 @@
     46236@@ -7524,12 +7489,12 @@
    4754746237            /*
    4754846238             * if the '{' is  _really_ at the left margin, use the imaginary
     
    4755946249            }
    4756046250            else if (start_brace == BRACE_AT_START &&
    47561 @@ -7542,16 +7504,16 @@
     46251@@ -7542,16 +7507,16 @@
    4756246252            {
    4756346253                if (start_brace == BRACE_AT_END)    /* '{' is at end of line */
     
    4758046270                        amount = 0;
    4758146271                }
    47582 @@ -7562,20 +7524,22 @@
     46272@@ -7562,20 +7527,22 @@
    4758346273            if (cin_iscase(theline, FALSE))     /* it's a switch() label */
    4758446274            {
     
    4760746297            scope_amount = amount;
    4760846298            whilelevel = 0;
    47609 @@ -7613,14 +7577,14 @@
     46299@@ -7613,14 +7580,14 @@
    4761046300                    {
    4761146301                        if (curwin->w_cursor.lnum == 0
     
    4762646316                            break;
    4762746317                        }
    47628 @@ -7631,7 +7595,7 @@
     46318@@ -7631,7 +7598,7 @@
    4762946319                         * If we're in a comment now, skip to the start of the
    4763046320                         * comment.
     
    4763546325                        {
    4763646326                            curwin->w_cursor.lnum = trypos->lnum + 1;
    47637 @@ -7656,8 +7620,7 @@
     46327@@ -7656,8 +7623,7 @@
    4763846328                         * (it's a variable declaration).
    4763946329                         */
     
    4764546335                            /* if the line is terminated with another ','
    4764646336                             * it is a continued variable initialization.
    47647 @@ -7688,11 +7651,11 @@
     46337@@ -7688,11 +7654,11 @@
    4764846338                             */                                 /* XXX */
    4764946339                            trypos = NULL;
     
    4766046350                            if (trypos != NULL)
    4766146351                            {
    47662 @@ -7727,8 +7690,8 @@
     46352@@ -7727,8 +7693,8 @@
    4766346353                            amount = scope_amount;
    4766446354                            if (theline[0] == '{')
     
    4767146361                        }
    4767246362 
    47673 @@ -7750,7 +7713,7 @@
     46363@@ -7750,7 +7716,7 @@
    4767446364 
    4767546365                            /* If we're in a comment now, skip to the start of
     
    4768046370                            {
    4768146371                                curwin->w_cursor.lnum = trypos->lnum + 1;
    47682 @@ -7765,7 +7728,8 @@
     46372@@ -7765,7 +7731,8 @@
    4768346373                            /* Finally the actual check for "namespace". */
    4768446374                            if (cin_is_cpp_namespace(l))
     
    4769046380                            }
    4769146381 
    47692 @@ -7779,7 +7743,7 @@
     46382@@ -7779,7 +7746,7 @@
    4769346383                /*
    4769446384                 * If we're in a comment now, skip to the start of the comment.
     
    4769946389                    curwin->w_cursor.lnum = trypos->lnum + 1;
    4770046390                    curwin->w_cursor.col = 0;
    47701 @@ -7833,8 +7797,8 @@
     46391@@ -7833,8 +7800,8 @@
    4770246392                         * Check that this case label is not for another
    4770346393                         * switch()
     
    4771046400                            amount = get_indent();      /* XXX */
    4771146401                            break;
    47712 @@ -7877,9 +7841,10 @@
     46402@@ -7877,9 +7844,10 @@
    4771346403                        if (l != NULL && cin_is_cinword(l))
    4771446404                        {
     
    4772346413                        break;
    4772446414                    }
    47725 @@ -7893,8 +7858,10 @@
     46415@@ -7893,8 +7861,10 @@
    4772646416                     * ->   y = 1;
    4772746417                     */
     
    4773646426                }
    4773746427 
    47738 @@ -7904,8 +7871,8 @@
     46428@@ -7904,8 +7874,8 @@
    4773946429                 */
    4774046430                if (lookfor == LOOKFOR_CASE || lookfor == LOOKFOR_SCOPEDECL)
     
    4774746437                        curwin->w_cursor.lnum = trypos->lnum + 1;
    4774846438                        curwin->w_cursor.col = 0;
    47749 @@ -7916,7 +7883,7 @@
     46439@@ -7916,7 +7886,7 @@
    4775046440                /*
    4775146441                 * Ignore jump labels with nothing after them.
     
    4775646446                    l = after_label(ml_get_curline());
    4775746447                    if (l == NULL || cin_nocode(l))
    47758 @@ -7939,7 +7906,7 @@
     46448@@ -7939,7 +7909,7 @@
    4775946449                 * constructor initialization?
    4776046450                 */                                                 /* XXX */
     
    4776546455                    n = cin_is_cpp_baseclass(&col);
    4776646456                    l = ml_get_curline();
    47767 @@ -7962,8 +7929,7 @@
     46457@@ -7962,8 +7932,7 @@
    4776846458                    }
    4776946459                    else
     
    4777546465                }
    4777646466                else if (lookfor == LOOKFOR_CPP_BASECLASS)
    47777 @@ -8005,9 +7971,7 @@
     46467@@ -8005,9 +7974,7 @@
    4777846468                     * matching it will take us back to the start of the line.
    4777946469                     */
     
    4778646476                    /*
    4778746477                     * If we are looking for ',', we also look for matching
    47788 @@ -8015,7 +7979,7 @@
     46478@@ -8015,7 +7982,7 @@
    4778946479                     */
    4779046480                    if (trypos == NULL && terminated == ','
     
    4779546485                    if (trypos != NULL)
    4779646486                    {
    47797 @@ -8058,9 +8022,8 @@
     46487@@ -8058,9 +8025,8 @@
    4779846488                     * Get indent and pointer to text for current line,
    4779946489                     * ignoring any jump label.     XXX
     
    4780746497                        cur_amount = get_indent();
    4780846498                    /*
    47809 @@ -8075,16 +8038,16 @@
     46499@@ -8075,16 +8041,16 @@
    4781046500                    {
    4781146501                        amount = cur_amount;
     
    4782746517                            /* have to look back, whether it is a cpp base
    4782846518                             * class declaration or initialization */
    47829 @@ -8132,10 +8095,11 @@
     46519@@ -8132,10 +8098,11 @@
    4783046520                         */
    4783146521                        amount = cur_amount;
     
    4784146531                        }
    4784246532 
    47843 @@ -8169,10 +8133,9 @@
     46533@@ -8169,10 +8136,9 @@
    4784446534                                curwin->w_cursor.col =
    4784546535                                          (colnr_T)(l - ml_get_curline()) + 1;
     
    4785546545                        }
    4785646546                    }
    47857 @@ -8209,7 +8172,7 @@
     46547@@ -8209,7 +8175,7 @@
    4785846548                             * enumerations/initializations. */
    4785946549                            if (terminated == ',')
     
    4786446554 
    4786546555                                lookfor = LOOKFOR_CPP_BASECLASS;
    47866 @@ -8267,8 +8230,7 @@
     46556@@ -8267,8 +8233,7 @@
    4786746557                 * If so: Ignore until the matching "do".
    4786846558                 */
     
    4787446564                    /*
    4787546565                     * Found an unterminated line after a while ();, line up
    47876 @@ -8292,7 +8254,7 @@
     46566@@ -8292,7 +8257,7 @@
    4787746567                        lookfor = LOOKFOR_TERM;
    4787846568                        amount = get_indent();      /* XXX */
     
    4788346573                    ++whilelevel;
    4788446574                }
    47885 @@ -8385,8 +8347,8 @@
     46575@@ -8385,8 +8350,8 @@
    4788646576 term_again:
    4788746577                        l = ml_get_curline();
     
    4789446584                            /*
    4789546585                             * Check if we are on a case label now.  This is
    47896 @@ -8413,21 +8375,21 @@
     46586@@ -8413,21 +8378,21 @@
    4789746587                         *      stat;
    4789846588                         * }
     
    4792246612 
    4792346613                        /*
    47924 @@ -8443,10 +8405,9 @@
     46614@@ -8443,10 +8408,9 @@
    4792546615                                && cin_iselse(l)
    4792646616                                && whilelevel == 0)
     
    4793646626                            continue;
    4793746627                        }
    47938 @@ -8456,9 +8417,8 @@
     46628@@ -8456,9 +8420,8 @@
    4793946629                         * that block.
    4794046630                         */
     
    4794846638                            curwin->w_cursor = *trypos;
    4794946639                            /* if not "else {" check for terminated again */
    47950 @@ -8477,11 +8437,11 @@
     46640@@ -8477,11 +8440,11 @@
    4795146641 
    4795246642       /* add extra indent for a comment */
     
    4796346653 
    4796446654     /*
    47965 @@ -8502,7 +8462,7 @@
     46655@@ -8502,7 +8465,7 @@
    4796646656 
    4796746657        if (theline[0] == '{')
     
    4797246662 
    4797346663        /*
    47974 @@ -8519,11 +8479,10 @@
     46664@@ -8519,11 +8482,10 @@
    4797546665                && !cin_ends_in(theline, (char_u *)":", NULL)
    4797646666                && !cin_ends_in(theline, (char_u *)",", NULL)
     
    4798646676        else
    4798746677        {
    47988 @@ -8542,7 +8501,7 @@
     46678@@ -8542,7 +8504,7 @@
    4798946679                /*
    4799046680                 * If we're in a comment now, skip to the start of the comment.
     
    4799546685                    curwin->w_cursor.lnum = trypos->lnum + 1;
    4799646686                    curwin->w_cursor.col = 0;
    47997 @@ -8554,7 +8513,7 @@
     46687@@ -8554,7 +8516,7 @@
    4799846688                 * constructor initialization?
    4799946689                 */                                                 /* XXX */
     
    4800446694                    n = cin_is_cpp_baseclass(&col);
    4800546695                    l = ml_get_curline();
    48006 @@ -8562,8 +8521,7 @@
     46696@@ -8562,8 +8524,7 @@
    4800746697                if (n)
    4800846698                {
     
    4801446704                }
    4801546705 
    48016 @@ -8594,8 +8552,8 @@
     46706@@ -8594,8 +8555,8 @@
    4801746707                {
    4801846708                    /* take us back to opening paren */
     
    4802546715 
    4802646716                    /* For a line ending in ',' that is a continuation line go
    48027 @@ -8626,8 +8584,7 @@
     46717@@ -8626,8 +8587,7 @@
    4802846718                 * If the line looks like a function declaration, and we're
    4802946719                 * not in a comment, put it the left margin.
     
    4803546725                l = ml_get_curline();
    4803646726 
    48037 @@ -8675,10 +8632,9 @@
     46727@@ -8675,10 +8635,9 @@
    4803846728                 * line (and the ones that follow) needs to be indented as
    4803946729                 * parameters.
     
    4804846738                }
    4804946739 
    48050 @@ -8707,8 +8663,7 @@
     46740@@ -8707,8 +8666,7 @@
    4805146741                 */
    4805246742                find_last_paren(l, '(', ')');
     
    4805846748                amount = get_indent();      /* XXX */
    4805946749                break;
    48060 @@ -8716,7 +8671,7 @@
     46750@@ -8716,7 +8674,7 @@
    4806146751 
    4806246752            /* add extra indent for a comment */
     
    4806746757            /* add extra indent if the previous line ended in a backslash:
    4806846758             *        "asdfasdf\
    48069 @@ -8751,11 +8706,9 @@
     46759@@ -8751,11 +8709,9 @@
    4807046760 }
    4807146761 
     
    4808046770     char_u     *look;
    4808146771     pos_T      *theirscope;
    48082 @@ -8785,13 +8738,13 @@
     46772@@ -8785,13 +8741,13 @@
    4808346773        if (cin_iselse(look)
    4808446774                || cin_isif(look)
     
    4809646786                break;
    4809746787 
    48098 @@ -8829,7 +8782,7 @@
     46788@@ -8829,7 +8785,7 @@
    4809946789             * if it was a "while" then we need to go back to
    4810046790             * another "do", so increment whilelevel.  XXX
     
    4810546795                ++whilelevel;
    4810646796                continue;
    48107 @@ -8926,7 +8879,7 @@
     46797@@ -8926,7 +8882,7 @@
    4810846798 {
    4810946799     char_u     buf[LSIZE];
     
    4811446804     while (*word != NUL)
    4811546805     {
    48116 @@ -9174,6 +9127,8 @@
     46806@@ -9174,6 +9130,8 @@
    4811746807 /*
    4811846808  * Preserve files and exit.
     
    4812346813     void
    4812446814 preserve_exit()
    48125 @@ -9196,7 +9151,7 @@
     46815@@ -9196,7 +9154,7 @@
    4812646816     {
    4812746817        if (buf->b_ml.ml_mfp != NULL && buf->b_ml.ml_mfp->mf_fname != NULL)
     
    4813246822            out_flush();
    4813346823            ml_sync_all(FALSE, FALSE);  /* preserve all swap files */
    48134 @@ -9206,7 +9161,7 @@
     46824@@ -9206,7 +9164,7 @@
    4813546825 
    4813646826     ml_close_all(FALSE);           /* close all memfiles, without deleting */
     
    4814146831     getout(1);
    4814246832 }
    48143 @@ -10710,7 +10665,7 @@
     46833@@ -10381,9 +10339,6 @@
     46834 {
     46835     char_u     *curdir;
     46836     garray_T   path_ga;
     46837-    char_u     *files = NULL;
     46838-    char_u     *s;     /* start */
     46839-    char_u     *e;     /* end */
     46840     char_u     *paths = NULL;
     46841 
     46842     if ((curdir = alloc((unsigned)MAXPATHL)) == NULL)
     46843@@ -10396,37 +10351,13 @@
     46844     if (path_ga.ga_len == 0)
     46845        return 0;
     46846 
     46847-    paths = ga_concat_strings(&path_ga);
     46848+    paths = ga_concat_strings(&path_ga, ",");
     46849     ga_clear_strings(&path_ga);
     46850     if (paths == NULL)
     46851        return 0;
     46852 
     46853-    files = globpath(paths, pattern, (flags & EW_ICASE) ? WILD_ICASE : 0);
     46854+    globpath(paths, pattern, gap, (flags & EW_ICASE) ? WILD_ICASE : 0);
     46855     vim_free(paths);
     46856-    if (files == NULL)
     46857-       return 0;
     46858-
     46859-    /* Copy each path in files into gap */
     46860-    s = e = files;
     46861-    while (*s != NUL)
     46862-    {
     46863-       while (*e != '\n' && *e != NUL)
     46864-           e++;
     46865-       if (*e == NUL)
     46866-       {
     46867-           addfile(gap, s, flags);
     46868-           break;
     46869-       }
     46870-       else
     46871-       {
     46872-           /* *e is '\n' */
     46873-           *e = NUL;
     46874-           addfile(gap, s, flags);
     46875-           e++;
     46876-           s = e;
     46877-       }
     46878-    }
     46879-    vim_free(files);
     46880 
     46881     return gap->ga_len;
     46882 }
     46883@@ -10710,7 +10641,7 @@
    4814446884     else
    4814546885 #endif
     
    4815046890     if (buffer == NULL)
    4815146891        return 0;
    48152 @@ -10773,7 +10728,7 @@
     46892@@ -10773,7 +10704,7 @@
    4815346893        return;
    4815446894 
     
    4815946899 
    4816046900     /* Make room for another item in the file list. */
    48161 @@ -10810,13 +10765,16 @@
     46901@@ -10810,13 +10741,16 @@
    4816246902 
    4816346903 /*
     
    4817746917     char_u     *tempname;
    4817846918     char_u     *command;
    48179 @@ -10886,7 +10844,7 @@
     46919@@ -10886,7 +10820,7 @@
    4818046920        vim_free(buffer);
    4818146921        buffer = NULL;
     
    4818646926        /* Change NUL into SOH, otherwise the string is truncated. */
    4818746927        for (i = 0; i < len; ++i)
    48188 @@ -10895,6 +10853,8 @@
     46928@@ -10895,6 +10829,8 @@
    4818946929 
    4819046930        buffer[len] = NUL;      /* make sure the buffer is terminated */
     
    4819546935 done:
    4819646936     vim_free(tempname);
     46937@@ -10936,3 +10872,41 @@
     46938 {
     46939     return (p_im && stuff_empty() && typebuf_typed());
     46940 }
     46941+
     46942+/*
     46943+ * Returns the isolated name of the shell in allocated memory:
     46944+ * - Skip beyond any path.  E.g., "/usr/bin/csh -f" -> "csh -f".
     46945+ * - Remove any argument.  E.g., "csh -f" -> "csh".
     46946+ * But don't allow a space in the path, so that this works:
     46947+ *   "/usr/bin/csh --rcfile ~/.cshrc"
     46948+ * But don't do that for Windows, it's common to have a space in the path.
     46949+ */
     46950+    char_u *
     46951+get_isolated_shell_name()
     46952+{
     46953+    char_u *p;
     46954+
     46955+#ifdef WIN3264
     46956+    p = gettail(p_sh);
     46957+    p = vim_strnsave(p, (int)(skiptowhite(p) - p));
     46958+#else
     46959+    p = skiptowhite(p_sh);
     46960+    if (*p == NUL)
     46961+    {
     46962+       /* No white space, use the tail. */
     46963+       p = vim_strsave(gettail(p_sh));
     46964+    }
     46965+    else
     46966+    {
     46967+       char_u  *p1, *p2;
     46968+
     46969+       /* Find the last path separator before the space. */
     46970+       p1 = p_sh;
     46971+       for (p2 = p_sh; p2 < p; mb_ptr_adv(p2))
     46972+           if (vim_ispathsep(*p2))
     46973+               p1 = p2 + 1;
     46974+       p = vim_strnsave(p1, (int)(p - p1));
     46975+    }
     46976+#endif
     46977+    return p;
     46978+}
    4819746979diff -Naur vim74.orig/src/misc2.c vim74/src/misc2.c
    4819846980--- vim74.orig/src/misc2.c      2013-07-07 14:03:35.000000000 +0000
    48199 +++ vim74/src/misc2.c   2014-04-27 05:20:58.221771232 +0000
     46981+++ vim74/src/misc2.c   2014-06-01 00:43:15.634143166 +0000
    4820046982@@ -31,9 +31,7 @@
    4820146983     if (virtual_op != MAYBE)
     
    4829247074                *d++ = '\\';
    4829347075                if (csh_like && do_special)
    48294 @@ -3286,17 +3282,14 @@
     47076@@ -2091,29 +2087,37 @@
     47077 
     47078 /*
     47079  * For a growing array that contains a list of strings: concatenate all the
     47080- * strings with a separating comma.
     47081+ * strings with a separating "sep".
     47082  * Returns NULL when out of memory.
     47083  */
     47084     char_u *
     47085-ga_concat_strings(gap)
     47086+ga_concat_strings(gap, sep)
     47087     garray_T *gap;
     47088+    char     *sep;
     47089 {
     47090     int                i;
     47091     int                len = 0;
     47092+    int                sep_len = (int)STRLEN(sep);
     47093     char_u     *s;
     47094+    char_u     *p;
     47095 
     47096     for (i = 0; i < gap->ga_len; ++i)
     47097-       len += (int)STRLEN(((char_u **)(gap->ga_data))[i]) + 1;
     47098+       len += (int)STRLEN(((char_u **)(gap->ga_data))[i]) + sep_len;
     47099 
     47100     s = alloc(len + 1);
     47101     if (s != NULL)
     47102     {
     47103        *s = NUL;
     47104+       p = s;
     47105        for (i = 0; i < gap->ga_len; ++i)
     47106        {
     47107-           if (*s != NUL)
     47108-               STRCAT(s, ",");
     47109-           STRCAT(s, ((char_u **)(gap->ga_data))[i]);
     47110+           if (p != s)
     47111+           {
     47112+               STRCPY(p, sep);
     47113+               p += sep_len;
     47114+           }
     47115+           STRCPY(p, ((char_u **)(gap->ga_data))[i]);
     47116+           p += STRLEN(p);
     47117        }
     47118     }
     47119     return s;
     47120@@ -3286,17 +3290,14 @@
    4829547121 {
    4829647122     if (State & NORMAL)
     
    4831247138     return State;
    4831347139 }
    48314 @@ -3734,7 +3727,6 @@
     47140@@ -3734,7 +3735,6 @@
    4831547141     }
    4831647142     if (finish_op)
     
    4832047146     {
    4832147147        if (*p_sel == 'e')
    48322 @@ -3742,7 +3734,6 @@
     47148@@ -3742,7 +3742,6 @@
    4832347149        else
    4832447150            return SHAPE_IDX_V;
     
    4832847154 }
    4832947155 #endif
    48330 @@ -4695,8 +4686,8 @@
     47156@@ -4695,8 +4694,8 @@
    4833147157        else
    4833247158        {
     
    4833947165 
    4834047166            if (p > search_ctx->ffsc_fix_path)
    48341 @@ -6496,13 +6487,15 @@
     47167@@ -6496,13 +6495,15 @@
    4834247168 get4c(fd)
    4834347169     FILE       *fd;
     
    4836447190diff -Naur vim74.orig/src/move.c vim74/src/move.c
    4836547191--- vim74.orig/src/move.c       2012-11-28 17:15:42.000000000 +0000
    48366 +++ vim74/src/move.c    2014-04-27 05:20:58.225104649 +0000
     47192+++ vim74/src/move.c    2014-06-01 00:43:15.670809739 +0000
    4836747193@@ -20,6 +20,7 @@
    4836847194 #include "vim.h"
     
    4850747333diff -Naur vim74.orig/src/netbeans.c vim74/src/netbeans.c
    4850847334--- vim74.orig/src/netbeans.c   2012-06-20 17:56:18.000000000 +0000
    48509 +++ vim74/src/netbeans.c        2014-04-27 05:20:58.228438065 +0000
     47335+++ vim74/src/netbeans.c        2014-06-01 00:43:15.750809536 +0000
    4851047336@@ -2232,11 +2232,9 @@
    4851147337 
     
    4852247348diff -Naur vim74.orig/src/normal.c vim74/src/normal.c
    4852347349--- vim74.orig/src/normal.c     2013-07-14 11:24:37.000000000 +0000
    48524 +++ vim74/src/normal.c  2014-04-27 05:20:58.228438065 +0000
     47350+++ vim74/src/normal.c  2014-06-01 00:43:15.757476185 +0000
    4852547351@@ -14,17 +14,15 @@
    4852647352 
     
    4872747553 #endif
    4872847554 
     47555@@ -845,7 +812,7 @@
     47556 
     47557     if (text_locked() && (nv_cmds[idx].cmd_flags & NV_NCW))
     47558     {
     47559-       /* This command is not allowed while editing a ccmdline: beep. */
     47560+       /* This command is not allowed while editing a cmdline: beep. */
     47561        clearopbeep(oap);
     47562        text_locked_msg();
     47563        goto normal_end;
    4872947564@@ -855,7 +822,6 @@
    4873047565        goto normal_end;
     
    4905147886-               (void)do_join(oap->line_count, oap->op_type == OP_JOIN, TRUE, TRUE);
    4905247887+               (void)do_join(oap->line_count, oap->op_type == OP_JOIN,
    49053 +                                                                 TRUE, TRUE);
     47888+                                                           TRUE, TRUE, TRUE);
    4905447889                auto_format(FALSE, TRUE);
    4905547890            }
     
    5007448909        if (cap->count0 <= 1)
    5007548910            cap->count0 = 2;        /* default for join is two lines! */
     48911@@ -9413,7 +9236,7 @@
     48912        {
     48913            prep_redo(cap->oap->regname, cap->count0,
     48914                         NUL, cap->cmdchar, NUL, NUL, cap->nchar);
     48915-           (void)do_join(cap->count0, cap->nchar == NUL, TRUE, TRUE);
     48916+           (void)do_join(cap->count0, cap->nchar == NUL, TRUE, TRUE, TRUE);
     48917        }
     48918     }
     48919 }
    5007648920@@ -9425,12 +9248,10 @@
    5007748921 nv_put(cap)
     
    5015148995diff -Naur vim74.orig/src/ops.c vim74/src/ops.c
    5015248996--- vim74.orig/src/ops.c        2013-08-09 17:34:32.000000000 +0000
    50153 +++ vim74/src/ops.c     2014-04-27 05:20:58.231771480 +0000
     48997+++ vim74/src/ops.c     2014-06-01 00:43:15.767476160 +0000
    5015448998@@ -57,9 +57,7 @@
    5015548999     char_u     **y_array;      /* pointer to array of line pointers */
     
    5036849212        }
    5036949213        else                            /* delete characters between lines */
    50370 @@ -2008,11 +1974,8 @@
     49214@@ -2008,15 +1974,12 @@
    5037149215            {
    5037249216                /* delete from start of line until op_end */
     
    5038249226            }
    5038349227            if (curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count)
     49228-               (void)do_join(2, FALSE, FALSE, FALSE);
     49229+               (void)do_join(2, FALSE, FALSE, FALSE, FALSE);
     49230        }
     49231     }
     49232 
    5038449233@@ -2025,14 +1988,12 @@
    5038549234 #ifdef FEAT_VIRTUALEDIT
     
    5080849657        ;
    5080949658 }
    50810 @@ -4380,6 +4384,12 @@
     49659@@ -4319,17 +4323,20 @@
     49660 /*
     49661  * Join 'count' lines (minimal 2) at cursor position.
     49662  * When "save_undo" is TRUE save lines for undo first.
     49663- * Set "use_formatoptions" to FALSE when e.g. processing
     49664- * backspace and comment leaders should not be removed.
     49665+ * Set "use_formatoptions" to FALSE when e.g. processing backspace and comment
     49666+ * leaders should not be removed.
     49667+ * When setmark is TRUE, sets the '[ and '] mark, else, the caller is expected
     49668+ * to set those marks.
     49669  *
     49670  * return FAIL for failure, OK otherwise
     49671  */
     49672     int
     49673-do_join(count, insert_space, save_undo, use_formatoptions)
     49674+do_join(count, insert_space, save_undo, use_formatoptions, setmark)
     49675     long    count;
     49676     int            insert_space;
     49677     int            save_undo;
     49678     int            use_formatoptions UNUSED;
     49679+    int            setmark;
     49680 {
     49681     char_u     *curr = NULL;
     49682     char_u      *curr_start = NULL;
     49683@@ -4380,6 +4387,12 @@
    5081149684     for (t = 0; t < count; ++t)
    5081249685     {
    5081349686        curr = curr_start = ml_get((linenr_T)(curwin->w_cursor.lnum + t));
    50814 +       if (t == 0)
     49687+       if (t == 0 && setmark)
    5081549688+       {
    5081649689+           /* Set the '[ mark. */
     
    5082149694        if (remove_comments)
    5082249695        {
    50823 @@ -4496,6 +4506,10 @@
     49696@@ -4496,6 +4509,13 @@
    5082449697     }
    5082549698     ml_replace(curwin->w_cursor.lnum, newp, FALSE);
    5082649699 
    50827 +    /* Set the '] mark. */
    50828 +    curwin->w_buffer->b_op_end.lnum = curwin->w_cursor.lnum;
    50829 +    curwin->w_buffer->b_op_end.col  = (colnr_T)STRLEN(newp);
     49700+    if (setmark)
     49701+    {
     49702+       /* Set the '] mark. */
     49703+       curwin->w_buffer->b_op_end.lnum = curwin->w_cursor.lnum;
     49704+       curwin->w_buffer->b_op_end.col  = (colnr_T)STRLEN(newp);
     49705+    }
    5083049706+
    5083149707     /* Only report the change in the first line here, del_lines() will report
    5083249708      * the deleted line. */
    5083349709     changed_lines(curwin->w_cursor.lnum, currsize,
    50834 @@ -4631,11 +4645,9 @@
     49710@@ -4631,11 +4651,9 @@
    5083549711        return;
    5083649712     curwin->w_cursor = oap->start;
     
    5084449720     /* Set '[ mark at the start of the formatted area */
    5084549721     curbuf->b_op_start = oap->start;
    50846 @@ -4667,7 +4679,6 @@
     49722@@ -4667,7 +4685,6 @@
    5084749723        saved_cursor.lnum = 0;
    5084849724     }
     
    5085249728     {
    5085349729        win_T   *wp;
    50854 @@ -4685,7 +4696,6 @@
     49730@@ -4685,7 +4702,6 @@
    5085549731            }
    5085649732        }
     
    5086049736 
    5086149737 #if defined(FEAT_EVAL) || defined(PROTO)
    50862 @@ -4696,11 +4706,9 @@
     49738@@ -4696,11 +4712,9 @@
    5086349739 op_formatexpr(oap)
    5086449740     oparg_T    *oap;
     
    5087249748     if (fex_format(oap->start.lnum, oap->line_count, NUL) != 0)
    5087349749        /* As documented: when 'formatexpr' returns non-zero fall back to
    50874 @@ -4971,7 +4979,7 @@
     49750@@ -4971,7 +4985,7 @@
    5087549751 
    5087649752            /*
     
    5088149757            if (!is_end_par)
    5088249758            {
    50883 @@ -4981,11 +4989,25 @@
     49759@@ -4981,13 +4995,27 @@
    5088449760                if (line_count < 0 && u_save_cursor() == FAIL)
    5088549761                    break;
     
    5090649782+               }
    5090749783                curwin->w_cursor.lnum--;
    50908                 if (do_join(2, TRUE, FALSE, FALSE) == FAIL)
     49784-               if (do_join(2, TRUE, FALSE, FALSE) == FAIL)
     49785+               if (do_join(2, TRUE, FALSE, FALSE, FALSE) == FAIL)
    5090949786                {
    50910 @@ -5126,7 +5148,6 @@
     49787                    beep_flush();
     49788                    break;
     49789@@ -5126,7 +5154,6 @@
    5091149790     return FALSE;
    5091249791 }
     
    5091649795  * prepare a few things for block mode yank/delete/tilde
    5091749796  *
    50918 @@ -5285,7 +5306,6 @@
     49797@@ -5285,7 +5312,6 @@
    5091949798     bdp->textcol = (colnr_T) (pstart - line);
    5092049799     bdp->textstart = pstart;
     
    5092449803 #ifdef FEAT_RIGHTLEFT
    5092549804 static void reverse_line __ARGS((char_u *s));
    50926 @@ -5636,19 +5656,13 @@
     49805@@ -5636,19 +5662,13 @@
    5092749806        str = skipwhite(skiptowhite(str));
    5092849807        if (STRNCMP(str, "CHAR", 4) == 0)
     
    5094449823 
    5094549824     while (!(eof = viminfo_readline(virp))
    50946 @@ -5756,11 +5770,9 @@
     49825@@ -5756,11 +5776,9 @@
    5094749826            case MCHAR:
    5094849827                type = (char_u *)"CHAR";
     
    5095649835                sprintf((char *)IObuff, _("E574: Unknown register type %d"),
    5095749836                                                            y_regs[i].y_type);
    50958 @@ -5774,13 +5786,7 @@
     49837@@ -5774,13 +5792,7 @@
    5095949838        fprintf(fp, "\"%c", c);
    5096049839        if (c == execreg_lastc)
     
    5097149850        /* If max_num_lines < 0, then we save ALL the lines in the register */
    5097249851        if (max_num_lines > 0 && num_lines > max_num_lines)
    50973 @@ -5927,10 +5933,8 @@
     49852@@ -5927,10 +5939,8 @@
    5097449853 {
    5097549854     struct yankreg *old_y_previous, *old_y_current;
     
    5098249861     int                old_set_curswant;
    5098349862     pos_T      old_op_start, old_op_end;
    50984 @@ -5951,10 +5955,8 @@
     49863@@ -5951,10 +5961,8 @@
    5098549864        old_set_curswant = curwin->w_set_curswant;
    5098649865        old_op_start = curbuf->b_op_start;
     
    5099349872        oa.regname = (cbd == &clip_plus ? '+' : '*');
    5099449873        oa.op_type = OP_YANK;
    50995 @@ -5972,10 +5974,8 @@
     49874@@ -5972,10 +5980,8 @@
    5099649875        curwin->w_set_curswant = old_set_curswant;
    5099749876        curbuf->b_op_start = old_op_start;
     
    5100449883     else
    5100549884     {
    51006 @@ -6005,7 +6005,7 @@
     49885@@ -6005,7 +6011,7 @@
    5100749886 
    5100849887     clip_free_selection(cbd);
     
    5101349892 
    5101449893 /*
    51015 @@ -6078,7 +6078,6 @@
     49894@@ -6078,7 +6084,6 @@
    5101649895 }
    5101749896 
     
    5102149900  * If we have written to a clipboard register, send the text to the clipboard.
    5102249901  */
    51023 @@ -6096,7 +6095,6 @@
     49902@@ -6096,7 +6101,6 @@
    5102449903        clip_gen_set_selection(&clip_plus);
    5102549904     }
     
    5102949908 #endif /* FEAT_CLIPBOARD || PROTO */
    5103049909 
    51031 @@ -6115,7 +6113,7 @@
     49910@@ -6115,7 +6119,7 @@
    5103249911     curr = y_current;
    5103349912     y_current = &y_regs[TILDE_REGISTER];
     
    5103849917 }
    5103949918 #endif
    51040 @@ -6154,30 +6152,63 @@
     49919@@ -6154,30 +6158,63 @@
    5104149920     regname = may_get_selection(regname);
    5104249921 #endif
     
    5110849987     long       i;
    5110949988     char_u     *retval;
    51110 @@ -6187,13 +6218,11 @@
     49989@@ -6187,13 +6224,11 @@
    5111149990     /* Don't allow using an expression register inside an expression */
    5111249991     if (regname == '=')
     
    5112750006 
    5112850007     if (regname == '@')            /* "@@" is used for unnamed register */
    51129 @@ -6211,15 +6240,33 @@
     50008@@ -6211,15 +6246,33 @@
    5113050009     {
    5113150010        if (retval == NULL)
     
    5116450043      * Compute length of resulting string.
    5116550044      */
    51166 @@ -6261,6 +6308,47 @@
     50045@@ -6261,6 +6314,47 @@
    5116750046     return retval;
    5116850047 }
     
    5121250091  * Store string "str" in register "name".
    5121350092  * "maxlen" is the maximum number of bytes to use, -1 for all bytes.
    51214 @@ -6281,6 +6369,51 @@
     50093@@ -6281,6 +6375,51 @@
    5121550094 }
    5121650095 
     
    5126450143     int                name;
    5126550144     char_u     *str;
    51266 @@ -6317,45 +6450,22 @@
     50145@@ -6317,45 +6456,22 @@
    5126750146            s = concat_str(get_expr_line_src(), p);
    5126850147            vim_free(p);
     
    5128750166-    old_y_previous = y_previous;
    5128850167-    old_y_current = y_current;
    51289 +    if (init_write_reg(name, &old_y_previous, &old_y_current, must_append,
    51290 +               &yank_type) == FAIL)
    51291 +       return;
    51292  
     50168-
    5129350169-    get_yank_register(name, TRUE);
    5129450170-    if (!y_append && !must_append)
     
    5130050176-#endif
    5130150177-    str_to_reg(y_current, yank_type, str, len, block_len);
    51302 +    str_to_reg(y_current, yank_type, str, len, block_len, FALSE);
     50178+    if (init_write_reg(name, &old_y_previous, &old_y_current, must_append,
     50179+               &yank_type) == FAIL)
     50180+       return;
    5130350181 
    5130450182-# ifdef FEAT_CLIPBOARD
     
    5130650184-    may_set_selection();
    5130750185-# endif
    51308 -
     50186+    str_to_reg(y_current, yank_type, str, len, block_len, FALSE);
     50187 
    5130950188-    /* ':let @" = "val"' should change the meaning of the "" register */
    5131050189-    if (name != '"')
     
    5131550194 #endif /* FEAT_EVAL */
    5131650195 
    51317 @@ -6365,12 +6475,13 @@
     50196@@ -6365,12 +6481,13 @@
    5131850197  * is appended.
    5131950198  */
     
    5133050209     int                type;                   /* MCHAR, MLINE or MBLOCK */
    5133150210     int                lnum;
    51332 @@ -6381,16 +6492,16 @@
     50211@@ -6381,16 +6498,16 @@
    5133350212     int                extraline = 0;          /* extra line at the end */
    5133450213     int                append = FALSE;         /* append to last line in register */
     
    5135050229     else
    5135150230        type = yank_type;
    51352 @@ -6399,18 +6510,26 @@
     50231@@ -6399,18 +6516,26 @@
    5135350232      * Count the number of lines within the string
    5135450233      */
     
    5138650265 
    5138750266     /*
    51388 @@ -6425,58 +6544,65 @@
     50267@@ -6425,58 +6550,65 @@
    5138950268        pp[lnum] = y_ptr->y_array[lnum];
    5139050269     vim_free(y_ptr->y_array);
     
    5141350292-           --lnum;
    5141450293-           extra = (int)STRLEN(y_ptr->y_array[lnum]);
    51415 +           i = STRLEN(*ss);
     50294+           i = (long)STRLEN(*ss);
    5141650295+           pp[lnum] = vim_strnsave(*ss, i);
    5141750296+           if (i > maxlen)
     
    5148850367 #endif /* FEAT_CLIPBOARD || FEAT_EVAL || PROTO */
    5148950368 
    51490 @@ -6570,12 +6696,10 @@
     50369@@ -6570,12 +6702,10 @@
    5149150370     long       word_count_cursor = 0;
    5149250371     int                eol_size;
     
    5150150380     /*
    5150250381      * Compute the length of the file in characters.
    51503 @@ -6591,7 +6715,6 @@
     50382@@ -6591,7 +6721,6 @@
    5150450383        else
    5150550384            eol_size = 1;
     
    5150950388        {
    5151050389            if (lt(VIsual, curwin->w_cursor))
    51511 @@ -6635,7 +6758,6 @@
     50390@@ -6635,7 +6764,6 @@
    5151250391            }
    5151350392            line_count_selected = max_pos.lnum - min_pos.lnum + 1;
     
    5151750396        for (lnum = 1; lnum <= curbuf->b_ml.ml_line_count; ++lnum)
    5151850397        {
    51519 @@ -6648,7 +6770,6 @@
     50398@@ -6648,7 +6776,6 @@
    5152050399                last_check = byte_count + 100000L;
    5152150400            }
     
    5152550404            if (VIsual_active
    5152650405                    && lnum >= min_pos.lnum && lnum <= max_pos.lnum)
    51527 @@ -6659,13 +6780,13 @@
     50406@@ -6659,13 +6786,13 @@
    5152850407                switch (VIsual_mode)
    5152950408                {
     
    5154350422                        len = (long)bd.textlen;
    5154450423                        break;
    51545 @@ -6697,7 +6818,6 @@
     50424@@ -6697,7 +6824,6 @@
    5154650425                }
    5154750426            }
     
    5155150430                /* In non-visual mode, check for the line the cursor is on */
    5155250431                if (lnum == curwin->w_cursor.lnum)
    51553 @@ -6719,7 +6839,6 @@
     50432@@ -6719,7 +6845,6 @@
    5155450433        if (!curbuf->b_p_eol && curbuf->b_p_bin)
    5155550434            byte_count -= eol_size;
     
    5155950438        {
    5156050439            if (VIsual_mode == Ctrl_V && curwin->w_curswant < MAXCOL)
    51561 @@ -6750,7 +6869,6 @@
     50440@@ -6750,7 +6875,6 @@
    5156250441                        byte_count_cursor, byte_count);
    5156350442        }
     
    5156950448diff -Naur vim74.orig/src/option.c vim74/src/option.c
    5157050449--- vim74.orig/src/option.c     2013-07-17 19:39:13.000000000 +0000
    51571 +++ vim74/src/option.c  2014-04-27 05:20:58.235104897 +0000
     50450+++ vim74/src/option.c  2014-06-01 00:43:15.777476134 +0000
    5157250451@@ -134,6 +134,7 @@
    5157350452 #define PV_KP          OPT_BOTH(OPT_BUF(BV_KP))
     
    5159850477     {"keywordprg",  "kp",   P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
    5159950478                            (char_u *)&p_kp, PV_KP,
     50479@@ -1654,7 +1652,7 @@
     50480 #endif
     50481 #endif
     50482                                (char_u *)0L} SCRIPTID_INIT},
     50483-    {"langmap",     "lmap", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
     50484+    {"langmap",     "lmap", P_STRING|P_VI_DEF|P_COMMA|P_NODUP|P_SECURE,
     50485 #ifdef FEAT_LANGMAP
     50486                            (char_u *)&p_langmap, PV_NONE,
     50487                            {(char_u *)"",      /* unmatched } */
    5160050488@@ -1717,7 +1715,7 @@
    5160150489                            {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
     
    5165850546     check_win_options(curwin);
    5165950547     check_options();
    51660 @@ -4512,8 +4499,16 @@
     50548@@ -3817,37 +3804,7 @@
     50549     else
     50550        do_sp = !(options[idx_sp].flags & P_WAS_SET);
     50551 #endif
     50552-
     50553-    /*
     50554-     * Isolate the name of the shell:
     50555-     * - Skip beyond any path.  E.g., "/usr/bin/csh -f" -> "csh -f".
     50556-     * - Remove any argument.  E.g., "csh -f" -> "csh".
     50557-     * But don't allow a space in the path, so that this works:
     50558-     *   "/usr/bin/csh --rcfile ~/.cshrc"
     50559-     * But don't do that for Windows, it's common to have a space in the path.
     50560-     */
     50561-#ifdef WIN3264
     50562-    p = gettail(p_sh);
     50563-    p = vim_strnsave(p, (int)(skiptowhite(p) - p));
     50564-#else
     50565-    p = skiptowhite(p_sh);
     50566-    if (*p == NUL)
     50567-    {
     50568-       /* No white space, use the tail. */
     50569-       p = vim_strsave(gettail(p_sh));
     50570-    }
     50571-    else
     50572-    {
     50573-       char_u  *p1, *p2;
     50574-
     50575-       /* Find the last path separator before the space. */
     50576-       p1 = p_sh;
     50577-       for (p2 = p_sh; p2 < p; mb_ptr_adv(p2))
     50578-           if (vim_ispathsep(*p2))
     50579-               p1 = p2 + 1;
     50580-       p = vim_strnsave(p1, (int)(p - p1));
     50581-    }
     50582-#endif
     50583+    p = get_isolated_shell_name();
     50584     if (p != NULL)
     50585     {
     50586        /*
     50587@@ -3888,6 +3845,7 @@
     50588                    || fnamecmp(p, "zsh") == 0
     50589                    || fnamecmp(p, "zsh-beta") == 0
     50590                    || fnamecmp(p, "bash") == 0
     50591+                   || fnamecmp(p, "fish") == 0
     50592 #  ifdef WIN3264
     50593                    || fnamecmp(p, "cmd") == 0
     50594                    || fnamecmp(p, "sh.exe") == 0
     50595@@ -4512,8 +4470,16 @@
    5166150596                                                ((flags & P_VI_DEF) || cp_val)
    5166250597                                                 ?  VI_DEFAULT : VIM_DEFAULT];
     
    5167750612                                    || (long *)varp == &p_wcm)
    5167850613                                && (*arg == '<'
    51679 @@ -5372,6 +5367,7 @@
     50614@@ -5372,6 +5338,7 @@
    5168050615 #ifdef FEAT_CINDENT
    5168150616     check_string_option(&buf->b_p_cink);
     
    5168550620 #ifdef FEAT_AUTOCMD
    5168650621     check_string_option(&buf->b_p_ft);
    51687 @@ -5401,6 +5397,9 @@
     50622@@ -5401,6 +5368,9 @@
    5168850623     check_string_option(&buf->b_p_dict);
    5168950624     check_string_option(&buf->b_p_tsr);
     
    5169550630 
    5169650631 /*
    51697 @@ -6563,7 +6562,6 @@
     50632@@ -6563,7 +6533,6 @@
    5169850633     }
    5169950634 #endif
     
    5170350638     else if (varp == &p_sel)
    5170450639     {
    51705 @@ -6578,7 +6576,6 @@
     50640@@ -6578,7 +6547,6 @@
    5170650641        if (check_opt_strings(p_slm, p_slm_values, TRUE) != OK)
    5170750642            errmsg = e_invarg;
     
    5171150646 #ifdef FEAT_BROWSE
    5171250647     /* 'browsedir' */
    51713 @@ -6590,7 +6587,6 @@
     50648@@ -6590,7 +6558,6 @@
    5171450649     }
    5171550650 #endif
     
    5171950654     else if (varp == &p_km)
    5172050655     {
    51721 @@ -6602,7 +6598,6 @@
     50656@@ -6602,7 +6569,6 @@
    5172250657            km_startsel = (vim_strchr(p_km, 'a') != NULL);
    5172350658        }
     
    5172750662     /* 'mousemodel' */
    5172850663     else if (varp == &p_mousem)
    51729 @@ -6990,6 +6985,15 @@
     50664@@ -6990,6 +6956,15 @@
    5173050665     }
    5173150666 #endif
     
    5174350678     else
    5174450679     {
    51745 @@ -7102,6 +7106,11 @@
     50680@@ -7102,6 +7077,11 @@
    5174650681        if (varp == &(curwin->w_s->b_p_spl))
    5174750682        {
     
    5175550690            /*
    5175650691             * Source the spell/LANG.vim in 'runtimepath'.
    51757 @@ -7109,11 +7118,10 @@
     50692@@ -7109,11 +7089,10 @@
    5175850693             * Use the first name in 'spelllang' up to '_region' or
    5175950694             * '.encoding'.
     
    5176950704        }
    5177050705 #endif
    51771 @@ -7791,7 +7799,7 @@
     50706@@ -7791,7 +7770,7 @@
    5177250707     /* when 'hlsearch' is set or reset: reset no_hlsearch */
    5177350708     else if ((int *)varp == &p_hls)
     
    5177850713 #endif
    5177950714 
    51780 @@ -8338,14 +8346,24 @@
     50715@@ -8338,14 +8317,24 @@
    5178150716            curwin->w_p_fdc = 12;
    5178250717        }
     
    5180450739 #ifdef FEAT_MBYTE
    5180550740     /* 'maxcombine' */
    51806 @@ -8467,6 +8485,13 @@
     50741@@ -8467,6 +8456,13 @@
    5180750742        u_sync(TRUE);
    5180850743        p_ul = value;
     
    5181850753 #ifdef FEAT_LINEBREAK
    5181950754     /* 'numberwidth' must be positive */
    51820 @@ -8820,7 +8845,7 @@
     50755@@ -8820,7 +8816,7 @@
    5182150756 }
    5182250757 #endif
     
    5182750762  * Returns the option attributes and its value. Unlike the above function it
    5182850763  * will return either global value or local value of the option depending on
    51829 @@ -8833,7 +8858,8 @@
     50764@@ -8833,7 +8829,8 @@
    5183050765  * opt_type). Uses
    5183150766  *
    5183250767  * Returned flags:
    5183350768- *       0 hidden or unknown option
    51834 + *       0 hidden or unknown option, also option that does not have requested 
    51835 + *         type (see SREQ_* in vim.h)
     50769+ *       0 hidden or unknown option, also option that does not have requested
     50770+ *        type (see SREQ_* in vim.h)
    5183650771  *  see SOPT_* in vim.h for other flags
    5183750772  *
    5183850773  * Possible opt_type values: see SREQ_* in vim.h
    51839 @@ -8956,6 +8982,68 @@
     50774@@ -8956,6 +8953,68 @@
    5184050775 
    5184150776     return r;
     
    5190650841 
    5190750842 /*
    51908 @@ -9700,7 +9788,6 @@
     50843@@ -9700,7 +9759,6 @@
    5190950844 /*
    5191050845  * Unset local option value, similar to ":set opt<".
     
    5191450849 unset_global_local_option(name, from)
    5191550850     char_u     *name;
    51916 @@ -9773,6 +9860,14 @@
     50851@@ -9773,6 +9831,14 @@
    5191750852            clear_string_option(&((win_T *)from)->w_p_stl);
    5191850853            break;
     
    5192950864 }
    5193050865 
    51931 @@ -9821,6 +9916,10 @@
     50866@@ -9821,6 +9887,10 @@
    5193250867 #ifdef FEAT_STL_OPT
    5193350868            case PV_STL:  return (char_u *)&(curwin->w_p_stl);
     
    5194050875        return NULL; /* "cannot happen" */
    5194150876     }
    51942 @@ -9885,6 +9984,12 @@
     50877@@ -9885,6 +9955,12 @@
    5194350878        case PV_STL:    return *curwin->w_p_stl != NUL
    5194450879                                    ? (char_u *)&(curwin->w_p_stl) : p->var;
     
    5195350888 #ifdef FEAT_ARABIC
    5195450889        case PV_ARAB:   return (char_u *)&(curwin->w_p_arab);
    51955 @@ -10425,6 +10530,7 @@
     50890@@ -10425,6 +10501,7 @@
    5195650891            /* options that are normally global but also have a local value
    5195750892             * are not copied, start using the global value */
     
    5196150896            buf->b_p_gp = empty_option;
    5196250897            buf->b_p_mp = empty_option;
    51963 @@ -10457,6 +10563,9 @@
     50898@@ -10457,6 +10534,9 @@
    5196450899 #ifdef FEAT_PERSISTENT_UNDO
    5196550900            buf->b_p_udf = p_udf;
     
    5197150906            /*
    5197250907             * Don't copy the options set by ex_help(), use the saved values,
    51973 @@ -11729,9 +11838,10 @@
     50908@@ -11729,9 +11809,10 @@
    5197450909  * 'tabstop' value when 'shiftwidth' is zero.
    5197550910  */
     
    5198450919 
    5198550920 /*
    51986 @@ -11741,7 +11851,7 @@
     50921@@ -11741,7 +11822,7 @@
    5198750922     long
    5198850923 get_sts_value()
     
    5199550930diff -Naur vim74.orig/src/option.h vim74/src/option.h
    5199650931--- vim74.orig/src/option.h     2013-06-26 16:41:39.000000000 +0000
    51997 +++ vim74/src/option.h  2014-04-27 05:20:58.238438314 +0000
     50932+++ vim74/src/option.h  2014-06-01 00:43:15.780809459 +0000
    5199850933@@ -31,9 +31,9 @@
    5199950934 #     define DFLT_EFM  "%A%p^,%C%%CC-%t-%m,%Cat line number %l in file %f,%f|%l| %m"
     
    5200850943 #    endif
    5200950944 #   endif
    52010 @@ -572,9 +572,7 @@
     50945@@ -212,7 +212,8 @@
     50946 #define SHM_SEARCH     's'             /* no search hit bottom messages */
     50947 #define SHM_ATTENTION  'A'             /* no ATTENTION messages */
     50948 #define SHM_INTRO      'I'             /* intro messages */
     50949-#define SHM_ALL                "rmfixlnwaWtToOsAI" /* all possible flags for 'shm' */
     50950+#define SHM_COMPLETIONMENU  'c'                /* completion menu messages */
     50951+#define SHM_ALL                "rmfixlnwaWtToOsAIc" /* all possible flags for 'shm' */
     50952 
     50953 /* characters for p_go: */
     50954 #define GO_ASEL                'a'             /* autoselect */
     50955@@ -572,9 +573,7 @@
    5201150956 EXTERN char_u  *p_isp;         /* 'isprint' */
    5201250957 EXTERN int     p_js;           /* 'joinspaces' */
     
    5201850963 EXTERN char_u  *p_langmap;     /* 'langmap'*/
    5201950964 #endif
    52020 @@ -681,10 +679,8 @@
     50965@@ -681,10 +680,8 @@
    5202150966 #endif
    5202250967 EXTERN char_u  *p_sections;    /* 'sections' */
     
    5202950974 EXTERN char_u  *p_ssop;        /* 'sessionoptions' */
    5203050975 EXTERN unsigned        ssop_flags;
    52031 @@ -990,6 +986,7 @@
     50976@@ -990,6 +987,7 @@
    5203250977     , BV_KP
    5203350978 #ifdef FEAT_LISP
     
    5203750982     , BV_MA
    5203850983     , BV_ML
    52039 @@ -1031,6 +1028,7 @@
     50984@@ -1031,6 +1029,7 @@
    5204050985     , BV_TW
    5204150986     , BV_TX
     
    5204550990     , BV_COUNT     /* must be the last one */
    5204650991 };
    52047 @@ -1109,3 +1107,6 @@
     50992@@ -1109,3 +1108,6 @@
    5204850993     , WV_WRAP
    5204950994     , WV_COUNT     /* must be the last one */
     
    5205450999diff -Naur vim74.orig/src/os_amiga.c vim74/src/os_amiga.c
    5205551000--- vim74.orig/src/os_amiga.c   2013-05-06 02:06:04.000000000 +0000
    52056 +++ vim74/src/os_amiga.c        2014-04-27 05:20:58.238438314 +0000
     51001+++ vim74/src/os_amiga.c        2014-06-01 00:43:15.794142759 +0000
    5205751002@@ -884,8 +884,9 @@
    5205851003  * Return -1 if unknown.
     
    5206851013diff -Naur vim74.orig/src/os_dos.h vim74/src/os_dos.h
    5206951014--- vim74.orig/src/os_dos.h     2013-06-12 18:09:44.000000000 +0000
    52070 +++ vim74/src/os_dos.h  2014-04-27 05:20:58.238438314 +0000
     51015+++ vim74/src/os_dos.h  2014-06-01 00:43:15.837475982 +0000
    5207151016@@ -109,7 +109,7 @@
    5207251017 #endif
     
    5208951034diff -Naur vim74.orig/src/os_mac.h vim74/src/os_mac.h
    5209051035--- vim74.orig/src/os_mac.h     2013-05-06 02:06:04.000000000 +0000
    52091 +++ vim74/src/os_mac.h  2014-04-27 05:20:58.238438314 +0000
     51036+++ vim74/src/os_mac.h  2014-06-01 00:43:15.847475956 +0000
    5209251037@@ -16,6 +16,11 @@
    5209351038 # define OPAQUE_TOOLBOX_STRUCTS 0
     
    5211351058diff -Naur vim74.orig/src/os_msdos.c vim74/src/os_msdos.c
    5211451059--- vim74.orig/src/os_msdos.c   2013-05-06 02:06:04.000000000 +0000
    52115 +++ vim74/src/os_msdos.c        2014-04-27 05:20:58.245105145 +0000
     51060+++ vim74/src/os_msdos.c        2014-06-01 00:43:15.950809026 +0000
    5211651061@@ -2270,9 +2270,7 @@
    5211751062                default:
     
    5215551100diff -Naur vim74.orig/src/os_mswin.c vim74/src/os_mswin.c
    5215651101--- vim74.orig/src/os_mswin.c   2013-06-16 14:41:11.000000000 +0000
    52157 +++ vim74/src/os_mswin.c        2014-04-27 05:20:58.245105145 +0000
     51102+++ vim74/src/os_mswin.c        2014-06-01 00:43:15.970808975 +0000
    5215851103@@ -456,7 +456,14 @@
    5215951104     int
     
    5256351508diff -Naur vim74.orig/src/os_os2_cfg.h vim74/src/os_os2_cfg.h
    5256451509--- vim74.orig/src/os_os2_cfg.h 2010-05-15 11:04:11.000000000 +0000
    52565 +++ vim74/src/os_os2_cfg.h      2014-04-27 05:20:58.248438561 +0000
     51510+++ vim74/src/os_os2_cfg.h      2014-06-01 00:43:15.987475600 +0000
    5256651511@@ -47,7 +47,7 @@
    5256751512 #undef UNIX    /* define always by current configure script */
     
    5257551520diff -Naur vim74.orig/src/os_qnx.c vim74/src/os_qnx.c
    5257651521--- vim74.orig/src/os_qnx.c     2011-09-21 17:48:08.000000000 +0000
    52577 +++ vim74/src/os_qnx.c  2014-04-27 05:20:58.248438561 +0000
     51522+++ vim74/src/os_qnx.c  2014-06-01 00:43:16.000808899 +0000
    5257851523@@ -78,9 +78,7 @@
    5257951524                default: /* fallthrough to line type */
     
    5259851543diff -Naur vim74.orig/src/os_unix.c vim74/src/os_unix.c
    5259951544--- vim74.orig/src/os_unix.c    2013-07-03 14:32:32.000000000 +0000
    52600 +++ vim74/src/os_unix.c 2014-04-27 05:20:58.248438561 +0000
     51545+++ vim74/src/os_unix.c 2014-06-01 00:43:16.020808848 +0000
    5260151546@@ -46,6 +46,14 @@
    5260251547 static int selinux_enabled = -1;
     
    5285251797        if (*e != ':')
    5285351798            break;
    52854 @@ -5028,6 +5165,7 @@
     51799@@ -3530,6 +3667,8 @@
     51800     void
     51801 check_mouse_termcode()
     51802 {
     51803+    xterm_conflict_mouse = FALSE;
     51804+
     51805 # ifdef FEAT_MOUSE_XTERM
     51806     if (use_xterm_mouse()
     51807 # ifdef FEAT_MOUSE_URXVT
     51808@@ -3574,7 +3713,7 @@
     51809 # endif
     51810 
     51811 # ifdef FEAT_MOUSE_JSB
     51812-    /* conflicts with xterm mouse: "\033[" and "\033[M" ??? */
     51813+    /* There is no conflict, but it was disabled for xterm before. */
     51814     if (!use_xterm_mouse()
     51815 #  ifdef FEAT_GUI
     51816            && !gui.in_use
     51817@@ -3601,32 +3740,49 @@
     51818 # endif
     51819 
     51820 # ifdef FEAT_MOUSE_DEC
     51821-    /* conflicts with xterm mouse: "\033[" and "\033[M" */
     51822+    /* Conflicts with xterm mouse: "\033[" and "\033[M".
     51823+     * Also conflicts with the xterm termresponse, skip this if it was
     51824+     * requested already. */
     51825     if (!use_xterm_mouse()
     51826+#  ifdef FEAT_TERMRESPONSE
     51827+           && !did_request_esc_sequence()
     51828+#  endif
     51829 #  ifdef FEAT_GUI
     51830            && !gui.in_use
     51831 #  endif
     51832            )
     51833+    {
     51834        set_mouse_termcode(KS_DEC_MOUSE, (char_u *)(term_is_8bit(T_NAME)
     51835                     ? IF_EB("\233", CSI_STR) : IF_EB("\033[", ESC_STR "[")));
     51836+       xterm_conflict_mouse = TRUE;
     51837+    }
     51838     else
     51839        del_mouse_termcode(KS_DEC_MOUSE);
     51840 # endif
     51841 # ifdef FEAT_MOUSE_PTERM
     51842     /* same as the dec mouse */
     51843     if (!use_xterm_mouse()
     51844+#  ifdef FEAT_TERMRESPONSE
     51845+           && !did_request_esc_sequence()
     51846+#  endif
     51847 #  ifdef FEAT_GUI
     51848            && !gui.in_use
     51849 #  endif
     51850            )
     51851+    {
     51852        set_mouse_termcode(KS_PTERM_MOUSE,
     51853                                      (char_u *) IF_EB("\033[", ESC_STR "["));
     51854+       xterm_conflict_mouse = TRUE;
     51855+    }
     51856     else
     51857        del_mouse_termcode(KS_PTERM_MOUSE);
     51858 # endif
     51859 # ifdef FEAT_MOUSE_URXVT
     51860     /* same as the dec mouse */
     51861     if (use_xterm_mouse() == 3
     51862+#  ifdef FEAT_TERMRESPONSE
     51863+           && !did_request_esc_sequence()
     51864+#  endif
     51865 #  ifdef FEAT_GUI
     51866            && !gui.in_use
     51867 #  endif
     51868@@ -3641,12 +3797,13 @@
     51869            mch_setmouse(FALSE);
     51870            setmouse();
     51871        }
     51872+       xterm_conflict_mouse = TRUE;
     51873     }
     51874     else
     51875        del_mouse_termcode(KS_URXVT_MOUSE);
     51876 # endif
     51877 # ifdef FEAT_MOUSE_SGR
     51878-    /* same as the dec mouse */
     51879+    /* There is no conflict with xterm mouse */
     51880     if (use_xterm_mouse() == 4
     51881 #  ifdef FEAT_GUI
     51882            && !gui.in_use
     51883@@ -5028,6 +5185,7 @@
    5285551884     return avail;
    5285651885 }
     
    5286051889  * Wait "msec" msec until a character is available from file descriptor "fd".
    5286151890  * "msec" == 0 will check for characters once.
    52862 @@ -5327,13 +5465,7 @@
     51891@@ -5327,13 +5485,7 @@
    5286351892        }
    5286451893 # endif
     
    5287451903        if (ret == -1 && errno == EINTR)
    5287551904        {
    52876 @@ -5455,8 +5587,6 @@
     51905@@ -5455,8 +5607,6 @@
    5287751906     return (ret > 0);
    5287851907 }
     
    5288351912 /*
    5288451913  * Expand a path into all matching files and/or directories.  Handles "*",
    52885 @@ -5569,7 +5699,7 @@
     51914@@ -5569,7 +5719,7 @@
    5288651915                    continue;
    5288751916 
     
    5289251921 
    5289351922                if (--files_free == 0)
    52894 @@ -5979,7 +6109,7 @@
     51923@@ -5979,7 +6129,7 @@
    5289551924        {
    5289651925            /* If there is a NUL, set did_find_nul, else set check_spaces */
     
    5290151930            else
    5290251931                check_spaces = TRUE;
    52903 @@ -6067,7 +6197,7 @@
     51932@@ -6067,7 +6217,7 @@
    5290451933            continue;
    5290551934 
     
    5291051939 
    5291151940        p = alloc((unsigned)(STRLEN((*file)[i]) + 1 + dir));
    52912 @@ -6294,7 +6424,7 @@
     51941@@ -6294,7 +6444,7 @@
    5291351942 
    5291451943 /* Reads gpm event and adds special keys to input buf. Returns length of
     
    5292151950diff -Naur vim74.orig/src/os_unix.h vim74/src/os_unix.h
    5292251951--- vim74.orig/src/os_unix.h    2013-06-12 18:09:44.000000000 +0000
    52923 +++ vim74/src/os_unix.h 2014-04-27 05:20:58.251771978 +0000
     51952+++ vim74/src/os_unix.h 2014-06-01 00:43:16.040808797 +0000
    5292451953@@ -225,6 +225,8 @@
    5292551954 # include <starlet.h>
     
    5296251991diff -Naur vim74.orig/src/os_vms.c vim74/src/os_vms.c
    5296351992--- vim74.orig/src/os_vms.c     2010-06-26 04:03:31.000000000 +0000
    52964 +++ vim74/src/os_vms.c  2014-04-27 05:20:58.251771978 +0000
     51993+++ vim74/src/os_vms.c  2014-06-01 00:43:16.060808746 +0000
    5296551994@@ -11,6 +11,23 @@
    5296651995 
     
    5321052239diff -Naur vim74.orig/src/os_vms_conf.h vim74/src/os_vms_conf.h
    5321152240--- vim74.orig/src/os_vms_conf.h        2010-07-28 17:07:48.000000000 +0000
    53212 +++ vim74/src/os_vms_conf.h     2014-04-27 05:20:58.251771978 +0000
     52241+++ vim74/src/os_vms_conf.h     2014-06-01 00:43:16.077475370 +0000
    5321352242@@ -23,7 +23,7 @@
    5321452243 #define HAVE_DATE_TIME
     
    5325252281diff -Naur vim74.orig/src/os_win16.h vim74/src/os_win16.h
    5325352282--- vim74.orig/src/os_win16.h   2013-05-06 02:06:04.000000000 +0000
    53254 +++ vim74/src/os_win16.h        2014-04-27 05:20:58.255105394 +0000
     52283+++ vim74/src/os_win16.h        2014-06-01 00:43:16.150808517 +0000
    5325552284@@ -55,8 +55,8 @@
    5325652285 
     
    5326652295diff -Naur vim74.orig/src/os_win32.c vim74/src/os_win32.c
    5326752296--- vim74.orig/src/os_win32.c   2013-08-10 10:39:12.000000000 +0000
    53268 +++ vim74/src/os_win32.c        2014-04-27 05:20:58.255105394 +0000
     52297+++ vim74/src/os_win32.c        2014-06-01 00:43:16.187475090 +0000
    5326952298@@ -78,16 +78,6 @@
    5327052299 # endif
     
    5410053129diff -Naur vim74.orig/src/os_win32.h vim74/src/os_win32.h
    5410153130--- vim74.orig/src/os_win32.h   2013-07-21 15:53:13.000000000 +0000
    54102 +++ vim74/src/os_win32.h        2014-04-27 05:20:58.255105394 +0000
     53131+++ vim74/src/os_win32.h        2014-06-01 00:43:16.214141689 +0000
    5410353132@@ -68,7 +68,7 @@
    5410453133 #endif
     
    5413253161diff -Naur vim74.orig/src/osdef.sh vim74/src/osdef.sh
    5413353162--- vim74.orig/src/osdef.sh     2010-05-15 11:04:08.000000000 +0000
    54134 +++ vim74/src/osdef.sh  2014-04-27 05:20:58.255105394 +0000
     53163+++ vim74/src/osdef.sh  2014-06-01 00:43:16.220808339 +0000
    5413553164@@ -47,11 +47,7 @@
    5413653165 #endif
     
    5414653175 # insert a space in front of each line, so that a function name at the
    5414753176 # start of the line is matched with "[)*,      ]\1[    (]"
     53177diff -Naur vim74.orig/src/po/ca.po vim74/src/po/ca.po
     53178--- vim74.orig/src/po/ca.po     2012-01-18 18:40:35.000000000 +0000
     53179+++ vim74/src/po/ca.po  2014-06-01 00:43:16.347474683 +0000
     53180@@ -448,7 +448,7 @@
     53181 msgid "E691: Can only compare List with List"
     53182 msgstr "E691: Una llista només es pot comparar amb una llista"
     53183 
     53184-msgid "E692: Invalid operation for Lists"
     53185+msgid "E692: Invalid operation for List"
     53186 msgstr "E692: Operació no vàlida en llistes"
     53187 
     53188 msgid "E735: Can only compare Dictionary with Dictionary"
     53189diff -Naur vim74.orig/src/po/de.po vim74/src/po/de.po
     53190--- vim74.orig/src/po/de.po     2013-01-23 12:04:20.000000000 +0000
     53191+++ vim74/src/po/de.po  2014-06-01 00:43:16.460807728 +0000
     53192@@ -426,7 +426,7 @@
     53193 msgid "E691: Can only compare List with List"
     53194 msgstr "E691: Kann nur eine Liste mit einer Liste vergleichen"
     53195 
     53196-msgid "E692: Invalid operation for Lists"
     53197+msgid "E692: Invalid operation for List"
     53198 msgstr "E692: Unzulässige Operation für Listen"
     53199 
     53200 msgid "E735: Can only compare Dictionary with Dictionary"
    5414853201diff -Naur vim74.orig/src/po/eo.po vim74/src/po/eo.po
    5414953202--- vim74.orig/src/po/eo.po     2013-05-27 18:40:27.000000000 +0000
    54150 +++ vim74/src/po/eo.po  2014-04-27 05:20:58.268439058 +0000
     53203+++ vim74/src/po/eo.po  2014-06-01 00:43:16.487474326 +0000
    5415153204@@ -23,8 +23,8 @@
    5415253205 msgstr ""
     
    5420053253 msgstr "E687: Malpli da celoj ol Listeroj"
    5420153254 
     53255@@ -485,7 +491,7 @@
     53256 msgid "E691: Can only compare List with List"
     53257 msgstr "E691: Eblas nur kompari Liston kun Listo"
     53258 
     53259-msgid "E692: Invalid operation for Lists"
     53260+msgid "E692: Invalid operation for List"
     53261 msgstr "E692: Nevalida operacio de Listoj"
     53262 
     53263 msgid "E735: Can only compare Dictionary with Dictionary"
    5420253264@@ -596,13 +602,13 @@
    5420353265 msgid "&Ok"
     
    5489653958+"Ne povis agordi serĉvojon: sys.path ne estas listo\n"
    5489753959+"Vi nun devas aldoni vim.VIM_SPECIAL_PATH al sys.path"
     53960diff -Naur vim74.orig/src/po/es.po vim74/src/po/es.po
     53961--- vim74.orig/src/po/es.po     2011-05-19 10:45:41.000000000 +0000
     53962+++ vim74/src/po/es.po  2014-06-01 00:43:16.504140951 +0000
     53963@@ -582,8 +582,8 @@
     53964 msgstr "E691: Solo se puede comparar una lista con otra lista"
     53965 
     53966 #: eval.c:4298
     53967-msgid "E692: Invalid operation for Lists"
     53968-msgstr "E692: Operación inválida para listas"
     53969+msgid "E692: Invalid operation for List"
     53970+msgstr "E692: Operación inválida para lista"
     53971 
     53972 #: eval.c:4325
     53973 msgid "E735: Can only compare Dictionary with Dictionary"
     53974diff -Naur vim74.orig/src/po/fi.po vim74/src/po/fi.po
     53975--- vim74.orig/src/po/fi.po     2013-04-20 13:49:08.000000000 +0000
     53976+++ vim74/src/po/fi.po  2014-06-01 00:43:16.510807600 +0000
     53977@@ -471,7 +471,7 @@
     53978 msgid "E691: Can only compare List with List"
     53979 msgstr "E691: Listaa voi verrata vain listaan"
     53980 
     53981-msgid "E692: Invalid operation for Lists"
     53982+msgid "E692: Invalid operation for List"
     53983 msgstr "E692: Virheellinen toiminto listalle"
     53984 
     53985 msgid "E735: Can only compare Dictionary with Dictionary"
     53986diff -Naur vim74.orig/src/po/fr.po vim74/src/po/fr.po
     53987--- vim74.orig/src/po/fr.po     2013-05-27 08:41:50.000000000 +0000
     53988+++ vim74/src/po/fr.po  2014-06-01 00:43:16.527474225 +0000
     53989@@ -543,8 +543,8 @@
     53990 msgid "E691: Can only compare List with List"
     53991 msgstr "E691: Une Liste ne peut être comparée qu'avec une Liste"
     53992 
     53993-msgid "E692: Invalid operation for Lists"
     53994-msgstr "E692: Opération invalide avec les Listes"
     53995+msgid "E692: Invalid operation for List"
     53996+msgstr "E692: Opération invalide avec les Liste"
     53997 
     53998 msgid "E735: Can only compare Dictionary with Dictionary"
     53999 msgstr "E735: Un Dictionnaire ne peut être comparé qu'avec un Dictionnaire"
     54000diff -Naur vim74.orig/src/po/ga.po vim74/src/po/ga.po
     54001--- vim74.orig/src/po/ga.po     2011-05-19 10:46:33.000000000 +0000
     54002+++ vim74/src/po/ga.po  2014-06-01 00:43:16.540807524 +0000
     54003@@ -443,7 +443,7 @@
     54004 msgid "E691: Can only compare List with List"
     54005 msgstr "E691: Is féidir Liosta a chur i gcomparáid le Liosta eile amháin"
     54006 
     54007-msgid "E692: Invalid operation for Lists"
     54008+msgid "E692: Invalid operation for List"
     54009 msgstr "E692: Oibríocht neamhbhailí ar Liostaí"
     54010 
     54011 msgid "E735: Can only compare Dictionary with Dictionary"
     54012diff -Naur vim74.orig/src/po/it.po vim74/src/po/it.po
     54013--- vim74.orig/src/po/it.po     2013-08-10 11:31:45.000000000 +0000
     54014+++ vim74/src/po/it.po  2014-06-01 00:43:16.590807397 +0000
     54015@@ -477,7 +477,7 @@
     54016 msgid "E691: Can only compare List with List"
     54017 msgstr "E691: Posso confrontare una Lista solo con un'altra Lista"
     54018 
     54019-msgid "E692: Invalid operation for Lists"
     54020+msgid "E692: Invalid operation for List"
     54021 msgstr "E692: Operazione non valida per Liste"
     54022 
     54023 msgid "E735: Can only compare Dictionary with Dictionary"
     54024diff -Naur vim74.orig/src/po/ja.euc-jp.po vim74/src/po/ja.euc-jp.po
     54025--- vim74.orig/src/po/ja.euc-jp.po      2013-07-06 10:53:48.000000000 +0000
     54026+++ vim74/src/po/ja.euc-jp.po   2014-06-01 00:43:16.594140721 +0000
     54027@@ -3,7 +3,7 @@
     54028 # Do ":help uganda"  in Vim to read copying and usage conditions.
     54029 # Do ":help credits" in Vim to see a list of people who contributed.
     54030 #
     54031-# Last Change: 2013 Jul 06
     54032+# Last Change: 2014 May 13
     54033 #
     54034 # Copyright (C) 2001-13 MURAOKA Taro <koron.kaoriya@gmail.com>
     54035 # THIS FILE IS DISTRIBUTED UNDER THE VIM LICENSE.
     54036@@ -479,7 +479,7 @@
     54037 msgid "E691: Can only compare List with List"
     54038 msgstr "E691: ¥ê¥¹¥È·¿€Ï¥ê¥¹¥È·¿€È€·€«Èæ³Ó€Ç€­€Þ€»€ó"
     54039 
     54040-msgid "E692: Invalid operation for Lists"
     54041+msgid "E692: Invalid operation for List"
     54042 msgstr "E692: ¥ê¥¹¥È·¿€Ë€Ï̵žú€ÊÁàºî€Ç€¹"
     54043 
     54044 msgid "E735: Can only compare Dictionary with Dictionary"
     54045diff -Naur vim74.orig/src/po/ja.po vim74/src/po/ja.po
     54046--- vim74.orig/src/po/ja.po     2013-07-06 06:04:57.000000000 +0000
     54047+++ vim74/src/po/ja.po  2014-06-01 00:43:16.640807269 +0000
     54048@@ -3,7 +3,7 @@
     54049 # Do ":help uganda"  in Vim to read copying and usage conditions.
     54050 # Do ":help credits" in Vim to see a list of people who contributed.
     54051 #
     54052-# Last Change: 2013 Jul 06
     54053+# Last Change: 2014 May 13
     54054 #
     54055 # Copyright (C) 2001-13 MURAOKA Taro <koron.kaoriya@gmail.com>
     54056 # THIS FILE IS DISTRIBUTED UNDER THE VIM LICENSE.
     54057@@ -479,7 +479,7 @@
     54058 msgid "E691: Can only compare List with List"
     54059 msgstr "E691: リスト型はリスト型ずしか比范できたせん"
     54060 
     54061-msgid "E692: Invalid operation for Lists"
     54062+msgid "E692: Invalid operation for List"
     54063 msgstr "E692: リスト型には無効な操䜜です"
     54064 
     54065 msgid "E735: Can only compare Dictionary with Dictionary"
     54066diff -Naur vim74.orig/src/po/ja.sjis.po vim74/src/po/ja.sjis.po
     54067--- vim74.orig/src/po/ja.sjis.po        2013-08-10 12:28:27.000000000 +0000
     54068+++ vim74/src/po/ja.sjis.po     2014-06-01 00:43:16.647473919 +0000
     54069@@ -3,7 +3,7 @@
     54070 # Do ":help uganda"  in Vim to read copying and usage conditions.
     54071 # Do ":help credits" in Vim to see a list of people who contributed.
     54072 #
     54073-# Last Change: 2013 Jul 06
     54074+# Last Change: 2014 May 13
     54075 #
     54076 # Copyright (C) 2001-13 MURAOKA Taro <koron.kaoriya@gmail.com>
     54077 # THIS FILE IS DISTRIBUTED UNDER THE VIM LICENSE.
     54078@@ -479,7 +479,7 @@
     54079 msgid "E691: Can only compare List with List"
     54080 msgstr "E691: ƒŠƒXƒgŒ^‚̓ŠƒXƒgŒ^‚Æ‚µ‚©”äŠr‚Å‚«‚Ü‚¹‚ñ"
     54081 
     54082-msgid "E692: Invalid operation for Lists"
     54083+msgid "E692: Invalid operation for List"
     54084 msgstr "E692: ƒŠƒXƒgŒ^‚É‚Í–³Œø‚È‘€ì‚Å‚·"
     54085 
     54086 msgid "E735: Can only compare Dictionary with Dictionary"
     54087diff -Naur vim74.orig/src/po/ko.UTF-8.po vim74/src/po/ko.UTF-8.po
     54088--- vim74.orig/src/po/ko.UTF-8.po       2011-05-19 10:47:30.000000000 +0000
     54089+++ vim74/src/po/ko.UTF-8.po    2014-06-01 00:43:16.650807244 +0000
     54090@@ -462,7 +462,7 @@
     54091 msgid "E691: Can only compare List with List"
     54092 msgstr "E691: List는 List와만 비교할 수 있습니닀"
     54093 
     54094-msgid "E692: Invalid operation for Lists"
     54095+msgid "E692: Invalid operation for List"
     54096 msgstr "E692: List에 대한 잘못된 동작"
     54097 
     54098 msgid "E735: Can only compare Dictionary with Dictionary"
     54099diff -Naur vim74.orig/src/po/ko.po vim74/src/po/ko.po
     54100--- vim74.orig/src/po/ko.po     2011-05-19 10:47:53.000000000 +0000
     54101+++ vim74/src/po/ko.po  2014-06-01 00:43:16.657473894 +0000
     54102@@ -462,7 +462,7 @@
     54103 msgid "E691: Can only compare List with List"
     54104 msgstr "E691: ListŽÂ List¿Ížž ºñ±³ÇÒ Œö ÀÖœÀŽÏŽÙ"
     54105 
     54106-msgid "E692: Invalid operation for Lists"
     54107+msgid "E692: Invalid operation for List"
     54108 msgstr "E692: List¿¡ ŽëÇÑ ÀßžøµÈ µ¿ÀÛ"
     54109 
     54110 msgid "E735: Can only compare Dictionary with Dictionary"
     54111diff -Naur vim74.orig/src/po/nb.po vim74/src/po/nb.po
     54112--- vim74.orig/src/po/nb.po     2011-05-19 11:12:47.000000000 +0000
     54113+++ vim74/src/po/nb.po  2014-06-01 00:43:16.660807218 +0000
     54114@@ -456,8 +456,8 @@
     54115 msgid "E691: Can only compare List with List"
     54116 msgstr "E691: Kan bare sammenligne liste med liste"
     54117 
     54118-msgid "E692: Invalid operation for Lists"
     54119-msgstr "E692: Ugyldig operasjon for lister"
     54120+msgid "E692: Invalid operation for List"
     54121+msgstr "E692: Ugyldig operasjon for liste"
     54122 
     54123 msgid "E735: Can only compare Dictionary with Dictionary"
     54124 msgstr "E735: Kan bare sammenligne ordliste med ordliste"
     54125diff -Naur vim74.orig/src/po/nl.po vim74/src/po/nl.po
     54126--- vim74.orig/src/po/nl.po     2013-07-09 12:55:16.000000000 +0000
     54127+++ vim74/src/po/nl.po  2014-06-01 00:43:16.667473868 +0000
     54128@@ -458,8 +458,8 @@
     54129 msgid "E691: Can only compare List with List"
     54130 msgstr "E691: List kan alleen met een Lijst worden vergeleken"
     54131 
     54132-msgid "E692: Invalid operation for Lists"
     54133-msgstr "E692: ongeldige bewerking voor Listen"
     54134+msgid "E692: Invalid operation for List"
     54135+msgstr "E692: ongeldige bewerking voor List"
     54136 
     54137 msgid "E735: Can only compare Dictionary with Dictionary"
     54138 msgstr "E735: Dictionary kan alleen met Woordenboek worden vergeleken"
     54139diff -Naur vim74.orig/src/po/no.po vim74/src/po/no.po
     54140--- vim74.orig/src/po/no.po     2011-05-19 10:48:14.000000000 +0000
     54141+++ vim74/src/po/no.po  2014-06-01 00:43:16.670807193 +0000
     54142@@ -456,8 +456,8 @@
     54143 msgid "E691: Can only compare List with List"
     54144 msgstr "E691: Kan bare sammenligne liste med liste"
     54145 
     54146-msgid "E692: Invalid operation for Lists"
     54147-msgstr "E692: Ugyldig operasjon for lister"
     54148+msgid "E692: Invalid operation for List"
     54149+msgstr "E692: Ugyldig operasjon for liste"
     54150 
     54151 msgid "E735: Can only compare Dictionary with Dictionary"
     54152 msgstr "E735: Kan bare sammenligne ordliste med ordliste"
     54153diff -Naur vim74.orig/src/po/pl.UTF-8.po vim74/src/po/pl.UTF-8.po
     54154--- vim74.orig/src/po/pl.UTF-8.po       2013-07-09 12:25:44.000000000 +0000
     54155+++ vim74/src/po/pl.UTF-8.po    2014-06-01 00:43:16.677473843 +0000
     54156@@ -14,7 +14,7 @@
     54157 "Last-Translator: Mikolaj Machowski <mikmach@wp.pl>\n"
     54158 "Language: pl\n"
     54159 "MIME-Version: 1.0\n"
     54160-"Content-Type: text/plain; charset=UTF-8\n"
     54161+"Content-Type: text/plain; charset=utf-8\n"
     54162 "Content-Transfer-Encoding: 8bit\n"
     54163 "X-Generator: Lokalize 1.0\n"
     54164 "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
     54165@@ -475,7 +475,7 @@
     54166 msgid "E691: Can only compare List with List"
     54167 msgstr "E691: Listę mogę porównać tylko z ListÄ
     54168"
     54169 
     54170-msgid "E692: Invalid operation for Lists"
     54171+msgid "E692: Invalid operation for List"
     54172 msgstr "E692: Nieprawidłowa operacja dla Listy"
     54173 
     54174 msgid "E735: Can only compare Dictionary with Dictionary"
     54175diff -Naur vim74.orig/src/po/pl.cp1250.po vim74/src/po/pl.cp1250.po
     54176--- vim74.orig/src/po/pl.cp1250.po      2013-08-10 12:28:27.000000000 +0000
     54177+++ vim74/src/po/pl.cp1250.po   2014-06-01 00:43:16.684140492 +0000
     54178@@ -14,7 +14,7 @@
     54179 "Last-Translator: Mikolaj Machowski <mikmach@wp.pl>\n"
     54180 "Language: pl\n"
     54181 "MIME-Version: 1.0\n"
     54182-"Content-Type: text/plain; charset=CP1250\n"
     54183+"Content-Type: text/plain; charset=cp1250\n"
     54184 "Content-Transfer-Encoding: 8bit\n"
     54185 "X-Generator: Lokalize 1.0\n"
     54186 "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
     54187@@ -475,7 +475,7 @@
     54188 msgid "E691: Can only compare List with List"
     54189 msgstr "E691: Listê mogê porównaæ tylko z List¹"
     54190 
     54191-msgid "E692: Invalid operation for Lists"
     54192+msgid "E692: Invalid operation for List"
     54193 msgstr "E692: Nieprawid³owa operacja dla Listy"
     54194 
     54195 msgid "E735: Can only compare Dictionary with Dictionary"
     54196diff -Naur vim74.orig/src/po/pl.po vim74/src/po/pl.po
     54197--- vim74.orig/src/po/pl.po     2013-07-09 12:25:10.000000000 +0000
     54198+++ vim74/src/po/pl.po  2014-06-01 00:43:16.690807142 +0000
     54199@@ -475,7 +475,7 @@
     54200 msgid "E691: Can only compare List with List"
     54201 msgstr "E691: Listê mogê porównaæ tylko z List±"
     54202 
     54203-msgid "E692: Invalid operation for Lists"
     54204+msgid "E692: Invalid operation for List"
     54205 msgstr "E692: Nieprawid³owa operacja dla Listy"
     54206 
     54207 msgid "E735: Can only compare Dictionary with Dictionary"
     54208diff -Naur vim74.orig/src/po/pt_BR.po vim74/src/po/pt_BR.po
     54209--- vim74.orig/src/po/pt_BR.po  2011-05-19 10:49:11.000000000 +0000
     54210+++ vim74/src/po/pt_BR.po       2014-06-01 00:43:16.697473792 +0000
     54211@@ -438,8 +438,8 @@
     54212 msgid "E691: Can only compare List with List"
     54213 msgstr "E691: Uma Lista só pode ser comparada com outra Lista"
     54214 
     54215-msgid "E692: Invalid operation for Lists"
     54216-msgstr "E692: Operação inválida para Listas"
     54217+msgid "E692: Invalid operation for List"
     54218+msgstr "E692: Operação inválida para Lista"
     54219 
     54220 msgid "E735: Can only compare Dictionary with Dictionary"
     54221 msgstr "E735: Um Dicionário só pode ser comparado com outro Dicionário"
    5489854222diff -Naur vim74.orig/src/po/ru.cp1251.po vim74/src/po/ru.cp1251.po
    5489954223--- vim74.orig/src/po/ru.cp1251.po      2013-08-10 12:28:27.000000000 +0000
    54900 +++ vim74/src/po/ru.cp1251.po   2014-04-27 05:20:58.305106636 +0000
     54224+++ vim74/src/po/ru.cp1251.po   2014-06-01 00:43:16.704140441 +0000
    5490154225@@ -3,14 +3,14 @@
    5490254226 # Îá óñëîâèÿõ èñïîëüçîâàíèÿ ÷èòàéòå â ðåäàêòîðå Vim ":help uganda"
     
    5493754261 msgstr "W14: Ïðåäóïðåæäåíèå: ïåðåïîëíåíèå ñïèñêà èìží ôàéëîâ"
    5493854262 
     54263@@ -474,7 +474,7 @@
     54264 msgid "E691: Can only compare List with List"
     54265 msgstr "E691: Ñïèñîê ìîæíî ñðàâíèâàòü òîëüêî ñî ñïèñêîì"
     54266 
     54267-msgid "E692: Invalid operation for Lists"
     54268+msgid "E692: Invalid operation for List"
     54269 msgstr "E692: Íåäîïóñòèìàÿ îïåðàöèÿ äëÿ ñïèñêîâ"
     54270 
     54271 msgid "E735: Can only compare Dictionary with Dictionary"
    5493954272@@ -569,7 +569,7 @@
    5494054273 msgstr "E808: Òðåáóåòñÿ öåëîå ÷èñëî èëè ñ ïëàâàþùåé òî÷êîé"
     
    5515054483diff -Naur vim74.orig/src/po/ru.po vim74/src/po/ru.po
    5515154484--- vim74.orig/src/po/ru.po     2013-07-09 12:36:10.000000000 +0000
    55152 +++ vim74/src/po/ru.po  2014-04-27 05:20:58.308440052 +0000
     54485+++ vim74/src/po/ru.po  2014-06-01 00:43:16.710807091 +0000
    5515354486@@ -3,14 +3,14 @@
    5515454487 # Об услПвОяÑ
     
    5519254525 msgstr "W14: ПреЎупрежЎеМОе: перепПлМеМОе спОска ОЌёМ файлПв"
    5519354526 
     54527@@ -474,7 +474,7 @@
     54528 msgid "E691: Can only compare List with List"
     54529 msgstr "E691: СпОсПк ЌПжМП сравМОвать тПлькП сП спОскПЌ"
     54530 
     54531-msgid "E692: Invalid operation for Lists"
     54532+msgid "E692: Invalid operation for List"
     54533 msgstr "E692: НеЎПпустОЌая ПперацОя Ўля спОскПв"
     54534 
     54535 msgid "E735: Can only compare Dictionary with Dictionary"
    5519454536@@ -569,7 +569,7 @@
    5519554537 msgstr "E808: Требуется целПе чОслП ОлО с плавающей тПчкПй"
     
    5540854750 msgstr "НевПзЌПжМП уЎалОть атрОбуты vim.List"
    5540954751 
     54752diff -Naur vim74.orig/src/po/sk.cp1250.po vim74/src/po/sk.cp1250.po
     54753--- vim74.orig/src/po/sk.cp1250.po      2013-08-10 12:28:27.000000000 +0000
     54754+++ vim74/src/po/sk.cp1250.po   2014-06-01 00:43:16.734140365 +0000
     54755@@ -414,8 +414,8 @@
     54756 msgid "E691: Can only compare List with List"
     54757 msgstr "E691: Porovnáva možno iba Zoznam so Zoznamom (List with List)"
     54758 
     54759-msgid "E692: Invalid operation for Lists"
     54760-msgstr "E692: Neplatná operácia pre Zoznamy (Lists)"
     54761+msgid "E692: Invalid operation for List"
     54762+msgstr "E692: Neplatná operácia pre Zoznamy (List)"
     54763 
     54764 msgid "E735: Can only compare Dictionary with Dictionary"
     54765 msgstr "E735: Porovnáva možno iba Slovník so Slovníkom (Dictionary with Dictionary)"
     54766diff -Naur vim74.orig/src/po/sk.po vim74/src/po/sk.po
     54767--- vim74.orig/src/po/sk.po     2011-05-19 10:50:14.000000000 +0000
     54768+++ vim74/src/po/sk.po  2014-06-01 00:43:16.740807015 +0000
     54769@@ -414,8 +414,8 @@
     54770 msgid "E691: Can only compare List with List"
     54771 msgstr "E691: Porovnáva» moŸno iba Zoznam so Zoznamom (List with List)"
     54772 
     54773-msgid "E692: Invalid operation for Lists"
     54774-msgstr "E692: Neplatná operácia pre Zoznamy (Lists)"
     54775+msgid "E692: Invalid operation for List"
     54776+msgstr "E692: Neplatná operácia pre Zoznamy (List)"
     54777 
     54778 msgid "E735: Can only compare Dictionary with Dictionary"
     54779 msgstr "E735: Porovnáva» moŸno iba Slovník so Slovníkom (Dictionary with Dictionary)"
     54780diff -Naur vim74.orig/src/po/sv.po vim74/src/po/sv.po
     54781--- vim74.orig/src/po/sv.po     2011-05-19 10:50:27.000000000 +0000
     54782+++ vim74/src/po/sv.po  2014-06-01 00:43:16.744140339 +0000
     54783@@ -433,8 +433,8 @@
     54784 msgid "E691: Can only compare List with List"
     54785 msgstr "E691: Kan bara jämföra Lista med Lista"
     54786 
     54787-msgid "E692: Invalid operation for Lists"
     54788-msgstr "E692: Ogiltig operation för Listor"
     54789+msgid "E692: Invalid operation for List"
     54790+msgstr "E692: Ogiltig operation för Lista"
     54791 
     54792 msgid "E735: Can only compare Dictionary with Dictionary"
     54793 msgstr "E735: Kan bara jämföra Tabell med Tabell"
    5541054794diff -Naur vim74.orig/src/po/uk.cp1251.po vim74/src/po/uk.cp1251.po
    5541154795--- vim74.orig/src/po/uk.cp1251.po      2013-08-10 12:28:27.000000000 +0000
    55412 +++ vim74/src/po/uk.cp1251.po   2014-04-27 05:20:58.315106883 +0000
     54796+++ vim74/src/po/uk.cp1251.po   2014-06-01 00:43:16.754140314 +0000
    5541354797@@ -2,19 +2,17 @@
    5541454798 # Ukrainian Vim translation [uk]
     
    5545554839 msgstr "E687: Ö³ëåé ìåíøå, í³æ åëåìåíò³â ñïèñêó"
    5545654840 
     54841@@ -477,7 +482,7 @@
     54842 msgid "E691: Can only compare List with List"
     54843 msgstr "E691: Ñïèñîê ìîæíà ïîð³âíÿòè ò³ëüêè ç³ ñïèñêîì"
     54844 
     54845-msgid "E692: Invalid operation for Lists"
     54846+msgid "E692: Invalid operation for List"
     54847 msgstr "E692: Íåêîðåêòíà îïåðàö³ÿ íàä ñïèñêîì"
     54848 
     54849 msgid "E735: Can only compare Dictionary with Dictionary"
    5545754850@@ -594,16 +599,16 @@
    5545854851 msgid "&Ok"
     
    5624355636diff -Naur vim74.orig/src/po/uk.po vim74/src/po/uk.po
    5624455637--- vim74.orig/src/po/uk.po     2013-01-17 12:11:55.000000000 +0000
    56245 +++ vim74/src/po/uk.po  2014-04-27 05:20:58.318440300 +0000
     55638+++ vim74/src/po/uk.po  2014-06-01 00:43:16.790806887 +0000
    5624655639@@ -2,19 +2,17 @@
    5624755640 # Ukrainian Vim translation [uk]
     
    5628955682 msgstr "E687: Њілей ЌеМше, Між елеЌеМтів спОску"
    5629055683 
     55684@@ -477,7 +482,7 @@
     55685 msgid "E691: Can only compare List with List"
     55686 msgstr "E691: СпОсПк ЌПжМа пПрівМятО тількО зі спОскПЌ"
     55687 
     55688-msgid "E692: Invalid operation for Lists"
     55689+msgid "E692: Invalid operation for List"
     55690 msgstr "E692: НекПректМа Пперація МаЎ спОскПЌ"
     55691 
     55692 msgid "E735: Can only compare Dictionary with Dictionary"
    5629155693@@ -594,16 +599,16 @@
    5629255694 msgid "&Ok"
     
    5708456486: sys.path Ме спОсПк\n"
    5708556487+"Вас сліЎ ЎПЎатО vim.VIM_SPECIAL_PATH ЎП sys.path"
     56488diff -Naur vim74.orig/src/po/zh_CN.UTF-8.po vim74/src/po/zh_CN.UTF-8.po
     56489--- vim74.orig/src/po/zh_CN.UTF-8.po    2012-04-20 11:48:11.000000000 +0000
     56490+++ vim74/src/po/zh_CN.UTF-8.po 2014-06-01 00:43:16.830806785 +0000
     56491@@ -434,7 +434,7 @@
     56492 msgid "E691: Can only compare List with List"
     56493 msgstr "E691: 只胜比蟃 List 和 List"
     56494 
     56495-msgid "E692: Invalid operation for Lists"
     56496+msgid "E692: Invalid operation for List"
     56497 msgstr "E692: 对 List 无效的操䜜"
     56498 
     56499 msgid "E735: Can only compare Dictionary with Dictionary"
     56500diff -Naur vim74.orig/src/po/zh_CN.cp936.po vim74/src/po/zh_CN.cp936.po
     56501--- vim74.orig/src/po/zh_CN.cp936.po    2013-08-10 12:28:27.000000000 +0000
     56502+++ vim74/src/po/zh_CN.cp936.po 2014-06-01 00:43:16.834140110 +0000
     56503@@ -435,7 +435,7 @@
     56504 msgid "E691: Can only compare List with List"
     56505 msgstr "E691: Ö»ÄÜ±ÈœÏ List ºÍ List"
     56506 
     56507-msgid "E692: Invalid operation for Lists"
     56508+msgid "E692: Invalid operation for List"
     56509 msgstr "E692: ¶Ô List ÎÞЧµÄ²Ù×÷"
     56510 
     56511 msgid "E735: Can only compare Dictionary with Dictionary"
     56512@@ -2896,7 +2896,7 @@
     56513 msgstr "--remote <files>\tÈçÓпÉÄÜ£¬ÔÚ Vim ·þÎñÆ÷ÉÏ±àŒ­ÎÄŒþ <files>"
     56514 
     56515 msgid "--remote-silent <files>  Same, don't complain if there is no server"
     56516-msgstr "--remote-silent <files>  ͬÉÏ£¬ÕÒ²»µœ·þÎñÆ÷ʱ²»±§Ô¹"
     56517+msgstr "--remote-silent <files>  ͬÉÏ£¬ÕÒ²»µœ·þÎñÆ÷ʱ»±§Ô¹"
     56518 
     56519 msgid ""
     56520 "--remote-wait <files>  As --remote but wait for files to have been edited"
     56521diff -Naur vim74.orig/src/po/zh_CN.po vim74/src/po/zh_CN.po
     56522--- vim74.orig/src/po/zh_CN.po  2011-05-19 10:52:13.000000000 +0000
     56523+++ vim74/src/po/zh_CN.po       2014-06-01 00:43:16.840806760 +0000
     56524@@ -435,7 +435,7 @@
     56525 msgid "E691: Can only compare List with List"
     56526 msgstr "E691: Ö»ÄÜ±ÈœÏ List ºÍ List"
     56527 
     56528-msgid "E692: Invalid operation for Lists"
     56529+msgid "E692: Invalid operation for List"
     56530 msgstr "E692: ¶Ô List ÎÞЧµÄ²Ù×÷"
     56531 
     56532 msgid "E735: Can only compare Dictionary with Dictionary"
    5708656533diff -Naur vim74.orig/src/popupmnu.c vim74/src/popupmnu.c
    5708756534--- vim74.orig/src/popupmnu.c   2011-08-17 16:04:28.000000000 +0000
    57088 +++ vim74/src/popupmnu.c        2014-04-27 05:20:58.328440548 +0000
     56535+++ vim74/src/popupmnu.c        2014-06-01 00:43:16.890806633 +0000
    5708956536@@ -282,6 +282,10 @@
    5709056537     int                round;
     
    5711156558diff -Naur vim74.orig/src/proto/blowfish.pro vim74/src/proto/blowfish.pro
    5711256559--- vim74.orig/src/proto/blowfish.pro   2013-08-10 11:37:06.000000000 +0000
    57113 +++ vim74/src/proto/blowfish.pro        2014-04-27 05:20:58.328440548 +0000
     56560+++ vim74/src/proto/blowfish.pro        2014-06-01 00:43:16.927473206 +0000
    5711456561@@ -1,6 +1,6 @@
    5711556562 /* blowfish.c */
     
    5712256569diff -Naur vim74.orig/src/proto/eval.pro vim74/src/proto/eval.pro
    5712356570--- vim74.orig/src/proto/eval.pro       2013-08-10 11:37:09.000000000 +0000
    57124 +++ vim74/src/proto/eval.pro    2014-04-27 05:20:58.331773964 +0000
    57125 @@ -60,6 +60,7 @@
     56571+++ vim74/src/proto/eval.pro    2014-06-01 00:43:16.980806403 +0000
     56572@@ -59,7 +59,8 @@
     56573 int list_append_dict __ARGS((list_T *list, dict_T *dict));
    5712656574 int list_append_string __ARGS((list_T *l, char_u *str, int len));
    5712756575 int list_insert_tv __ARGS((list_T *l, typval_T *tv, listitem_T *item));
    57128  void list_remove __ARGS((list_T *l, listitem_T *item, listitem_T *item2));
     56576-void list_remove __ARGS((list_T *l, listitem_T *item, listitem_T *item2));
     56577+void vimlist_remove __ARGS((list_T *l, listitem_T *item, listitem_T *item2));
    5712956578+void list_insert __ARGS((list_T *l, listitem_T *ni, listitem_T *item));
    5713056579 int garbage_collect __ARGS((void));
     
    5713356582diff -Naur vim74.orig/src/proto/ex_cmds2.pro vim74/src/proto/ex_cmds2.pro
    5713456583--- vim74.orig/src/proto/ex_cmds2.pro   2013-08-10 11:37:10.000000000 +0000
    57135 +++ vim74/src/proto/ex_cmds2.pro        2014-04-27 05:20:58.331773964 +0000
     56584+++ vim74/src/proto/ex_cmds2.pro        2014-06-01 00:43:17.000806353 +0000
    5713656585@@ -35,7 +35,7 @@
    5713756586 int prof_def_func __ARGS((void));
     
    5714556594diff -Naur vim74.orig/src/proto/ex_docmd.pro vim74/src/proto/ex_docmd.pro
    5714656595--- vim74.orig/src/proto/ex_docmd.pro   2013-08-10 11:37:10.000000000 +0000
    57147 +++ vim74/src/proto/ex_docmd.pro        2014-04-27 05:20:58.331773964 +0000
     56596+++ vim74/src/proto/ex_docmd.pro        2014-06-01 00:43:17.007473002 +0000
    5714856597@@ -54,4 +54,5 @@
    5714956598 int put_line __ARGS((FILE *fd, char *s));
     
    5715456603diff -Naur vim74.orig/src/proto/ex_eval.pro vim74/src/proto/ex_eval.pro
    5715556604--- vim74.orig/src/proto/ex_eval.pro    2013-08-10 11:37:10.000000000 +0000
    57156 +++ vim74/src/proto/ex_eval.pro 2014-04-27 05:20:58.331773964 +0000
     56605+++ vim74/src/proto/ex_eval.pro 2014-06-01 00:43:17.020806302 +0000
    5715756606@@ -4,8 +4,10 @@
    5715856607 int should_abort __ARGS((int retcode));
     
    5716656615 void report_make_pending __ARGS((int pending, void *value));
    5716756616 void report_resume_pending __ARGS((int pending, void *value));
     56617diff -Naur vim74.orig/src/proto/ex_getln.pro vim74/src/proto/ex_getln.pro
     56618--- vim74.orig/src/proto/ex_getln.pro   2013-08-10 11:37:11.000000000 +0000
     56619+++ vim74/src/proto/ex_getln.pro        2014-06-01 00:43:17.020806302 +0000
     56620@@ -32,7 +32,7 @@
     56621 void set_cmd_context __ARGS((expand_T *xp, char_u *str, int len, int col));
     56622 int expand_cmdline __ARGS((expand_T *xp, char_u *str, int col, int *matchcount, char_u ***matches));
     56623 int ExpandGeneric __ARGS((expand_T *xp, regmatch_T *regmatch, int *num_file, char_u ***file, char_u *((*func)(expand_T *, int)), int escaped));
     56624-char_u *globpath __ARGS((char_u *path, char_u *file, int expand_options));
     56625+void globpath __ARGS((char_u *path, char_u *file, garray_T *ga, int expand_options));
     56626 void init_history __ARGS((void));
     56627 int get_histtype __ARGS((char_u *name));
     56628 void add_to_history __ARGS((int histype, char_u *new_entry, int in_map, int sep));
    5716856629diff -Naur vim74.orig/src/proto/getchar.pro vim74/src/proto/getchar.pro
    5716956630--- vim74.orig/src/proto/getchar.pro    2013-08-10 11:37:12.000000000 +0000
    57170 +++ vim74/src/proto/getchar.pro 2014-04-27 05:20:58.335107381 +0000
     56631+++ vim74/src/proto/getchar.pro 2014-06-01 00:43:17.060806200 +0000
    5717156632@@ -1,8 +1,9 @@
    5717256633 /* getchar.c */
     
    5718256643diff -Naur vim74.orig/src/proto/misc1.pro vim74/src/proto/misc1.pro
    5718356644--- vim74.orig/src/proto/misc1.pro      2013-08-10 11:37:20.000000000 +0000
    57184 +++ vim74/src/proto/misc1.pro   2014-04-27 05:20:58.345107629 +0000
     56645+++ vim74/src/proto/misc1.pro   2014-06-01 00:43:17.457471856 +0000
    5718556646@@ -69,6 +69,7 @@
    5718656647 char_u *getnextcomp __ARGS((char_u *fname));
     
    5720356664 int get_expr_indent __ARGS((void));
    5720456665 int get_lisp_indent __ARGS((void));
    57205 @@ -98,7 +100,7 @@
     56666@@ -98,7 +100,8 @@
    5720656667 void remove_duplicates __ARGS((garray_T *gap));
    5720756668 int gen_expand_wildcards __ARGS((int num_pat, char_u **pat, int *num_file, char_u ***file, int flags));
     
    5721156672 void FreeWild __ARGS((int count, char_u **files));
    5721256673 int goto_im __ARGS((void));
     56674+char_u *get_isolated_shell_name __ARGS((void));
    5721356675 /* vim: set ft=c : */
    5721456676diff -Naur vim74.orig/src/proto/misc2.pro vim74/src/proto/misc2.pro
    5721556677--- vim74.orig/src/proto/misc2.pro      2013-08-10 11:37:20.000000000 +0000
    57216 +++ vim74/src/proto/misc2.pro   2014-04-27 05:20:58.345107629 +0000
     56678+++ vim74/src/proto/misc2.pro   2014-06-01 00:43:17.460805181 +0000
    5721756679@@ -32,7 +32,7 @@
    5721856680 char_u *vim_strsave_escaped __ARGS((char_u *string, char_u *esc_chars));
     
    5722456686 char_u *vim_strnsave_up __ARGS((char_u *string, int len));
    5722556687 void vim_strup __ARGS((char_u *p));
     56688@@ -55,7 +55,7 @@
     56689 void ga_init __ARGS((garray_T *gap));
     56690 void ga_init2 __ARGS((garray_T *gap, int itemsize, int growsize));
     56691 int ga_grow __ARGS((garray_T *gap, int n));
     56692-char_u *ga_concat_strings __ARGS((garray_T *gap));
     56693+char_u *ga_concat_strings __ARGS((garray_T *gap, char *sep));
     56694 void ga_concat __ARGS((garray_T *gap, char_u *s));
     56695 void ga_append __ARGS((garray_T *gap, int c));
     56696 void append_ga_line __ARGS((garray_T *gap));
    5722656697diff -Naur vim74.orig/src/proto/ops.pro vim74/src/proto/ops.pro
    5722756698--- vim74.orig/src/proto/ops.pro        2013-08-10 11:37:22.000000000 +0000
    57228 +++ vim74/src/proto/ops.pro     2014-04-27 05:20:58.348441045 +0000
     56699+++ vim74/src/proto/ops.pro     2014-06-01 00:43:17.494138430 +0000
     56700@@ -37,7 +37,7 @@
     56701 int preprocs_left __ARGS((void));
     56702 int get_register_name __ARGS((int num));
     56703 void ex_display __ARGS((exarg_T *eap));
     56704-int do_join __ARGS((long count, int insert_space, int save_undo, int use_formatoptions));
     56705+int do_join __ARGS((long count, int insert_space, int save_undo, int use_formatoptions, int setmark));
     56706 void op_format __ARGS((oparg_T *oap, int keep_cursor));
     56707 void op_formatexpr __ARGS((oparg_T *oap));
     56708 int fex_format __ARGS((linenr_T lnum, long count, int c));
    5722956709@@ -53,9 +53,10 @@
    5723056710 int clip_convert_selection __ARGS((char_u **str, long_u *len, VimClipboard *cbd));
     
    5724156721diff -Naur vim74.orig/src/proto/option.pro vim74/src/proto/option.pro
    5724256722--- vim74.orig/src/proto/option.pro     2013-08-10 11:37:22.000000000 +0000
    57243 +++ vim74/src/proto/option.pro  2014-04-27 05:20:58.348441045 +0000
     56723+++ vim74/src/proto/option.pro  2014-06-01 00:43:17.510805054 +0000
    5724456724@@ -23,6 +23,7 @@
    5724556725 char_u *check_stl_option __ARGS((char_u *s));
     
    5726156741diff -Naur vim74.orig/src/proto/os_amiga.pro vim74/src/proto/os_amiga.pro
    5726256742--- vim74.orig/src/proto/os_amiga.pro   2013-08-10 11:37:37.000000000 +0000
    57263 +++ vim74/src/proto/os_amiga.pro        2014-04-27 05:20:58.348441045 +0000
     56743+++ vim74/src/proto/os_amiga.pro        2014-06-01 00:43:17.517471704 +0000
    5726456744@@ -26,7 +26,7 @@
    5726556745 void mch_hide __ARGS((char_u *name));
     
    5727356753diff -Naur vim74.orig/src/proto/os_msdos.pro vim74/src/proto/os_msdos.pro
    5727456754--- vim74.orig/src/proto/os_msdos.pro   2013-08-10 11:37:37.000000000 +0000
    57275 +++ vim74/src/proto/os_msdos.pro        2014-04-27 05:20:58.348441045 +0000
     56755+++ vim74/src/proto/os_msdos.pro        2014-06-01 00:43:17.564138251 +0000
    5727656756@@ -38,7 +38,7 @@
    5727756757 int mch_setperm __ARGS((char_u *name, long perm));
     
    5728556765diff -Naur vim74.orig/src/proto/os_unix.pro vim74/src/proto/os_unix.pro
    5728656766--- vim74.orig/src/proto/os_unix.pro    2013-08-10 11:37:23.000000000 +0000
    57287 +++ vim74/src/proto/os_unix.pro 2014-04-27 05:20:58.348441045 +0000
     56767+++ vim74/src/proto/os_unix.pro 2014-06-01 00:43:17.584138200 +0000
    5728856768@@ -42,7 +42,7 @@
    5728956769 void mch_free_acl __ARGS((vim_acl_T aclent));
     
    5729756777diff -Naur vim74.orig/src/proto/os_vms.pro vim74/src/proto/os_vms.pro
    5729856778--- vim74.orig/src/proto/os_vms.pro     2013-08-10 11:37:40.000000000 +0000
    57299 +++ vim74/src/proto/os_vms.pro  2014-04-27 05:20:58.348441045 +0000
     56779+++ vim74/src/proto/os_vms.pro  2014-06-01 00:43:17.594138175 +0000
    5730056780@@ -7,6 +7,7 @@
    5730156781 int vms_sys __ARGS((char *cmd, char *out, char *inp));
     
    5730856788diff -Naur vim74.orig/src/proto/os_win32.pro vim74/src/proto/os_win32.pro
    5730956789--- vim74.orig/src/proto/os_win32.pro   2013-08-10 11:37:38.000000000 +0000
    57310 +++ vim74/src/proto/os_win32.pro        2014-04-27 05:20:58.348441045 +0000
     56790+++ vim74/src/proto/os_win32.pro        2014-06-01 00:43:17.610804799 +0000
    5731156791@@ -26,7 +26,7 @@
    5731256792 int mch_is_linked __ARGS((char_u *fname));
     
    5732056800diff -Naur vim74.orig/src/proto/regexp.pro vim74/src/proto/regexp.pro
    5732156801--- vim74.orig/src/proto/regexp.pro     2013-08-10 11:37:24.000000000 +0000
    57322 +++ vim74/src/proto/regexp.pro  2014-04-27 05:20:58.351774461 +0000
     56802+++ vim74/src/proto/regexp.pro  2014-06-01 00:43:17.660804672 +0000
    5732356803@@ -10,6 +10,7 @@
    5732456804 int vim_regsub __ARGS((regmatch_T *rmp, char_u *source, char_u *dest, int copy, int magic, int backslash));
     
    5733156811diff -Naur vim74.orig/src/proto/spell.pro vim74/src/proto/spell.pro
    5733256812--- vim74.orig/src/proto/spell.pro      2013-08-10 11:37:26.000000000 +0000
    57333 +++ vim74/src/proto/spell.pro   2014-04-27 05:20:58.351774461 +0000
     56813+++ vim74/src/proto/spell.pro   2014-06-01 00:43:17.687471271 +0000
    5733456814@@ -3,6 +3,7 @@
    5733556815 int spell_move_to __ARGS((win_T *wp, int dir, int allwords, int curline, hlf_T *attrp));
     
    5734256822diff -Naur vim74.orig/src/proto/term.pro vim74/src/proto/term.pro
    5734356823--- vim74.orig/src/proto/term.pro       2013-08-10 11:37:28.000000000 +0000
    57344 +++ vim74/src/proto/term.pro    2014-04-27 05:20:58.355107876 +0000
    57345 @@ -35,7 +35,7 @@
     56824+++ vim74/src/proto/term.pro    2014-06-01 00:43:17.707471220 +0000
     56825@@ -34,8 +34,9 @@
     56826 void settmode __ARGS((int tmode));
    5734656827 void starttermcap __ARGS((void));
    5734756828 void stoptermcap __ARGS((void));
     56829+int did_request_esc_sequence __ARGS((void));
    5734856830 void may_req_termresponse __ARGS((void));
    5734956831-void may_req_ambiguous_character_width __ARGS((void));
     
    5735456836diff -Naur vim74.orig/src/proto/winclip.pro vim74/src/proto/winclip.pro
    5735556837--- vim74.orig/src/proto/winclip.pro    2013-08-10 11:37:39.000000000 +0000
    57356 +++ vim74/src/proto/winclip.pro 2014-04-27 05:20:58.355107876 +0000
     56838+++ vim74/src/proto/winclip.pro 2014-06-01 00:43:17.754137768 +0000
    5735756839@@ -11,4 +11,5 @@
    5735856840 short_u *enc_to_utf16 __ARGS((char_u *str, int *lenp));
     
    5736356845diff -Naur vim74.orig/src/proto/window.pro vim74/src/proto/window.pro
    5736456846--- vim74.orig/src/proto/window.pro     2013-08-10 11:37:30.000000000 +0000
    57365 +++ vim74/src/proto/window.pro  2014-04-27 05:20:58.355107876 +0000
     56847+++ vim74/src/proto/window.pro  2014-06-01 00:43:17.764137742 +0000
    5736656848@@ -9,7 +9,7 @@
    5736756849 void win_equal __ARGS((win_T *next_curwin, int current, int dir));
     
    5737556857diff -Naur vim74.orig/src/quickfix.c vim74/src/quickfix.c
    5737656858--- vim74.orig/src/quickfix.c   2013-07-01 19:16:44.000000000 +0000
    57377 +++ vim74/src/quickfix.c        2014-04-27 05:20:58.358441293 +0000
     56859+++ vim74/src/quickfix.c        2014-06-01 00:43:17.804137640 +0000
    5737856860@@ -751,7 +751,10 @@
    5737956861                fmt_start = fmt_ptr;
     
    5742256904diff -Naur vim74.orig/src/regexp.c vim74/src/regexp.c
    5742356905--- vim74.orig/src/regexp.c     2013-08-01 16:31:30.000000000 +0000
    57424 +++ vim74/src/regexp.c  2014-04-27 05:20:58.361774709 +0000
    57425 @@ -3709,25 +3709,28 @@
     56906+++ vim74/src/regexp.c  2014-06-01 00:43:17.820804264 +0000
     56907@@ -244,6 +244,7 @@
     56908 
     56909 #define RE_MARK                207     /* mark cmp  Match mark position */
     56910 #define RE_VISUAL      208     /*      Match Visual area */
     56911+#define RE_COMPOSING   209     /* any composing characters */
     56912 
     56913 /*
     56914  * Magic characters have a special meaning, they don't match literally.
     56915@@ -2208,6 +2209,10 @@
     56916                    ret = regnode(RE_VISUAL);
     56917                    break;
     56918 
     56919+               case 'C':
     56920+                   ret = regnode(RE_COMPOSING);
     56921+                   break;
     56922+
     56923                /* \%[abc]: Emit as a list of branches, all ending at the last
     56924                 * branch which matches nothing. */
     56925                case '[':
     56926@@ -3709,25 +3714,28 @@
    5742656927 /* TRUE if using multi-line regexp. */
    5742756928 #define REG_MULTI      (reg_match == NULL)
     
    5745556956     reg_win = NULL;
    5745656957     ireg_ic = rmp->rm_ic;
    57457 @@ -3738,35 +3741,6 @@
     56958@@ -3738,35 +3746,6 @@
    5745856959     return (bt_regexec_both(line, col, NULL) != 0);
    5745956960 }
     
    5749156992 
    5749256993 /*
    57493 @@ -4146,7 +4120,8 @@
     56994@@ -4146,7 +4125,8 @@
    5749456995            {
    5749556996                /* Only accept single line matches. */
     
    5750157002                        vim_strnsave(reg_getline(reg_startzpos[i].lnum)
    5750257003                                                       + reg_startzpos[i].col,
    57503 @@ -4179,9 +4154,8 @@
     57004@@ -4179,9 +4159,8 @@
    5750457005                            - (*mb_head_off)(regline, reginput - 1), reg_buf);
    5750557006     return -1;
     
    5751257013 
    5751357014 /*
    57514 @@ -4258,7 +4232,6 @@
     57015@@ -4258,7 +4237,6 @@
    5751557016     }
    5751657017     return TRUE;
     
    5752057021 #define ADVANCE_REGINPUT() mb_ptr_adv(reginput)
    5752157022 
    57522 @@ -4311,8 +4284,8 @@
     57023@@ -4311,8 +4289,8 @@
    5752357024    */
    5752457025   for (;;)
     
    5753157032 
    5753257033 #ifdef DEBUG
    57533 @@ -4440,9 +4413,7 @@
     57034@@ -4440,9 +4418,7 @@
    5753457035            break;
    5753557036 
     
    5754157042            break;
    5754257043 
    57543 @@ -6455,7 +6426,8 @@
     57044@@ -4721,31 +4697,39 @@
     57045                    /* match empty string always works; happens when "~" is
     57046                     * empty. */
     57047                }
     57048-               else if (opnd[1] == NUL
     57049+               else
     57050+               {
     57051+                   if (opnd[1] == NUL
     57052 #ifdef FEAT_MBYTE
     57053                            && !(enc_utf8 && ireg_ic)
     57054 #endif
     57055                        )
     57056-                   ++reginput;         /* matched a single char */
     57057-               else
     57058-               {
     57059-                   len = (int)STRLEN(opnd);
     57060-                   /* Need to match first byte again for multi-byte. */
     57061-                   if (cstrncmp(opnd, reginput, &len) != 0)
     57062-                       status = RA_NOMATCH;
     57063+                   {
     57064+                       len = 1;        /* matched a single byte above */
     57065+                   }
     57066+                   else
     57067+                   {
     57068+                       /* Need to match first byte again for multi-byte. */
     57069+                       len = (int)STRLEN(opnd);
     57070+                       if (cstrncmp(opnd, reginput, &len) != 0)
     57071+                           status = RA_NOMATCH;
     57072+                   }
     57073 #ifdef FEAT_MBYTE
     57074-                   /* Check for following composing character. */
     57075-                   else if (enc_utf8
     57076-                              && UTF_COMPOSINGLIKE(reginput, reginput + len))
     57077+                   /* Check for following composing character, unless %C
     57078+                    * follows (skips over all composing chars). */
     57079+                   if (status != RA_NOMATCH
     57080+                           && enc_utf8
     57081+                           && UTF_COMPOSINGLIKE(reginput, reginput + len)
     57082+                           && !ireg_icombine
     57083+                           && OP(next) != RE_COMPOSING)
     57084                    {
     57085                        /* raaron: This code makes a composing character get
     57086                         * ignored, which is the correct behavior (sometimes)
     57087                         * for voweled Hebrew texts. */
     57088-                       if (!ireg_icombine)
     57089-                           status = RA_NOMATCH;
     57090+                       status = RA_NOMATCH;
     57091                    }
     57092 #endif
     57093-                   else
     57094+                   if (status != RA_NOMATCH)
     57095                        reginput += len;
     57096                }
     57097            }
     57098@@ -4814,6 +4798,16 @@
     57099                status = RA_NOMATCH;
     57100            break;
     57101 #endif
     57102+         case RE_COMPOSING:
     57103+#ifdef FEAT_MBYTE
     57104+           if (enc_utf8)
     57105+           {
     57106+               /* Skip composing characters. */
     57107+               while (utf_iscomposing(utf_ptr2char(reginput)))
     57108+                   mb_cptr_adv(reginput);
     57109+           }
     57110+#endif
     57111+           break;
     57112 
     57113          case NOTHING:
     57114            break;
     57115@@ -6455,7 +6449,8 @@
    5754457116 /*
    5754557117  * Check whether a backreference matches.
     
    5755157123     static int
    5755257124 match_with_backref(start_lnum, start_col, end_lnum, end_col, bytelen)
    57553 @@ -6511,6 +6483,8 @@
     57125@@ -6511,6 +6506,8 @@
    5755457126 
    5755557127        /* Advance to next line. */
     
    5756057132        ccol = 0;
    5756157133        if (got_int)
    57562 @@ -7381,6 +7355,7 @@
     57134@@ -7381,6 +7378,7 @@
    5756357135     reg_mmatch = NULL;
    5756457136     reg_maxline = 0;
     
    5756857140 }
    5756957141 #endif
    57570 @@ -7400,6 +7375,7 @@
     57142@@ -7400,6 +7398,7 @@
    5757157143     reg_buf = curbuf;          /* always works on the current buffer! */
    5757257144     reg_firstlnum = lnum;
     
    5757657148 }
    5757757149 
    57578 @@ -7898,17 +7874,92 @@
     57150@@ -7898,17 +7897,92 @@
    5757957151 
    5758057152     return retval;
     
    5767357245 #ifdef DEBUG
    5767457246     ,(char_u *)""
    57675 @@ -7922,11 +7973,7 @@
     57247@@ -7922,11 +7996,7 @@
    5767657248 {
    5767757249     nfa_regcomp,
     
    5768557257 #ifdef DEBUG
    5768657258     ,(char_u *)""
    57687 @@ -8016,12 +8063,11 @@
     57259@@ -7975,8 +8045,8 @@
     57260            regexp_engine = expr[4] - '0';
     57261            expr += 5;
     57262 #ifdef DEBUG
     57263-           EMSG3("New regexp mode selected (%d): %s", regexp_engine,
     57264-                                                   regname[newengine]);
     57265+           smsg((char_u *)"New regexp mode selected (%d): %s",
     57266+                                          regexp_engine, regname[newengine]);
     57267 #endif
     57268        }
     57269        else
     57270@@ -8016,12 +8086,11 @@
    5768857271        }
    5768957272 #endif
     
    5770157284 
    5770257285     return prog;
    57703 @@ -8051,7 +8097,7 @@
     57286@@ -8051,7 +8120,7 @@
    5770457287     char_u      *line;  /* string to match against */
    5770557288     colnr_T     col;    /* column to start looking for match */
     
    5771057293 
    5771157294 #if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL) \
    57712 @@ -8065,7 +8111,7 @@
     57295@@ -8065,7 +8134,7 @@
    5771357296     char_u *line;
    5771457297     colnr_T col;
     
    5772157304diff -Naur vim74.orig/src/regexp.h vim74/src/regexp.h
    5772257305--- vim74.orig/src/regexp.h     2013-06-11 08:53:14.000000000 +0000
    57723 +++ vim74/src/regexp.h  2014-04-27 05:20:58.361774709 +0000
     57306+++ vim74/src/regexp.h  2014-06-01 00:43:17.844137538 +0000
    5772457307@@ -149,11 +149,7 @@
    5772557308 {
     
    5773757320diff -Naur vim74.orig/src/regexp_nfa.c vim74/src/regexp_nfa.c
    5773857321--- vim74.orig/src/regexp_nfa.c 2013-08-01 16:27:51.000000000 +0000
    57739 +++ vim74/src/regexp_nfa.c      2014-04-27 05:20:58.361774709 +0000
     57322+++ vim74/src/regexp_nfa.c      2014-06-01 00:43:17.864137487 +0000
    5774057323@@ -29,11 +29,14 @@
    5774157324 # define NFA_REGEXP_DEBUG_LOG  "nfa_regexp_debug.log"
     
    5775457337     NFA_START_COLL,                /* [abc] start */
    5775557338     NFA_END_COLL,                  /* [abc] end */
    57756 @@ -183,6 +186,13 @@
     57339@@ -78,6 +81,7 @@
     57340     NFA_COMPOSING,                 /* Next nodes in NFA are part of the
     57341                                       composing multibyte char */
     57342     NFA_END_COMPOSING,             /* End of a composing char in the NFA */
     57343+    NFA_ANY_COMPOSING,             /* \%C: Any composing characters. */
     57344     NFA_OPT_CHARS,                 /* \%[abc] */
     57345 
     57346     /* The following are used only in the postfix form, not in the NFA */
     57347@@ -183,6 +187,13 @@
    5775757348     NFA_NLOWER,                /*      Match non-lowercase char */
    5775857349     NFA_UPPER,         /*      Match uppercase char */
     
    5776857359     NFA_CURSOR,                /*      Match cursor pos */
    5776957360     NFA_LNUM,          /*      Match line number */
    57770 @@ -199,9 +209,6 @@
     57361@@ -199,9 +210,6 @@
    5777157362     NFA_MARK_LT,       /*      Match < mark */
    5777257363     NFA_VISUAL,                /*      Match Visual area */
     
    5777857369     NFA_CLASS_ALNUM,
    5777957370     NFA_CLASS_ALPHA,
    57780 @@ -232,7 +239,9 @@
     57371@@ -232,7 +240,9 @@
    5778157372     NFA_UPPER, NFA_NUPPER
    5778257373 };
     
    5778857379 /* NFA regexp \ze operator encountered. */
    5778957380 static int nfa_has_zend;
    57790 @@ -302,7 +311,7 @@
     57381@@ -302,7 +312,7 @@
    5779157382 static long nfa_regexec_both __ARGS((char_u *line, colnr_T col));
    5779257383 static regprog_T *nfa_regcomp __ARGS((char_u *expr, int re_flags));
     
    5779757388 static int match_follows __ARGS((nfa_state_T *startstate, int depth));
    5779857389 static int failure_chance __ARGS((nfa_state_T *state, int depth));
    57799 @@ -578,6 +587,8 @@
     57390@@ -578,6 +588,8 @@
    5780057391  * On failure, return 0 (=FAIL)
    5780157392  * Start points to the first char of the range, while end should point
     
    5780657397     static int
    5780757398 nfa_recognize_char_class(start, end, extra_newl)
    57808 @@ -681,7 +692,7 @@
     57399@@ -681,7 +693,7 @@
    5780957400        return FAIL;
    5781057401 
     
    5781557406     switch (config)
    5781657407     {
    57817 @@ -710,13 +721,13 @@
     57408@@ -710,13 +722,13 @@
    5781857409        case CLASS_not | CLASS_az | CLASS_AZ:
    5781957410            return extra_newl + NFA_NALPHA;
     
    5783357424     return FAIL;
    5783457425 }
    57835 @@ -733,7 +744,12 @@
     57426@@ -733,7 +745,12 @@
    5783657427 nfa_emit_equi_class(c)
    5783757428     int            c;
     
    5784757438 #ifdef FEAT_MBYTE
    5784857439     if (enc_utf8 || STRCMP(p_enc, "latin1") == 0
    57849 @@ -744,92 +760,338 @@
     57440@@ -744,92 +761,338 @@
    5785057441        {
    5785157442            case 'A': case 0300: case 0301: case 0302:
     
    5821957810 
    5822057811 /*
    58221 @@ -877,7 +1139,7 @@
     57812@@ -877,7 +1140,7 @@
    5822257813     switch (c)
    5822357814     {
     
    5822857819        case Magic('^'):
    5822957820            EMIT(NFA_BOL);
    58230 @@ -900,6 +1162,9 @@
     57821@@ -900,6 +1163,9 @@
    5823157822 
    5823257823        case Magic('_'):
     
    5823857829            {
    5823957830                EMIT(NFA_BOL);
    58240 @@ -914,7 +1179,7 @@
     57831@@ -914,7 +1180,7 @@
    5824157832                break;
    5824257833            }
     
    5824757838            /* "\_[" is collection plus newline */
    5824857839            if (c == '[')
    58249 @@ -956,6 +1221,12 @@
     57840@@ -956,6 +1222,12 @@
    5825057841            p = vim_strchr(classchars, no_Magic(c));
    5825157842            if (p == NULL)
     
    5826057851                return FAIL;
    5826157852            }
    58262 @@ -970,7 +1241,7 @@
     57853@@ -970,7 +1242,7 @@
    5826357854            }
    5826457855 #endif
     
    5826957860                EMIT(NFA_NEWL);
    5827057861                EMIT(NFA_OR);
    58271 @@ -1123,8 +1394,9 @@
     57862@@ -1123,8 +1395,9 @@
    5827257863                            EMSG2_RET_FAIL(
    5827357864                               _("E678: Invalid character after %s%%[dxouU]"),
     
    5828057871                    break;
    5828157872 
    58282 @@ -1240,21 +1512,21 @@
     57873@@ -1146,6 +1419,10 @@
     57874                    EMIT(NFA_VISUAL);
     57875                    break;
     57876 
     57877+               case 'C':
     57878+                   EMIT(NFA_ANY_COMPOSING);
     57879+                   break;
     57880+
     57881                case '[':
     57882                    {
     57883                        int         n;
     57884@@ -1240,21 +1517,21 @@
    5828357885            {
    5828457886                /*
     
    5830857910                    mb_ptr_adv(regparse);
    5830957911                    return OK;
    58310 @@ -1504,7 +1776,7 @@
     57912@@ -1504,7 +1781,7 @@
    5831157913                             * collection, add an OR below. But not for negated
    5831257914                             * range. */
     
    5831757919                        else
    5831857920                        {
    58319 @@ -1537,7 +1809,7 @@
     57921@@ -1537,7 +1814,7 @@
    5832057922                    EMIT(NFA_END_COLL);
    5832157923 
     
    5832657928                    EMIT(reg_string ? NL : NFA_NEWL);
    5832757929                    EMIT(NFA_OR);
    58328 @@ -1744,8 +2016,8 @@
     57930@@ -1744,8 +2021,8 @@
    5832957931            {
    5833057932                /* Ignore result of previous call to nfa_regatom() */
     
    5833757939            }
    5833857940 
    58339 @@ -1909,16 +2181,16 @@
     57941@@ -1909,16 +2186,16 @@
    5834057942        old_post_pos = (int)(post_ptr - post_start);
    5834157943        if (nfa_regconcat() == FAIL)
     
    5835857960     return OK;
    5835957961 }
    58360 @@ -2011,7 +2283,7 @@
     57962@@ -2011,7 +2288,7 @@
    5836157963     if (c >= NFA_FIRST_NL && c <= NFA_LAST_NL)
    5836257964     {
     
    5836757969 
    5836857970     STRCPY(code, "");
    58369 @@ -2162,7 +2434,7 @@
     57971@@ -2157,12 +2434,13 @@
     57972        case NFA_MARK_LT:       STRCPY(code, "NFA_MARK_LT "); break;
     57973        case NFA_CURSOR:        STRCPY(code, "NFA_CURSOR "); break;
     57974        case NFA_VISUAL:        STRCPY(code, "NFA_VISUAL "); break;
     57975+       case NFA_ANY_COMPOSING: STRCPY(code, "NFA_ANY_COMPOSING "); break;
     57976 
     57977        case NFA_STAR:          STRCPY(code, "NFA_STAR "); break;
    5837057978        case NFA_STAR_NONGREEDY: STRCPY(code, "NFA_STAR_NONGREEDY "); break;
    5837157979        case NFA_QUEST:         STRCPY(code, "NFA_QUEST"); break;
     
    5837657984 
    5837757985        case NFA_START_COLL:    STRCPY(code, "NFA_START_COLL"); break;
    58378 @@ -2217,6 +2489,10 @@
     57986@@ -2217,6 +2495,10 @@
    5837957987        case NFA_NLOWER:STRCPY(code, "NFA_NLOWER"); break;
    5838057988        case NFA_UPPER: STRCPY(code, "NFA_UPPER"); break;
     
    5838757995        default:
    5838857996            STRCPY(code, "CHAR(x)");
    58389 @@ -2687,6 +2963,10 @@
     57997@@ -2687,6 +2969,11 @@
    5839057998            case NFA_NLOWER:
    5839157999            case NFA_UPPER:
     
    5839558003+           case NFA_UPPER_IC:
    5839658004+           case NFA_NUPPER_IC:
     58005+           case NFA_ANY_COMPOSING:
    5839758006                /* possibly non-ascii */
    5839858007 #ifdef FEAT_MBYTE
    5839958008                if (has_mbyte)
    58400 @@ -2798,7 +3078,7 @@
     58009@@ -2798,7 +3085,7 @@
    5840158010            case NFA_ZSTART:
    5840258011            case NFA_ZEND:
     
    5840758016            case NFA_END_PATTERN:
    5840858017            case NFA_COMPOSING:
    58409 @@ -2996,15 +3276,14 @@
     58018@@ -2996,15 +3283,14 @@
    5841058019            PUSH(frag(e1.start, e2.out));
    5841158020            break;
     
    5842658035                goto theend;
    5842758036            PUSH(frag(s, list1(&s->out)));
    58428 @@ -3554,6 +3833,7 @@
     58037@@ -3554,6 +3840,7 @@
    5842958038 static void clear_sub __ARGS((regsub_T *sub));
    5843058039 static void copy_sub __ARGS((regsub_T *to, regsub_T *from));
     
    5843458043 static int match_backref __ARGS((regsub_T *sub, int subidx, int *bytelen));
    5843558044 static int has_state_with_pos __ARGS((nfa_list_T *l, nfa_state_T *state, regsubs_T *subs, nfa_pim_T *pim));
    58436 @@ -3641,6 +3921,29 @@
     58045@@ -3641,7 +3928,31 @@
    5843758046 }
    5843858047 
     
    5846258071+/*
    5846358072  * Return TRUE if "sub1" and "sub2" have the same start positions.
     58073+ * When using back-references also check the end position.
    5846458074  */
    5846558075     static int
    58466 @@ -3765,6 +4068,9 @@
     58076 sub_equal(sub1, sub2)
     58077@@ -3673,6 +3984,23 @@
     58078            if (s1 != -1 && sub1->list.multi[i].start.col
     58079                                             != sub2->list.multi[i].start.col)
     58080                return FALSE;
     58081+
     58082+           if (nfa_has_backref)
     58083+           {
     58084+               if (i < sub1->in_use)
     58085+                   s1 = sub1->list.multi[i].end.lnum;
     58086+               else
     58087+                   s1 = -1;
     58088+               if (i < sub2->in_use)
     58089+                   s2 = sub2->list.multi[i].end.lnum;
     58090+               else
     58091+                   s2 = -1;
     58092+               if (s1 != s2)
     58093+                   return FALSE;
     58094+               if (s1 != -1 && sub1->list.multi[i].end.col
     58095+                                              != sub2->list.multi[i].end.col)
     58096+               return FALSE;
     58097+           }
     58098        }
     58099     }
     58100     else
     58101@@ -3689,6 +4017,19 @@
     58102                sp2 = NULL;
     58103            if (sp1 != sp2)
     58104                return FALSE;
     58105+           if (nfa_has_backref)
     58106+           {
     58107+               if (i < sub1->in_use)
     58108+                   sp1 = sub1->list.line[i].end;
     58109+               else
     58110+                   sp1 = NULL;
     58111+               if (i < sub2->in_use)
     58112+                   sp2 = sub2->list.line[i].end;
     58113+               else
     58114+                   sp2 = NULL;
     58115+               if (sp1 != sp2)
     58116+                   return FALSE;
     58117+           }
     58118        }
     58119     }
     58120 
     58121@@ -3765,6 +4106,9 @@
    5846758122     if (two_unused)
    5846858123        /* one is used and two is not: not equal */
     
    5847458129     if (REG_MULTI)
    5847558130        return one->end.pos.lnum == two->end.pos.lnum
    58476 @@ -3841,6 +4147,10 @@
     58131@@ -3815,6 +4159,7 @@
     58132                continue;
     58133 
     58134            case NFA_ANY:
     58135+           case NFA_ANY_COMPOSING:
     58136            case NFA_IDENT:
     58137            case NFA_SIDENT:
     58138            case NFA_KWORD:
     58139@@ -3841,6 +4186,10 @@
    5847758140            case NFA_NLOWER:
    5847858141            case NFA_UPPER:
     
    5848558148            case NFA_START_NEG_COLL:
    5848658149            case NFA_NEWL:
    58487 @@ -3933,7 +4243,7 @@
     58150@@ -3933,7 +4282,7 @@
    5848858151        case NFA_MOPEN:
    5848958152        case NFA_ZEND:
     
    5849458157             * "out1" may be added below.  */
    5849558158            break;
    58496 @@ -3979,7 +4289,7 @@
     58159@@ -3979,12 +4328,14 @@
    5849758160             * endless loop for "\(\)*" */
    5849858161 
     
    5850358166                /* This state is already in the list, don't add it again,
    5850458167                 * unless it is an MOPEN that is used for a backreference or
    58505 @@ -4061,7 +4371,7 @@
     58168-                * when there is a PIM. */
     58169-               if (!nfa_has_backref && pim == NULL && !l->has_pim)
     58170+                * when there is a PIM. For NFA_MATCH check the position,
     58171+                * lower position is preferred. */
     58172+               if (!nfa_has_backref && pim == NULL && !l->has_pim
     58173+                                                    && state->c != NFA_MATCH)
     58174                {
     58175 skip_add:
     58176 #ifdef ENABLE_LOG
     58177@@ -4052,7 +4403,7 @@
     58178     switch (state->c)
     58179     {
     58180        case NFA_MATCH:
     58181-           nfa_match = TRUE;
     58182+//         nfa_match = TRUE;
     58183            break;
     58184 
     58185        case NFA_SPLIT:
     58186@@ -4061,7 +4412,7 @@
    5850658187            subs = addstate(l, state->out1, subs, pim, off);
    5850758188            break;
     
    5851258193        case NFA_NCLOSE:
    5851358194            subs = addstate(l, state->out, subs, pim, off);
    58514 @@ -4096,7 +4406,7 @@
     58195@@ -4096,7 +4447,7 @@
    5851558196                sub = &subs->norm;
    5851658197            }
     
    5852158202                subidx = state->c - NFA_ZOPEN;
    5852258203                sub = &subs->synt;
    58523 @@ -4165,6 +4475,13 @@
     58204@@ -4165,6 +4516,13 @@
    5852458205            }
    5852558206 
     
    5853558216            if (save_in_use == -1)
    5853658217            {
    58537 @@ -4178,10 +4495,11 @@
     58218@@ -4178,10 +4536,11 @@
    5853858219            break;
    5853958220 
     
    5855058231                break;
    5855158232            }
    58552 @@ -4213,7 +4531,7 @@
     58233@@ -4213,7 +4572,7 @@
    5855358234                sub = &subs->norm;
    5855458235            }
     
    5855958240                subidx = state->c - NFA_ZCLOSE;
    5856058241                sub = &subs->synt;
    58561 @@ -4257,6 +4575,13 @@
     58242@@ -4257,6 +4616,13 @@
    5856258243            }
    5856358244 
     
    5857358254            if (REG_MULTI)
    5857458255                sub->list.multi[subidx].end = save_lpos;
    58575 @@ -4419,7 +4744,7 @@
     58256@@ -4419,7 +4785,7 @@
    5857658257 
    5857758258        default:
     
    5858258263     }
    5858358264     return FAIL;
    58584 @@ -5018,6 +5343,7 @@
     58265@@ -4793,6 +5159,7 @@
     58266 
     58267        case NFA_MATCH:
     58268        case NFA_MCLOSE:
     58269+       case NFA_ANY_COMPOSING:
     58270            /* empty match works always */
     58271            return 0;
     58272 
     58273@@ -5018,6 +5385,7 @@
    5858558274  * When "nfa_endp" is not NULL it is a required end-of-match position.
    5858658275  *
     
    5859058279  */
    5859158280     static int
    58592 @@ -5051,6 +5377,12 @@
     58281@@ -5051,6 +5419,12 @@
    5859358282        return FALSE;
    5859458283     }
     
    5860358292 
    5860458293     /* Allocate memory for the lists of nodes. */
    58605 @@ -5278,7 +5610,10 @@
     58294@@ -5208,6 +5582,12 @@
     58295            {
     58296            case NFA_MATCH:
     58297              {
     58298+#ifdef FEAT_MBYTE
     58299+               /* If the match ends before a composing characters and
     58300+                * ireg_icombine is not set, that is not really a match. */
     58301+               if (enc_utf8 && !ireg_icombine && utf_iscomposing(curc))
     58302+                   break;
     58303+#endif
     58304                nfa_match = TRUE;
     58305                copy_sub(&submatch->norm, &t->subs.norm);
     58306 #ifdef FEAT_SYN_HL
     58307@@ -5278,7 +5658,10 @@
    5860658308                log_subsexpr(m);
    5860758309 #endif
     
    5861558317            case NFA_START_INVISIBLE:
    5861658318            case NFA_START_INVISIBLE_FIRST:
    58617 @@ -5304,9 +5639,13 @@
     58319@@ -5304,9 +5687,13 @@
    5861858320                    {
    5861958321                        int in_use = m->norm.in_use;
     
    5863158333                        /*
    5863258334                         * First try matching the invisible match, then what
    58633 @@ -5330,6 +5669,9 @@
     58335@@ -5330,6 +5717,9 @@
    5863458336                            if (nfa_has_zsubexpr)
    5863558337                                copy_sub_off(&t->subs.synt, &m->synt);
     
    5864158343                            /* t->state->out1 is the corresponding
    5864258344                             * END_INVISIBLE node; Add its out to the current
    58643 @@ -5413,6 +5755,13 @@
     58345@@ -5413,6 +5803,13 @@
    5864458346 #endif
    5864558347                    break;
     
    5865558357                /* First try matching the pattern. */
    5865658358                result = recursive_regmatch(t->state, NULL, prog,
    58657 @@ -5872,6 +6221,28 @@
     58359@@ -5738,6 +6135,23 @@
     58360                }
     58361                break;
     58362 
     58363+           case NFA_ANY_COMPOSING:
     58364+               /* On a composing character skip over it.  Otherwise do
     58365+                * nothing.  Always matches. */
     58366+#ifdef FEAT_MBYTE
     58367+               if (enc_utf8 && utf_iscomposing(curc))
     58368+               {
     58369+                   add_off = clen;
     58370+               }
     58371+               else
     58372+#endif
     58373+               {
     58374+                   add_here = TRUE;
     58375+                   add_off = 0;
     58376+               }
     58377+               add_state = t->state->out;
     58378+               break;
     58379+
     58380            /*
     58381             * Character classes like \a for alpha, \d for digit etc.
     58382             */
     58383@@ -5872,6 +6286,28 @@
    5865858384                ADD_STATE_IF_MATCH(t->state);
    5865958385                break;
     
    5868458410            case NFA_BACKREF2:
    5868558411            case NFA_BACKREF3:
    58686 @@ -6032,14 +6403,12 @@
     58412@@ -6032,14 +6468,12 @@
    5868758413                break;
    5868858414 
     
    5869958425 
    5870058426            case NFA_MOPEN1:
    58701 @@ -6098,6 +6467,7 @@
     58427@@ -6082,12 +6516,10 @@
     58428                if (!result && ireg_ic)
     58429                    result = MB_TOLOWER(c) == MB_TOLOWER(curc);
     58430 #ifdef FEAT_MBYTE
     58431-               /* If there is a composing character which is not being
     58432-                * ignored there can be no match. Match with composing
     58433-                * character uses NFA_COMPOSING above. */
     58434-               if (result && enc_utf8 && !ireg_icombine
     58435-                                               && clen != utf_char2len(curc))
     58436-                   result = FALSE;
     58437+               /* If ireg_icombine is not set only skip over the character
     58438+                * itself.  When it is set skip over composing characters. */
     58439+               if (result && enc_utf8 && !ireg_icombine)
     58440+                   clen = utf_char2len(curc);
     58441 #endif
     58442                ADD_STATE_IF_MATCH(t->state);
     58443                break;
     58444@@ -6098,6 +6530,7 @@
    5870258445            if (add_state != NULL)
    5870358446            {
     
    5870758450                if (t->pim.result == NFA_PIM_UNUSED)
    5870858451                    pim = NULL;
    58709 @@ -6171,6 +6541,15 @@
     58452@@ -6171,6 +6604,15 @@
    5871058453                    pim = NULL;
    5871158454                }
     
    5872358466                    addstate_here(thislist, add_state, &t->subs, pim, &listidx);
    5872458467                else
    58725 @@ -6402,8 +6781,10 @@
     58468@@ -6402,8 +6844,10 @@
    5872658469            {
    5872758470                struct multipos *mpos = &subs.synt.list.multi[i];
     
    5873658479                        vim_strnsave(reg_getline(mpos->start.lnum)
    5873758480                                                            + mpos->start.col,
    58738 @@ -6679,47 +7060,21 @@
     58481@@ -6679,19 +7123,21 @@
    5873958482  * Match a regexp against a string.
    5874058483  * "rmp->regprog" is a compiled regexp as returned by nfa_regcomp().
     
    5874658489     static int
    5874758490-nfa_regexec(rmp, line, col)
    58748 -    regmatch_T *rmp;
    58749 -    char_u     *line;  /* string to match against */
    58750 -    colnr_T    col;    /* column to start looking for match */
    58751 -{
    58752 -    reg_match = rmp;
    58753 -    reg_mmatch = NULL;
    58754 -    reg_maxline = 0;
     58491+nfa_regexec_nl(rmp, line, col, line_lbr)
     58492     regmatch_T *rmp;
     58493     char_u     *line;  /* string to match against */
     58494     colnr_T    col;    /* column to start looking for match */
     58495+    int                line_lbr;
     58496 {
     58497     reg_match = rmp;
     58498     reg_mmatch = NULL;
     58499     reg_maxline = 0;
    5875558500-    reg_line_lbr = FALSE;
    58756 -    reg_buf = curbuf;
    58757 -    reg_win = NULL;
    58758 -    ireg_ic = rmp->rm_ic;
    58759 -#ifdef FEAT_MBYTE
    58760 -    ireg_icombine = FALSE;
    58761 -#endif
    58762 -    ireg_maxcol = 0;
    58763 -    return (nfa_regexec_both(line, col) != 0);
    58764 -}
    58765 -
     58501+    reg_line_lbr = line_lbr;
     58502     reg_buf = curbuf;
     58503     reg_win = NULL;
     58504     ireg_ic = rmp->rm_ic;
     58505@@ -6702,35 +7148,6 @@
     58506     return (nfa_regexec_both(line, col) != 0);
     58507 }
     58508 
    5876658509-#if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL) \
    5876758510-       || defined(FIND_REPLACE_DIALOG) || defined(PROTO)
     
    5877458517-    static int
    5877558518-nfa_regexec_nl(rmp, line, col)
    58776 +nfa_regexec_nl(rmp, line, col, line_lbr)
    58777      regmatch_T *rmp;
    58778      char_u     *line;  /* string to match against */
    58779      colnr_T    col;    /* column to start looking for match */
    58780 +    int                line_lbr;
    58781  {
    58782      reg_match = rmp;
    58783      reg_mmatch = NULL;
    58784      reg_maxline = 0;
     58519-    regmatch_T *rmp;
     58520-    char_u     *line;  /* string to match against */
     58521-    colnr_T    col;    /* column to start looking for match */
     58522-{
     58523-    reg_match = rmp;
     58524-    reg_mmatch = NULL;
     58525-    reg_maxline = 0;
    5878558526-    reg_line_lbr = TRUE;
    58786 +    reg_line_lbr = line_lbr;
    58787      reg_buf = curbuf;
    58788      reg_win = NULL;
    58789      ireg_ic = rmp->rm_ic;
    58790 @@ -6729,7 +7084,6 @@
    58791      ireg_maxcol = 0;
    58792      return (nfa_regexec_both(line, col) != 0);
    58793  }
     58527-    reg_buf = curbuf;
     58528-    reg_win = NULL;
     58529-    ireg_ic = rmp->rm_ic;
     58530-#ifdef FEAT_MBYTE
     58531-    ireg_icombine = FALSE;
    5879458532-#endif
    58795  
     58533-    ireg_maxcol = 0;
     58534-    return (nfa_regexec_both(line, col) != 0);
     58535-}
     58536-#endif
     58537-
    5879658538 
    5879758539 /*
     58540  * Match a regexp against multiple lines.
    5879858541diff -Naur vim74.orig/src/screen.c vim74/src/screen.c
    5879958542--- vim74.orig/src/screen.c     2013-07-13 10:23:00.000000000 +0000
    58800 +++ vim74/src/screen.c  2014-04-27 05:20:58.365108126 +0000
     58543+++ vim74/src/screen.c  2014-06-01 00:43:17.884137436 +0000
     58544@@ -42,7 +42,7 @@
     58545  *
     58546  * The part of the buffer that is displayed in a window is set with:
     58547  * - w_topline (first buffer line in window)
     58548- * - w_topfill (filler line above the first line)
     58549+ * - w_topfill (filler lines above the first line)
     58550  * - w_leftcol (leftmost window cell in window),
     58551  * - w_skipcol (skipped window cells of first line)
     58552  *
    5880158553@@ -446,8 +446,6 @@
    5880258554 #endif
     
    5886858620 #if defined(FEAT_SYN_HL) || defined(FEAT_SEARCH_EXTRA)
    5886958621     /* reset got_int, otherwise regexp won't work */
     58622@@ -2467,8 +2456,8 @@
     58623        if (len > 0)
     58624        {
     58625            int     w = number_width(wp);
     58626-           long num;
     58627-           char *fmt = "%*ld ";
     58628+           long    num;
     58629+           char    *fmt = "%*ld ";
     58630 
     58631            if (len > w + 1)
     58632                len = w + 1;
    5887058633@@ -2670,7 +2659,6 @@
    5887158634      * 6. set highlighting for the Visual area an other text.
     
    5895758720        /* Handle a character that's not completely on the screen: Put ptr at
    5895858721         * that character but skip the first few screen characters. */
     58722@@ -3583,11 +3553,7 @@
     58723                draw_state = WL_SIGN;
     58724                /* Show the sign column when there are any signs in this
     58725                 * buffer or when using Netbeans. */
     58726-               if (draw_signcolumn(wp)
     58727-# ifdef FEAT_DIFF
     58728-                       && filler_todo <= 0
     58729-# endif
     58730-                  )
     58731+               if (draw_signcolumn(wp))
     58732                {
     58733                    int text_sign;
     58734 # ifdef FEAT_SIGN_ICONS
     58735@@ -3599,7 +3565,11 @@
     58736                    char_attr = hl_attr(HLF_SC);
     58737                    n_extra = 2;
     58738 
     58739-                   if (row == startrow)
     58740+                   if (row == startrow
     58741+#ifdef FEAT_DIFF
     58742+                           + filler_lines && filler_todo <= 0
     58743+#endif
     58744+                           )
     58745                    {
     58746                        text_sign = buf_getsigntype(wp->w_buffer, lnum,
     58747                                                                   SIGN_TEXT);
    5895958748@@ -4500,9 +4470,7 @@
    5896058749                        && ((wp->w_p_list && lcs_eol > 0)
     
    5902058809 
    5902158810 #endif /* FEAT_STL_OPT */
    59022 @@ -7447,7 +7424,7 @@
     58811@@ -6939,15 +6916,16 @@
     58812  * a NUL.
     58813  */
     58814     void
     58815-screen_puts_len(text, len, row, col, attr)
     58816+screen_puts_len(text, textlen, row, col, attr)
     58817     char_u     *text;
     58818-    int                len;
     58819+    int                textlen;
     58820     int                row;
     58821     int                col;
     58822     int                attr;
     58823 {
     58824     unsigned   off;
     58825     char_u     *ptr = text;
     58826+    int                len = textlen;
     58827     int                c;
     58828 #ifdef FEAT_MBYTE
     58829     unsigned   max_off;
     58830@@ -7192,7 +7170,11 @@
     58831            col += mbyte_cells;
     58832            ptr += mbyte_blen;
     58833            if (clear_next_cell)
     58834+           {
     58835+               /* This only happens at the end, display one space next. */
     58836                ptr = (char_u *)" ";
     58837+               len = -1;
     58838+           }
     58839        }
     58840        else
     58841 #endif
     58842@@ -7447,7 +7429,7 @@
    5902358843            {
    5902458844                /* don't free regprog in the match list, it's a copy */
     
    5902958849            shl->rm.regprog = NULL;
    5903058850            shl->lnum = 0;
    59031 @@ -9648,10 +9625,7 @@
     58851@@ -9648,10 +9630,7 @@
    5903258852     do_mode = ((p_smd && msg_silent == 0)
    5903358853            && ((State & INSERT)
     
    5904158861     {
    5904258862        /*
    59043 @@ -9779,7 +9753,6 @@
     58863@@ -9704,7 +9683,8 @@
     58864            }
     58865 #endif
     58866 #ifdef FEAT_INS_EXPAND
     58867-           if (edit_submode != NULL)           /* CTRL-X in Insert mode */
     58868+           /* CTRL-X in Insert mode */
     58869+           if (edit_submode != NULL && !shortmess(SHM_COMPLETIONMENU))
     58870            {
     58871                /* These messages can get long, avoid a wrap in a narrow
     58872                 * window.  Prefer showing edit_submode_extra. */
     58873@@ -9779,7 +9759,6 @@
    5904458874                if ((State & INSERT) && p_paste)
    5904558875                    MSG_PUTS_ATTR(_(" (paste)"), attr);
     
    5904958879                {
    5905058880                    char *p;
    59051 @@ -9799,7 +9772,6 @@
     58881@@ -9799,7 +9778,6 @@
    5905258882                    }
    5905358883                    MSG_PUTS_ATTR(_(p), attr);
     
    5905758887            }
    5905858888 
    59059 @@ -9828,11 +9800,9 @@
     58889@@ -9828,11 +9806,9 @@
    5906058890        msg_clr_cmdline();
    5906158891 
     
    5907158901diff -Naur vim74.orig/src/search.c vim74/src/search.c
    5907258902--- vim74.orig/src/search.c     2013-07-17 17:20:47.000000000 +0000
    59073 +++ vim74/src/search.c  2014-04-27 05:20:58.368441542 +0000
     58903+++ vim74/src/search.c  2014-06-01 00:43:17.920804010 +0000
    5907458904@@ -201,7 +201,7 @@
    5907558905      * Save the currently used pattern in the appropriate place,
     
    5953159361diff -Naur vim74.orig/src/spell.c vim74/src/spell.c
    5953259362--- vim74.orig/src/spell.c      2013-07-17 15:28:28.000000000 +0000
    59533 +++ vim74/src/spell.c   2014-04-27 05:20:58.375108373 +0000
     59363+++ vim74/src/spell.c   2014-06-01 00:43:17.964137233 +0000
    5953459364@@ -317,7 +317,7 @@
    5953559365 
     
    5962059450         * If there is a region name let "region" point to it and remove it
    5962159451         * from the name. */
    59622 @@ -4601,7 +4613,7 @@
     59452@@ -4496,6 +4508,7 @@
     59453 theend:
     59454     vim_free(spl_copy);
     59455     recursive = FALSE;
     59456+    redraw_win_later(wp, NOT_VALID);
     59457     return ret_msg;
     59458 }
     59459 
     59460@@ -4601,7 +4614,7 @@
    5962359461     int                past_second = FALSE;    /* past second word char */
    5962459462 
     
    5962959467            return 0;       /* only non-word characters, illegal word */
    5963059468 #ifdef FEAT_MBYTE
    59631 @@ -4617,7 +4629,7 @@
     59469@@ -4617,7 +4630,7 @@
    5963259470      * But a word with an upper char only at start is a ONECAP.
    5963359471      */
     
    5963859476            c = PTR2CHAR(p);
    5963959477            if (!SPELL_ISUPPER(c))
    59640 @@ -4689,7 +4701,25 @@
     59478@@ -4689,7 +4702,25 @@
    5964159479     return flags;
    5964259480 }
     
    5966559503  * Free all languages.
    5966659504  */
    59667 @@ -4698,7 +4728,6 @@
     59505@@ -4698,7 +4729,6 @@
    5966859506 {
    5966959507     slang_T    *slang;
     
    5967359511     /* Go through all buffers and handle 'spelllang'. <VN> */
    5967459512     for (buf = firstbuf; buf != NULL; buf = buf->b_next)
    59675 @@ -4711,24 +4740,16 @@
     59513@@ -4711,24 +4741,16 @@
    5967659514        slang_free(slang);
    5967759515     }
     
    5970159539  * Clear all spelling tables and reload them.
    5970259540  * Used after 'encoding' is set and when ":mkspell" was used.
    59703 @@ -4761,7 +4782,7 @@
     59541@@ -4761,7 +4783,7 @@
    5970459542        }
    5970559543     }
     
    5971059548 /*
    5971159549  * Reload the spell file "fname" if it's loaded.
    59712 @@ -9479,7 +9500,8 @@
     59550@@ -9479,7 +9501,8 @@
    5971359551                        if (undo)
    5971459552                        {
     
    5972059558                    }
    5972159559                    fseek(fd, fpos_next, SEEK_SET);
    59722 @@ -9525,7 +9547,7 @@
     59560@@ -9525,7 +9548,7 @@
    5972359561            fclose(fd);
    5972459562 
     
    5972959567     }
    5973059568 
    59731 @@ -9906,7 +9928,7 @@
     59569@@ -9906,7 +9929,7 @@
    5973259570 
    5973359571        c = mb_ptr2char(s);
     
    5973859576     }
    5973959577 #endif
    59740 @@ -9919,8 +9941,9 @@
     59578@@ -9919,8 +9942,9 @@
    5974159579  * Unlike spell_iswordp() this doesn't check for "midword" characters.
    5974259580  */
     
    5974959587 #ifdef FEAT_MBYTE
    5975059588     int                c;
    59751 @@ -9929,7 +9952,7 @@
     59589@@ -9929,7 +9953,7 @@
    5975259590     {
    5975359591        c = mb_ptr2char(p);
     
    5975859596     }
    5975959597 #endif
    59760 @@ -9941,11 +9964,16 @@
     59598@@ -9941,11 +9965,16 @@
    5976159599  * Return TRUE if word class indicates a word character.
    5976259600  * Only for characters above 255.
     
    5977759615 }
    5977859616 
    59779 @@ -9970,9 +9998,10 @@
     59617@@ -9970,9 +9999,10 @@
    5978059618     if (*s > 255)
    5978159619     {
     
    5979059628     }
    5979159629     return spelltab.st_isw[*s];
    59792 @@ -10135,7 +10164,7 @@
     59630@@ -10135,7 +10165,7 @@
    5979359631 }
    5979459632 
     
    5979959637  * In Visual mode use the highlighted word as the bad word.
    5980059638  * When "count" is non-zero use that suggestion.
    59801 @@ -10162,7 +10191,6 @@
     59639@@ -10162,7 +10192,6 @@
    5980259640     if (no_spell_checking(curwin))
    5980359641        return;
     
    5980759645     {
    5980859646        /* Use the Visually selected text as the bad word.  But reject
    59809 @@ -10180,10 +10208,8 @@
     59647@@ -10180,10 +10209,8 @@
    5981059648        ++badlen;
    5981159649        end_visual_mode();
     
    5982059658     {
    5982159659        /* No bad word or it starts after the cursor: use the word under the
    59822 @@ -10192,13 +10218,13 @@
     59660@@ -10192,13 +10219,13 @@
    5982359661        line = ml_get_curline();
    5982459662        p = line + curwin->w_cursor.col;
     
    5983759675            beep_flush();
    5983859676            return;
    59839 @@ -10435,7 +10461,7 @@
     59677@@ -10435,7 +10462,7 @@
    5984059678        for (;;)
    5984159679        {
     
    5984659684            if (vim_regexec(&regmatch, p, 0)
    5984759685                                         && regmatch.endp[0] == line + endcol)
    59848 @@ -11644,7 +11670,7 @@
     59686@@ -11644,7 +11671,7 @@
    5984959687 
    5985059688                /* When appending a compound word after a word character don't
     
    5985559693                make_case_word(tword + sp->ts_splitoff,
    5985659694                                              preword + sp->ts_prewordlen, c);
    59857 @@ -11894,7 +11920,8 @@
     59695@@ -11894,7 +11921,8 @@
    5985859696                         * character when the word ends.  But only when the
    5985959697                         * good word can end. */
     
    5986559703                                && fword[sp->ts_fidx] != NUL
    5986659704                                && goodword_ends)
    59867 @@ -12007,7 +12034,7 @@
     59705@@ -12007,7 +12035,7 @@
    5986859706                /* Normal byte, go one level deeper.  If it's not equal to the
    5986959707                 * byte in the bad word adjust the score.  But don't even try
     
    5987459712                if (c == fword[sp->ts_fidx]
    5987559713 #ifdef FEAT_MBYTE
    59876 @@ -13377,9 +13404,8 @@
     59714@@ -13377,9 +13405,8 @@
    5987759715 
    5987859716        /* Lookup the word "orgnr" one of the two tries. */
     
    5988559723            i = 1;
    5988659724            if (wordcount == orgnr && byts[n + 1] == NUL)
    59887 @@ -13393,6 +13419,7 @@
     59725@@ -13393,6 +13420,7 @@
    5988859726                if (i > byts[n])        /* safety check */
    5988959727                {
     
    5989359731                }
    5989459732 
    59895 @@ -13405,7 +13432,7 @@
     59733@@ -13405,7 +13433,7 @@
    5989659734                wordcount += wc;
    5989759735            }
     
    5990259740        }
    5990359741 badword:
    59904 @@ -14225,7 +14252,7 @@
     59742@@ -14225,7 +14253,7 @@
    5990559743            }
    5990659744            else
     
    5991159749                ++s;
    5991259750            }
    59913 @@ -14520,7 +14547,7 @@
     59751@@ -14520,7 +14548,7 @@
    5991459752            else
    5991559753            {
     
    5992059758            }
    5992159759        }
    59922 @@ -15568,11 +15595,21 @@
     59760@@ -15568,11 +15596,21 @@
    5992359761 ex_spelldump(eap)
    5992459762     exarg_T *eap;
     
    5994359781        return;
    5994459782 
    59945 @@ -16034,7 +16071,7 @@
     59783@@ -16034,7 +16072,7 @@
    5994659784     for (p = line + startcol; p > line; )
    5994759785     {
     
    5995459792diff -Naur vim74.orig/src/structs.h vim74/src/structs.h
    5995559793--- vim74.orig/src/structs.h    2013-07-03 13:35:59.000000000 +0000
    59956 +++ vim74/src/structs.h 2014-04-27 05:20:58.375108373 +0000
     59794+++ vim74/src/structs.h 2014-06-01 00:43:17.970803882 +0000
    5995759795@@ -346,9 +346,7 @@
    5995859796 #endif
     
    6001859856     char_u     *save_ei;               /* saved value of 'eventignore' */
    6001959857 # endif
    60020 @@ -963,7 +967,8 @@
     59858@@ -568,7 +572,7 @@
     59859     unsigned   mf_page_size;           /* number of bytes in a page */
     59860     int                mf_dirty;               /* TRUE if there are dirty blocks */
     59861 #ifdef FEAT_CRYPT
     59862-    buf_T      *mf_buffer;             /* bufer this memfile is for */
     59863+    buf_T      *mf_buffer;             /* buffer this memfile is for */
     59864     char_u     mf_seed[MF_SEED_LEN];   /* seed for encryption */
     59865 
     59866     /* Values for key, method and seed used for reading data blocks when
     59867@@ -671,6 +675,7 @@
     59868 {
     59869     garray_T   al_ga;          /* growarray with the array of file names */
     59870     int                al_refcount;    /* number of windows using this arglist */
     59871+    int                id;             /* id of this arglist */
     59872 } alist_T;
     59873 
     59874 /*
     59875@@ -963,7 +968,8 @@
    6002159876     int                        typebuf_valid;      /* TRUE when save_typebuf valid */
    6002259877     int                        old_char;
     
    6002859883     char_u             *save_inputbuf;
    6002959884 #endif
    60030 @@ -1088,7 +1093,7 @@
     59885@@ -1088,7 +1094,7 @@
    6003159886 typedef long_u hash_T;         /* Type for hi_hash */
    6003259887 
     
    6003759892 #else
    6003859893 typedef int    varnumber_T;
    60039 @@ -1309,6 +1314,9 @@
     59894@@ -1309,6 +1315,9 @@
    6004059895     regprog_T  *b_cap_prog;    /* program for 'spellcapcheck' */
    6004159896     char_u     *b_p_spf;       /* 'spellfile' */
     
    6004759902 #if !defined(FEAT_SYN_HL) && !defined(FEAT_SPELL)
    6004859903     int                dummy;
    60049 @@ -1397,12 +1405,10 @@
     59904@@ -1397,12 +1406,10 @@
    6005059905 
    6005159906     pos_T      b_namedm[NMARKS]; /* current named marks (mark.c) */
     
    6006159916 
    6006259917     pos_T      b_last_cursor;  /* cursor position when last unloading this
    60063 @@ -1440,6 +1446,7 @@
     59918@@ -1440,6 +1447,7 @@
    6006459919      * start and end of an operator, also used for '[ and ']
    6006559920      */
     
    6006959924 
    6007059925 #ifdef FEAT_VIMINFO
    60071 @@ -1627,12 +1634,55 @@
     59926@@ -1627,12 +1635,55 @@
    6007259927     char_u     *b_p_dict;      /* 'dictionary' local value */
    6007359928     char_u     *b_p_tsr;       /* 'thesaurus' local value */
     
    6012559980                                 * write should not have an end-of-line */
    6012659981 
    60127 @@ -1927,7 +1977,6 @@
     59982@@ -1927,7 +1978,6 @@
    6012859983                                       time through cursupdate() to the
    6012959984                                       current virtual column */
     
    6013359988      * the next six are used to update the visual part
    6013459989      */
    60135 @@ -1938,7 +1987,6 @@
     59990@@ -1938,7 +1988,6 @@
    6013659991     linenr_T   w_old_visual_lnum;  /* last known start of visual part */
    6013759992     colnr_T    w_old_visual_col;   /* last known start of visual part */
     
    6014159996     /*
    6014259997      * "w_topline", "w_leftcol" and "w_skipcol" specify the offsets for
    60143 @@ -2240,10 +2288,8 @@
     59998@@ -2240,10 +2289,8 @@
    6014459999                                   (inclusive) */
    6014560000     int                empty;          /* op_start and op_end the same (only used by
     
    6015460009diff -Naur vim74.orig/src/syntax.c vim74/src/syntax.c
    6015560010--- vim74.orig/src/syntax.c     2013-06-08 14:10:08.000000000 +0000
    60156 +++ vim74/src/syntax.c  2014-04-27 05:20:58.378441790 +0000
     60011+++ vim74/src/syntax.c  2014-06-01 00:43:18.047470354 +0000
    6015760012@@ -6837,10 +6837,8 @@
    6015860013        CENT("SignColumn term=standout ctermbg=Grey ctermfg=DarkBlue",
     
    6018860043diff -Naur vim74.orig/src/tag.c vim74/src/tag.c
    6018960044--- vim74.orig/src/tag.c        2013-06-15 20:26:26.000000000 +0000
    60190 +++ vim74/src/tag.c     2014-04-27 05:20:58.381775206 +0000
     60045+++ vim74/src/tag.c     2014-06-01 00:43:18.100803551 +0000
    6019160046@@ -741,8 +741,10 @@
    6019260047                            break;
     
    6026360118diff -Naur vim74.orig/src/term.c vim74/src/term.c
    6026460119--- vim74.orig/src/term.c       2013-07-04 20:29:28.000000000 +0000
    60265 +++ vim74/src/term.c    2014-04-27 05:20:58.381775206 +0000
    60266 @@ -3356,7 +3356,7 @@
     60120+++ vim74/src/term.c    2014-06-01 00:43:18.190803322 +0000
     60121@@ -153,6 +153,11 @@
     60122 static char_u *vim_tgetstr __ARGS((char *s, char_u **pp));
     60123 #endif /* HAVE_TGETENT */
     60124 
     60125+#if defined(FEAT_TERMRESPONSE)
     60126+static int xt_index_in = 0;
     60127+static int xt_index_out = 0;
     60128+#endif
     60129+
     60130 static int  detected_8bit = FALSE;     /* detected 8-bit terminal */
     60131 
     60132 static struct builtin_term builtin_termcaps[] =
     60133@@ -3259,7 +3264,7 @@
     60134            may_req_termresponse();
     60135            /* Immediately check for a response.  If t_Co changes, we don't
     60136             * want to redraw with wrong colors first. */
     60137-           if (crv_status != CRV_GET)
     60138+           if (crv_status == CRV_SENT)
     60139                check_for_codes_from_term();
     60140        }
     60141 #endif
     60142@@ -3307,6 +3312,27 @@
     60143 }
     60144 
     60145 #if defined(FEAT_TERMRESPONSE) || defined(PROTO)
     60146+# if defined(UNIX) || defined(PROTO)
     60147+/*
     60148+ * Return TRUE when the xterm version was requested or anything else that
     60149+ * would send an ESC sequence back to Vim.
     60150+ * If not sent yet, prevent it from being sent soon.
     60151+ * Used to check whether it is OK to enable checking for DEC mouse codes,
     60152+ * which conflict with may xterm ESC sequences.
     60153+ */
     60154+    int
     60155+did_request_esc_sequence()
     60156+{
     60157+    if (crv_status == CRV_GET)
     60158+       crv_status = 0;
     60159+    if (u7_status == U7_GET)
     60160+       u7_status = 0;
     60161+    return crv_status == CRV_SENT || u7_status == U7_SENT
     60162+                                               || xt_index_out > xt_index_in;
     60163+}
     60164+# endif
     60165+
     60166+
     60167 /*
     60168  * Request version string (for xterm) when needed.
     60169  * Only do this after switching to raw mode, otherwise the result will be
     60170@@ -3319,6 +3345,8 @@
     60171  * Insert mode.
     60172  * On Unix only do it when both output and input are a tty (avoid writing
     60173  * request to terminal while reading from a file).
     60174+ * Do not do this when a mouse is being detected that starts with the same ESC
     60175+ * sequence as the termresponse.
     60176  * The result is caught in check_termcode().
     60177  */
     60178     void
     60179@@ -3332,6 +3360,7 @@
     60180 # ifdef UNIX
     60181            && isatty(1)
     60182            && isatty(read_cmd_fd)
     60183+           && !xterm_conflict_mouse
     60184 # endif
     60185            && *T_CRV != NUL)
     60186     {
     60187@@ -3356,7 +3385,7 @@
    6026760188  * it must be called immediately after entering termcap mode.
    6026860189  */
     
    6027360194     if (u7_status == U7_GET
    6027460195            && cur_tmode == TMODE_RAW
    60275 @@ -3379,7 +3379,8 @@
     60196@@ -3379,7 +3408,8 @@
    6027660197         out_str(buf);
    6027760198         out_str(T_U7);
     
    6028360204         term_windgoto(0, 0);
    6028460205         /* check for the characters now, otherwise they might be eaten by
    60285 @@ -3455,12 +3456,9 @@
     60206@@ -3455,12 +3485,9 @@
    6028660207        return;
    6028760208     }
     
    6029760218     else if (State & INSERT)
    6029860219        checkfor = MOUSE_INSERT;
    60299 @@ -4185,24 +4183,38 @@
     60220@@ -4185,24 +4212,38 @@
    6030060221                            || (tp[0] == CSI && len >= 2))
    6030160222                        && (VIM_ISDIGIT(*p) || *p == '>' || *p == '?'))
     
    6034160262                    char *aw = NULL;
    6034260263 
    60343 @@ -4211,18 +4223,16 @@
     60264@@ -4211,18 +4252,16 @@
    6034460265 # ifdef FEAT_AUTOCMD
    6034560266                    did_cursorhold = TRUE;
     
    6036360284                            char buf[100];
    6036460285                            int  r = redraw_asap(CLEAR);
    60365 @@ -4231,9 +4241,9 @@
     60286@@ -4231,9 +4270,9 @@
    6036660287                                                                           r);
    6036760288                            log_tr(buf);
     
    6037560296                    key_name[0] = (int)KS_EXTRA;
    6037660297                    key_name[1] = (int)KE_IGNORE;
     60298@@ -5704,9 +5743,6 @@
     60299  * termcap codes from the terminal itself.
     60300  * We get them one by one to avoid a very long response string.
     60301  */
     60302-static int xt_index_in = 0;
     60303-static int xt_index_out = 0;
     60304-
     60305     static void
     60306 req_codes_from_term()
     60307 {
    6037760308diff -Naur vim74.orig/src/testdir/Make_amiga.mak vim74/src/testdir/Make_amiga.mak
    6037860309--- vim74.orig/src/testdir/Make_amiga.mak       2013-07-09 11:40:02.000000000 +0000
    60379 +++ vim74/src/testdir/Make_amiga.mak    2014-04-27 05:20:58.385108623 +0000
    60380 @@ -33,7 +33,11 @@
     60310+++ vim74/src/testdir/Make_amiga.mak    2014-06-01 00:43:18.240803195 +0000
     60311@@ -33,7 +33,12 @@
    6038160312                test76.out test77.out test78.out test79.out test80.out \
    6038260313                test81.out test82.out test83.out test84.out test88.out \
     
    6038560316+               test94.out test95.out test96.out test97.out test98.out \
    6038660317+               test99.out test100.out test101.out test102.out test103.out \
    60387 +               test104.out test105.out test106.out \
     60318+               test104.out test105.out test106.out test107.out \
     60319+               test_autoformat_join.out \
    6038860320+               test_eval.out \
    6038960321+               test_options.out
     
    6039160323 .SUFFIXES: .in .out
    6039260324 
    60393 @@ -148,3 +152,13 @@
     60325@@ -148,3 +153,15 @@
    6039460326 test96.out: test96.in
    6039560327 test97.out: test97.in
     
    6040360335+test105.out: test105.in
    6040460336+test106.out: test106.in
     60337+test107.out: test107.in
     60338+test_autoformat_join.out: test_autoformat_join.in
    6040560339+test_eval.out: test_eval.in
    6040660340+test_options.out: test_options.in
    6040760341diff -Naur vim74.orig/src/testdir/Make_dos.mak vim74/src/testdir/Make_dos.mak
    6040860342--- vim74.orig/src/testdir/Make_dos.mak 2013-07-09 11:40:30.000000000 +0000
    60409 +++ vim74/src/testdir/Make_dos.mak      2014-04-27 05:20:58.385108623 +0000
    60410 @@ -32,7 +32,11 @@
     60343+++ vim74/src/testdir/Make_dos.mak      2014-06-01 00:43:18.240803195 +0000
     60344@@ -32,7 +32,12 @@
    6041160345                test79.out test80.out test81.out test82.out test83.out \
    6041260346                test84.out test85.out test86.out test87.out test88.out \
     
    6041560349+               test94.out test95.out test96.out test98.out test99.out \
    6041660350+               test100.out test101.out test102.out test103.out test104.out \
    60417 +               test105.out test106.out \
     60351+               test105.out test106.out  test107.out\
     60352+               test_autoformat_join.out \
    6041860353+               test_eval.out \
    6041960354+               test_options.out
     
    6042360358diff -Naur vim74.orig/src/testdir/Make_ming.mak vim74/src/testdir/Make_ming.mak
    6042460359--- vim74.orig/src/testdir/Make_ming.mak        2013-07-09 11:40:38.000000000 +0000
    60425 +++ vim74/src/testdir/Make_ming.mak     2014-04-27 05:20:58.385108623 +0000
    60426 @@ -52,7 +52,11 @@
     60360+++ vim74/src/testdir/Make_ming.mak     2014-06-01 00:43:18.244136520 +0000
     60361@@ -52,7 +52,12 @@
    6042760362                test79.out test80.out test81.out test82.out test83.out \
    6042860363                test84.out test85.out test86.out test87.out test88.out \
     
    6043160366+               test94.out test95.out test96.out test98.out test99.out \
    6043260367+               test100.out test101.out test102.out test103.out test104.out \
    60433 +               test105.out test106.out \
     60368+               test105.out test106.out test107.out \
     60369+               test_autoformat_join.out \
    6043460370+               test_eval.out \
    6043560371+               test_options.out
     
    6043960375diff -Naur vim74.orig/src/testdir/Make_os2.mak vim74/src/testdir/Make_os2.mak
    6044060376--- vim74.orig/src/testdir/Make_os2.mak 2013-07-09 11:40:43.000000000 +0000
    60441 +++ vim74/src/testdir/Make_os2.mak      2014-04-27 05:20:58.385108623 +0000
    60442 @@ -34,7 +34,11 @@
     60377+++ vim74/src/testdir/Make_os2.mak      2014-06-01 00:43:18.244136520 +0000
     60378@@ -34,7 +34,12 @@
    6044360379                test76.out test77.out test78.out test79.out test80.out \
    6044460380                test81.out test82.out test83.out test84.out test88.out \
     
    6044760383+               test94.out test95.out test96.out test98.out test99.out \
    6044860384+               test100.out test101.out test102.out test103.out test104.out \
    60449 +               test105.out test106.out \
     60385+               test105.out test106.out test107.out \
     60386+               test_autoformat_join.out \
    6045060387+               test_eval.out \
    6045160388+               test_options.out
     
    6045560392diff -Naur vim74.orig/src/testdir/Make_vms.mms vim74/src/testdir/Make_vms.mms
    6045660393--- vim74.orig/src/testdir/Make_vms.mms 2013-07-09 11:40:47.000000000 +0000
    60457 +++ vim74/src/testdir/Make_vms.mms      2014-04-27 05:20:58.385108623 +0000
     60394+++ vim74/src/testdir/Make_vms.mms      2014-06-01 00:43:18.247469845 +0000
    6045860395@@ -4,7 +4,7 @@
    6045960396 # Authors:     Zoltan Arpadffy, <arpadffy@polarhome.com>
     
    6046160398 #
    6046260399-# Last change:  2013 Jul 09
    60463 +# Last change:  2014 Mar 12
     60400+# Last change:  2014 May 28
    6046460401 #
    6046560402 # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
     
    6049860435 # End of configuration section.
    6049960436 #
    60500 @@ -63,35 +78,46 @@
     60437@@ -63,35 +78,47 @@
    6050160438 
    6050260439 SCRIPT = test1.out  test2.out  test3.out  test4.out  test5.out  \
     
    6052560462+        test95.out test96.out test98.out test99.out \
    6052660463+        test100.out test101.out test103.out test104.out \
    60527 +        test105.out test106.out \
     60464+        test105.out test106.out test107.out \
     60465+        test_autoformat_join.out \
    6052860466+        test_eval.out \
    6052960467+        test_options.out
     
    6055660494 .IFDEF WANT_GUI
    6055760495 SCRIPT_GUI = test16.out
    60558 @@ -99,7 +125,7 @@
     60496@@ -99,7 +126,7 @@
    6055960497 .ENDIF
    6056060498 
     
    6056560503 
    6056660504 .IFDEF WANT_WIN
    60567 @@ -114,6 +140,10 @@
     60505@@ -114,6 +141,10 @@
    6056860506 SCRIPT_MZSCH = test70.out
    6056960507 .ENDIF
     
    6057660514 SCRIPT_GZIP = test11.out
    6057760515 .ENDIF
    60578 @@ -122,10 +152,28 @@
     60516@@ -122,10 +153,28 @@
    6057960517 SCRIPT_GDIFF = test47.out
    6058060518 .ENDIF
     
    6060560543        -@ write sys$output "-----------------------------------------------"
    6060660544        -@ write sys$output "                "$*" "
    60607 @@ -138,9 +186,10 @@
     60545@@ -138,9 +187,10 @@
    6060860546        -@ if "''F$SEARCH("$*.out.*")'"   .NES. "" then differences /par $*.out $*.ok;
    6060960547        -@ !clean up after the test
     
    6061860556        -@ write sys$output "-----------------------------------------------"
    6061960557        -@ write sys$output "                All done"
    60620 @@ -163,13 +212,18 @@
     60558@@ -163,13 +213,18 @@
    6062160559        -@ write sys$output "                Test results:"
    6062260560        -@ write sys$output "-----------------------------------------------"
     
    6064460582        -@ write sys$output "-----------------------------------------------"
    6064560583        -@ type VMS.VIM
    60646 @@ -179,6 +233,9 @@
     60584@@ -179,6 +234,9 @@
    6064760585        -@ if "''F$SEARCH("test.log")'"     .NES. "" then delete/noconfirm/nolog test.log.*
    6064860586        -@ if "''F$SEARCH("test.ok")'"      .NES. "" then delete/noconfirm/nolog test.ok.*
     
    6065460592        -@ if "''F$SEARCH("*.failed")'"     .NES. "" then delete/noconfirm/nolog *.failed.*
    6065560593        -@ if "''F$SEARCH("*.rej")'"        .NES. "" then delete/noconfirm/nolog *.rej.*
    60656 @@ -186,6 +243,6 @@
     60594@@ -186,6 +244,6 @@
    6065760595        -@ if "''F$SEARCH("small.vim")'"    .NES. "" then delete/noconfirm/nolog small.vim.*
    6065860596        -@ if "''F$SEARCH("mbyte.vim")'"    .NES. "" then delete/noconfirm/nolog mbyte.vim.*
     
    6066460602diff -Naur vim74.orig/src/testdir/Makefile vim74/src/testdir/Makefile
    6066560603--- vim74.orig/src/testdir/Makefile     2013-08-10 12:20:20.000000000 +0000
    60666 +++ vim74/src/testdir/Makefile  2014-04-27 05:20:58.385108623 +0000
     60604+++ vim74/src/testdir/Makefile  2014-06-01 00:43:18.250803169 +0000
    6066760605@@ -3,6 +3,7 @@
    6066860606 #
     
    6067360611 # Uncomment this line to use valgrind for memory leaks and extra warnings.
    6067460612 #   The output goes into a file "valgrind.testN"
    60675 @@ -29,7 +30,10 @@
     60613@@ -29,7 +30,12 @@
    6067660614                test79.out test80.out test81.out test82.out test83.out \
    6067760615                test84.out test85.out test86.out test87.out test88.out \
     
    6068060618+               test94.out test95.out test96.out test97.out test98.out \
    6068160619+               test99.out test100.out test101.out test102.out test103.out \
    60682 +               test104.out test105.out test106.out \
     60620+               test104.out test105.out test106.out test107.out \
     60621+               test_autoformat_join.out \
     60622+               test_eval.out \
    6068360623+               test_options.out
    6068460624 
    6068560625 SCRIPTS_GUI = test16.out
    6068660626 
    60687 @@ -51,15 +55,19 @@
     60627@@ -51,15 +57,19 @@
    6068860628 
    6068960629 RM_ON_RUN = test.out X* viminfo
    6069060630 RM_ON_START = tiny.vim small.vim mbyte.vim mzscheme.vim lua.vim test.ok
    6069160631-RUN_VIM = $(VALGRIND) $(VIMPROG) -u unix.vim -U NONE --noplugin -s dotest.in
    60692 +RUN_VIM = export VIMRUNTIME=$(SCRIPTSOURCE); $(VALGRIND) $(VIMPROG) -u unix.vim -U NONE --noplugin -s dotest.in
     60632+RUN_VIM = VIMRUNTIME=$(SCRIPTSOURCE); export VIMRUNTIME; $(VALGRIND) $(VIMPROG) -u unix.vim -U NONE --noplugin -s dotest.in
    6069360633 
    6069460634 clean:
     
    6071060650diff -Naur vim74.orig/src/testdir/sautest/autoload/Test104.vim vim74/src/testdir/sautest/autoload/Test104.vim
    6071160651--- vim74.orig/src/testdir/sautest/autoload/Test104.vim 1970-01-01 00:00:00.000000000 +0000
    60712 +++ vim74/src/testdir/sautest/autoload/Test104.vim      2014-04-27 05:20:58.391775454 +0000
     60652+++ vim74/src/testdir/sautest/autoload/Test104.vim      2014-06-01 00:43:18.450802660 +0000
    6071360653@@ -0,0 +1 @@
    6071460654+let Test104#numvar = 123
    6071560655diff -Naur vim74.orig/src/testdir/sautest/autoload/footest.vim vim74/src/testdir/sautest/autoload/footest.vim
    6071660656--- vim74.orig/src/testdir/sautest/autoload/footest.vim 1970-01-01 00:00:00.000000000 +0000
    60717 +++ vim74/src/testdir/sautest/autoload/footest.vim      2014-04-27 05:20:58.391775454 +0000
     60657+++ vim74/src/testdir/sautest/autoload/footest.vim      2014-06-01 00:43:18.464135959 +0000
    6071860658@@ -0,0 +1,5 @@
    6071960659+" Autoload script used by test55 and test60
     
    6072460664diff -Naur vim74.orig/src/testdir/test1.in vim74/src/testdir/test1.in
    6072560665--- vim74.orig/src/testdir/test1.in     2012-04-05 14:37:37.000000000 +0000
    60726 +++ vim74/src/testdir/test1.in  2014-04-27 05:20:58.391775454 +0000
     60666+++ vim74/src/testdir/test1.in  2014-06-01 00:43:18.470802609 +0000
    6072760667@@ -18,6 +18,10 @@
    6072860668 Similar logic is applied to the +lua feature, using lua.vim.
     
    6073860678diff -Naur vim74.orig/src/testdir/test100.in vim74/src/testdir/test100.in
    6073960679--- vim74.orig/src/testdir/test100.in   1970-01-01 00:00:00.000000000 +0000
    60740 +++ vim74/src/testdir/test100.in        2014-04-27 05:20:58.395108870 +0000
     60680+++ vim74/src/testdir/test100.in        2014-06-01 00:43:18.517469157 +0000
    6074160681@@ -0,0 +1,50 @@
    6074260682+Tests for 'undolevel' and 'lispwords' settings being global-local
     
    6079260732diff -Naur vim74.orig/src/testdir/test100.ok vim74/src/testdir/test100.ok
    6079360733--- vim74.orig/src/testdir/test100.ok   1970-01-01 00:00:00.000000000 +0000
    60794 +++ vim74/src/testdir/test100.ok        2014-04-27 05:20:58.395108870 +0000
     60734+++ vim74/src/testdir/test100.ok        2014-06-01 00:43:18.517469157 +0000
    6079560735@@ -0,0 +1,51 @@
    6079660736+ONE: expecting global undolevels: 5, local undolevels: -123456 (default)
     
    6084760787diff -Naur vim74.orig/src/testdir/test101.in vim74/src/testdir/test101.in
    6084860788--- vim74.orig/src/testdir/test101.in   1970-01-01 00:00:00.000000000 +0000
    60849 +++ vim74/src/testdir/test101.in        2014-04-27 05:20:58.395108870 +0000
     60789+++ vim74/src/testdir/test101.in        2014-06-01 00:43:18.540802431 +0000
    6085060790@@ -0,0 +1,45 @@
    6085160791+Test for v:hlsearch     vim: set ft=vim :
     
    6089660836diff -Naur vim74.orig/src/testdir/test101.ok vim74/src/testdir/test101.ok
    6089760837--- vim74.orig/src/testdir/test101.ok   1970-01-01 00:00:00.000000000 +0000
    60898 +++ vim74/src/testdir/test101.ok        2014-04-27 05:20:58.395108870 +0000
     60838+++ vim74/src/testdir/test101.ok        2014-06-01 00:43:18.544135756 +0000
    6089960839@@ -0,0 +1,11 @@
    6090060840+start:
     
    6091160851diff -Naur vim74.orig/src/testdir/test102.in vim74/src/testdir/test102.in
    6091260852--- vim74.orig/src/testdir/test102.in   1970-01-01 00:00:00.000000000 +0000
    60913 +++ vim74/src/testdir/test102.in        2014-04-27 05:20:58.395108870 +0000
     60853+++ vim74/src/testdir/test102.in        2014-06-01 00:43:18.557469055 +0000
    6091460854@@ -0,0 +1,12 @@
    6091560855+Test if fnameescape is correct for special chars like !
     
    6092760867diff -Naur vim74.orig/src/testdir/test102.ok vim74/src/testdir/test102.ok
    6092860868--- vim74.orig/src/testdir/test102.ok   1970-01-01 00:00:00.000000000 +0000
    60929 +++ vim74/src/testdir/test102.ok        2014-04-27 05:20:58.395108870 +0000
     60869+++ vim74/src/testdir/test102.ok        2014-06-01 00:43:18.560802380 +0000
    6093060870@@ -0,0 +1,3 @@
    6093160871+
     
    6093460874diff -Naur vim74.orig/src/testdir/test103.in vim74/src/testdir/test103.in
    6093560875--- vim74.orig/src/testdir/test103.in   1970-01-01 00:00:00.000000000 +0000
    60936 +++ vim74/src/testdir/test103.in        2014-04-27 05:20:58.395108870 +0000
     60876+++ vim74/src/testdir/test103.in        2014-06-01 00:43:18.574135679 +0000
    6093760877@@ -0,0 +1,37 @@
    6093860878+Test for visual mode not being reset causing E315 error.
     
    6097560915diff -Naur vim74.orig/src/testdir/test103.ok vim74/src/testdir/test103.ok
    6097660916--- vim74.orig/src/testdir/test103.ok   1970-01-01 00:00:00.000000000 +0000
    60977 +++ vim74/src/testdir/test103.ok        2014-04-27 05:20:58.395108870 +0000
     60917+++ vim74/src/testdir/test103.ok        2014-06-01 00:43:18.590802304 +0000
    6097860918@@ -0,0 +1,2 @@
    6097960919+
     
    6098160921diff -Naur vim74.orig/src/testdir/test104.in vim74/src/testdir/test104.in
    6098260922--- vim74.orig/src/testdir/test104.in   1970-01-01 00:00:00.000000000 +0000
    60983 +++ vim74/src/testdir/test104.in        2014-04-27 05:20:58.395108870 +0000
     60923+++ vim74/src/testdir/test104.in        2014-06-01 00:43:18.600802278 +0000
    6098460924@@ -0,0 +1,30 @@
    6098560925+Tests for :let.  vim: set ft=vim ts=8 :
     
    6101560955diff -Naur vim74.orig/src/testdir/test104.ok vim74/src/testdir/test104.ok
    6101660956--- vim74.orig/src/testdir/test104.ok   1970-01-01 00:00:00.000000000 +0000
    61017 +++ vim74/src/testdir/test104.ok        2014-04-27 05:20:58.395108870 +0000
     60957+++ vim74/src/testdir/test104.ok        2014-06-01 00:43:18.614135578 +0000
    6101860958@@ -0,0 +1,13 @@
    6101960959+Results of test104:
     
    6103260972diff -Naur vim74.orig/src/testdir/test105.in vim74/src/testdir/test105.in
    6103360973--- vim74.orig/src/testdir/test105.in   1970-01-01 00:00:00.000000000 +0000
    61034 +++ vim74/src/testdir/test105.in        2014-04-27 05:20:58.395108870 +0000
     60974+++ vim74/src/testdir/test105.in        2014-06-01 00:43:18.620802227 +0000
    6103560975@@ -0,0 +1,45 @@
    6103660976+Test filename modifiers     vim: set ft=vim :
     
    6108161021diff -Naur vim74.orig/src/testdir/test105.ok vim74/src/testdir/test105.ok
    6108261022--- vim74.orig/src/testdir/test105.ok   1970-01-01 00:00:00.000000000 +0000
    61083 +++ vim74/src/testdir/test105.ok        2014-04-27 05:20:58.398442287 +0000
     61023+++ vim74/src/testdir/test105.ok        2014-06-01 00:43:18.627468877 +0000
    6108461024@@ -0,0 +1,29 @@
    6108561025+fnamemodify('.',              ':p'      )[-1:] '/'
     
    6111461054diff -Naur vim74.orig/src/testdir/test106.in vim74/src/testdir/test106.in
    6111561055--- vim74.orig/src/testdir/test106.in   1970-01-01 00:00:00.000000000 +0000
    61116 +++ vim74/src/testdir/test106.in        2014-04-27 05:20:58.398442287 +0000
     61056+++ vim74/src/testdir/test106.in        2014-06-01 00:43:18.644135501 +0000
    6111761057@@ -0,0 +1,16 @@
    6111861058+Tests for errorformat.  vim: set ft=vim ts=8 :
     
    6113461074diff -Naur vim74.orig/src/testdir/test106.ok vim74/src/testdir/test106.ok
    6113561075--- vim74.orig/src/testdir/test106.ok   1970-01-01 00:00:00.000000000 +0000
    61136 +++ vim74/src/testdir/test106.ok        2014-04-27 05:20:58.398442287 +0000
     61076+++ vim74/src/testdir/test106.ok        2014-06-01 00:43:18.657468801 +0000
    6113761077@@ -0,0 +1,4 @@
    6113861078+Results of test106:
     
    6114061080+[['W', 1], ['E^@CCCC', 1]]
    6114161081+[['W', 1], ['ZZZZ', 0], ['E^@CCCC', 1], ['YYYY', 0]]
     61082diff -Naur vim74.orig/src/testdir/test107.in vim74/src/testdir/test107.in
     61083--- vim74.orig/src/testdir/test107.in   1970-01-01 00:00:00.000000000 +0000
     61084+++ vim74/src/testdir/test107.in        2014-06-01 00:43:18.657468801 +0000
     61085@@ -0,0 +1,38 @@
     61086+Tests for adjusting window and contents     vim: set ft=vim :
     61087+
     61088+STARTTEST
     61089+:so small.vim
     61090+:new
     61091+:call setline(1, range(1,256))
     61092+:let r=[]
     61093+:func! GetScreenStr(row)
     61094+:   let str = ""
     61095+:   for c in range(1,3)
     61096+:       let str .= nr2char(screenchar(a:row, c))
     61097+:   endfor
     61098+:   return str
     61099+:endfunc
     61100+:
     61101+:exe ":norm! \<C-W>t\<C-W>=1Gzt\<C-W>w\<C-W>+"
     61102+:let s3=GetScreenStr(1)
     61103+:wincmd p
     61104+:call add(r, [line("w0"), s3])
     61105+:
     61106+:exe ":norm! \<C-W>t\<C-W>=50Gzt\<C-W>w\<C-W>+"
     61107+:let s3=GetScreenStr(1)
     61108+:wincmd p
     61109+:call add(r, [line("w0"), s3])
     61110+:
     61111+:exe ":norm! \<C-W>t\<C-W>=59Gzt\<C-W>w\<C-W>+"
     61112+:let s3=GetScreenStr(1)
     61113+::wincmd p
     61114+:call add(r, [line("w0"), s3])
     61115+:
     61116+:bwipeout!
     61117+:$put=r
     61118+:call garbagecollect(1)
     61119+:"
     61120+:/^start:/,$wq! test.out
     61121+ENDTEST
     61122+
     61123+start:
     61124diff -Naur vim74.orig/src/testdir/test107.ok vim74/src/testdir/test107.ok
     61125--- vim74.orig/src/testdir/test107.ok   1970-01-01 00:00:00.000000000 +0000
     61126+++ vim74/src/testdir/test107.ok        2014-06-01 00:43:18.660802125 +0000
     61127@@ -0,0 +1,4 @@
     61128+start:
     61129+[1, '1  ']
     61130+[50, '50 ']
     61131+[59, '59 ']
    6114261132diff -Naur vim74.orig/src/testdir/test14.in vim74/src/testdir/test14.in
    6114361133--- vim74.orig/src/testdir/test14.in    2013-04-03 18:59:14.000000000 +0000
    61144 +++ vim74/src/testdir/test14.in 2014-04-27 05:20:58.398442287 +0000
     61134+++ vim74/src/testdir/test14.in 2014-06-01 00:43:18.754135221 +0000
    6114561135@@ -47,7 +47,19 @@
    6114661136 /two
     
    6117461164diff -Naur vim74.orig/src/testdir/test14.ok vim74/src/testdir/test14.ok
    6117561165--- vim74.orig/src/testdir/test14.ok    2013-04-03 18:59:14.000000000 +0000
    61176 +++ vim74/src/testdir/test14.ok 2014-04-27 05:20:58.398442287 +0000
     61166+++ vim74/src/testdir/test14.ok 2014-06-01 00:43:18.767468520 +0000
    6117761167@@ -20,3 +20,7 @@
    6117861168 1
     
    6118561175diff -Naur vim74.orig/src/testdir/test20.in vim74/src/testdir/test20.in
    6118661176--- vim74.orig/src/testdir/test20.in    2010-05-15 11:04:10.000000000 +0000
    61187 +++ vim74/src/testdir/test20.in 2014-04-27 05:20:58.401775704 +0000
     61177+++ vim74/src/testdir/test20.in 2014-06-01 00:43:18.927468113 +0000
    6118861178@@ -9,11 +9,17 @@
    6118961179 @auY:quit!
     
    6120861198diff -Naur vim74.orig/src/testdir/test20.ok vim74/src/testdir/test20.ok
    6120961199--- vim74.orig/src/testdir/test20.ok    2010-05-15 11:04:10.000000000 +0000
    61210 +++ vim74/src/testdir/test20.ok 2014-04-27 05:20:58.401775704 +0000
     61200+++ vim74/src/testdir/test20.ok 2014-06-01 00:43:18.940801412 +0000
    6121161201@@ -1,3 +1,7 @@
    6121261202+123start here56
     
    6121761207                somext
    6121861208                tesext
     61209diff -Naur vim74.orig/src/testdir/test29.in vim74/src/testdir/test29.in
     61210--- vim74.orig/src/testdir/test29.in    2012-06-13 11:48:26.000000000 +0000
     61211+++ vim74/src/testdir/test29.in 2014-06-01 00:43:19.107467655 +0000
     61212@@ -102,6 +102,34 @@
     61213 }
     61214 
     61215 STARTTEST
     61216+:" Test with backspace set to the non-compatible setting
     61217+/^\d\+ this
     61218+:set cp bs=2
     61219+Avim1
     61220+Avim2u
     61221+:set cpo-=<
     61222+:inoremap <c-u> <left><c-u>
     61223+Avim3
     61224+:iunmap <c-u>
     61225+Avim4
     61226+:" Test with backspace set to the compatible setting
     61227+:set bs=
     61228+A vim5A
     61229+A vim6Azweiu
     61230+:inoremap <c-u> <left><c-u>
     61231+A vim7
     61232+:set cp
     61233+ENDTEST
     61234+1 this shouldn't be deleted
     61235+2 this shouldn't be deleted
     61236+3 this shouldn't be deleted
     61237+4 this should be deleted
     61238+5 this shouldn't be deleted
     61239+6 this shouldn't be deleted
     61240+7 this shouldn't be deleted
     61241+8 this shouldn't be deleted (not touched yet)
     61242+
     61243+STARTTEST
     61244 /^{/+1
     61245 :set comments=sO:*\ -,mO:*\ \ ,exO:*/
     61246 :set comments+=s1:/*,mb:*,ex:*/,://
     61247diff -Naur vim74.orig/src/testdir/test29.ok vim74/src/testdir/test29.ok
     61248--- vim74.orig/src/testdir/test29.ok    2012-06-13 11:48:26.000000000 +0000
     61249+++ vim74/src/testdir/test29.ok 2014-06-01 00:43:19.110800979 +0000
     61250@@ -62,6 +62,15 @@
     61251     action();
     61252 }
     61253 
     61254+1 this shouldn't be deleted
     61255+2 this shouldn't be deleted
     61256+3 this shouldn't be deleted
     61257+4 this should be deleted3
     61258+
     61259+6 this shouldn't be deleted vim5
     61260+7 this shouldn't be deleted vim6
     61261+8 this shouldn't be deleted (not touched yet) vim7
     61262+
     61263 
     61264 {
     61265 /* Make sure the previous comment leader is not removed.  */
    6121961266diff -Naur vim74.orig/src/testdir/test32.in vim74/src/testdir/test32.in
    6122061267--- vim74.orig/src/testdir/test32.in    2010-05-15 11:04:10.000000000 +0000
    61221 +++ vim74/src/testdir/test32.in 2014-04-27 05:20:58.408442535 +0000
     61268+++ vim74/src/testdir/test32.in 2014-06-01 00:43:19.207467400 +0000
    6122261269@@ -36,6 +36,9 @@
    6122361270 :w Xtest11.one
     
    6123261279diff -Naur vim74.orig/src/testdir/test34.in vim74/src/testdir/test34.in
    6123361280--- vim74.orig/src/testdir/test34.in    2012-07-16 14:51:29.000000000 +0000
    61234 +++ vim74/src/testdir/test34.in 2014-04-27 05:20:58.411775950 +0000
     61281+++ vim74/src/testdir/test34.in 2014-06-01 00:43:19.244133973 +0000
    6123561282@@ -1,6 +1,7 @@
    6123661283 Test for user functions.
     
    6126261309diff -Naur vim74.orig/src/testdir/test34.ok vim74/src/testdir/test34.ok
    6126361310--- vim74.orig/src/testdir/test34.ok    2012-07-16 14:43:15.000000000 +0000
    61264 +++ vim74/src/testdir/test34.ok 2014-04-27 05:20:58.411775950 +0000
     61311+++ vim74/src/testdir/test34.ok 2014-06-01 00:43:19.250800623 +0000
    6126561312@@ -6,3 +6,5 @@
    6126661313 1. one again
     
    6127161318diff -Naur vim74.orig/src/testdir/test37.ok vim74/src/testdir/test37.ok
    6127261319--- vim74.orig/src/testdir/test37.ok    2010-05-15 11:04:10.000000000 +0000
    61273 +++ vim74/src/testdir/test37.ok 2014-04-27 05:20:58.411775950 +0000
     61320+++ vim74/src/testdir/test37.ok 2014-06-01 00:43:19.300800496 +0000
    6127461321@@ -27,7 +27,7 @@
    6127561322 
     
    6128561332diff -Naur vim74.orig/src/testdir/test39.in vim74/src/testdir/test39.in
    6128661333--- vim74.orig/src/testdir/test39.in    2013-03-07 17:30:38.000000000 +0000
    61287 +++ vim74/src/testdir/test39.in 2014-04-27 05:20:58.415109367 +0000
     61334+++ vim74/src/testdir/test39.in 2014-06-01 00:43:19.330800419 +0000
    6128861335@@ -19,6 +19,28 @@
    6128961336 :" Test block-change
     
    6135761404diff -Naur vim74.orig/src/testdir/test39.ok vim74/src/testdir/test39.ok
    6135861405--- vim74.orig/src/testdir/test39.ok    2013-03-07 17:28:51.000000000 +0000
    61359 +++ vim74/src/testdir/test39.ok 2014-04-27 05:20:58.415109367 +0000
     61406+++ vim74/src/testdir/test39.ok 2014-06-01 00:43:19.334133744 +0000
    6136061407@@ -3,6 +3,24 @@
    6136161408 axyzqqqqef mno        ghijklm
     
    6141161458diff -Naur vim74.orig/src/testdir/test44.in vim74/src/testdir/test44.in
    6141261459--- vim74.orig/src/testdir/test44.in    2013-05-26 12:16:31.000000000 +0000
    61413 +++ vim74/src/testdir/test44.in 2014-04-27 05:20:58.418442783 +0000
     61460+++ vim74/src/testdir/test44.in 2014-06-01 00:43:19.467466738 +0000
    6141461461@@ -1,9 +1,11 @@
    6141561462 Tests for regexp with multi-byte encoding and various magic settings.
     
    6142461471 /a*b\{2}c\+/e
    6142561472 x/\Md\*e\{2}f\+/e
     61473diff -Naur vim74.orig/src/testdir/test49.in vim74/src/testdir/test49.in
     61474--- vim74.orig/src/testdir/test49.in    2012-11-15 21:29:55.000000000 +0000
     61475+++ vim74/src/testdir/test49.in 2014-06-01 00:43:19.560799833 +0000
     61476@@ -1,7 +1,7 @@
     61477 This is a test of the script language.
     61478 
     61479 If after adding a new test, the test output doesn't appear properly in
     61480-test49.failed, try to add one ore more "G"s at the line ending in "test.out"
     61481+test49.failed, try to add one or more "G"s at the line ending in "test.out"
     61482 
     61483 STARTTEST
     61484 :so small.vim
    6142661485diff -Naur vim74.orig/src/testdir/test53.in vim74/src/testdir/test53.in
    6142761486--- vim74.orig/src/testdir/test53.in    2013-06-30 12:31:56.000000000 +0000
    61428 +++ vim74/src/testdir/test53.in 2014-04-27 05:20:58.421776200 +0000
     61487+++ vim74/src/testdir/test53.in 2014-06-01 00:43:19.714132776 +0000
    6142961488@@ -4,6 +4,8 @@
    6143061489 
     
    6150061559diff -Naur vim74.orig/src/testdir/test53.ok vim74/src/testdir/test53.ok
    6150161560--- vim74.orig/src/testdir/test53.ok    2013-06-30 12:31:56.000000000 +0000
    61502 +++ vim74/src/testdir/test53.ok 2014-04-27 05:20:58.425109616 +0000
     61561+++ vim74/src/testdir/test53.ok 2014-06-01 00:43:19.720799426 +0000
    6150361562@@ -18,6 +18,28 @@
    6150461563 a
     
    6154961608diff -Naur vim74.orig/src/testdir/test55.in vim74/src/testdir/test55.in
    6155061609--- vim74.orig/src/testdir/test55.in    2013-03-07 13:33:12.000000000 +0000
    61551 +++ vim74/src/testdir/test55.in 2014-04-27 05:20:58.425109616 +0000
     61610+++ vim74/src/testdir/test55.in 2014-06-01 00:43:19.757465999 +0000
    6155261611@@ -282,6 +282,13 @@
    6155361612 :    $put =ps
     
    6158461643diff -Naur vim74.orig/src/testdir/test55.ok vim74/src/testdir/test55.ok
    6158561644--- vim74.orig/src/testdir/test55.ok    2012-08-29 14:51:15.000000000 +0000
    61586 +++ vim74/src/testdir/test55.ok 2014-04-27 05:20:58.425109616 +0000
     61645+++ vim74/src/testdir/test55.ok 2014-06-01 00:43:19.767465974 +0000
    6158761646@@ -86,16 +86,21 @@
    6158861647 FFpFFpp
     
    6161461673diff -Naur vim74.orig/src/testdir/test60.in vim74/src/testdir/test60.in
    6161561674--- vim74.orig/src/testdir/test60.in    2010-05-15 11:04:10.000000000 +0000
    61616 +++ vim74/src/testdir/test60.in 2014-04-27 05:20:58.428443032 +0000
     61675+++ vim74/src/testdir/test60.in 2014-06-01 00:43:19.904132292 +0000
    6161761676@@ -1,4 +1,4 @@
    6161861677-Tests for the exists() function.  vim: set ft=vim :
     
    6169861757diff -Naur vim74.orig/src/testdir/test60.ok vim74/src/testdir/test60.ok
    6169961758--- vim74.orig/src/testdir/test60.ok    2010-05-15 11:04:10.000000000 +0000
    61700 +++ vim74/src/testdir/test60.ok 2014-04-27 05:20:58.428443032 +0000
     61759+++ vim74/src/testdir/test60.ok 2014-06-01 00:43:19.930798891 +0000
    6170161760@@ -71,6 +71,10 @@
    6170261761 OK
     
    6173161790+has patch 9.1.0: 0
    6173261791+has patch 9.9.1: 0
     61792diff -Naur vim74.orig/src/testdir/test62.in vim74/src/testdir/test62.in
     61793--- vim74.orig/src/testdir/test62.in    2013-07-14 11:37:12.000000000 +0000
     61794+++ vim74/src/testdir/test62.in 2014-06-01 00:43:19.970798789 +0000
     61795@@ -2,6 +2,7 @@
     61796 
     61797 STARTTEST
     61798 :so small.vim
     61799+:lang C
     61800 :" Simple test for opening and closing a tab page
     61801 :tabnew
     61802 :let nr = tabpagenr()
    6173361803diff -Naur vim74.orig/src/testdir/test64.in vim74/src/testdir/test64.in
    6173461804--- vim74.orig/src/testdir/test64.in    2013-08-01 15:45:33.000000000 +0000
    61735 +++ vim74/src/testdir/test64.in 2014-04-27 05:20:58.431776447 +0000
    61736 @@ -289,15 +289,29 @@
     61805+++ vim74/src/testdir/test64.in 2014-06-01 00:43:20.014132012 +0000
     61806@@ -238,7 +238,11 @@
     61807 :call add(tl, [2, '\vx(.{-,8})yz(.*)','xayxayzxayzxayz','xayxayzxayzxayz','ayxa','xayzxayz'])
     61808 :call add(tl, [2, '\vx(.*)yz(.*)','xayxayzxayzxayz','xayxayzxayzxayz', 'ayxayzxayzxa',''])
     61809 :call add(tl, [2, '\v(a{1,2}){-2,3}','aaaaaaa','aaaa','aa'])
     61810-:call add(tl, [2, '\v(a{-1,3})+','aa','aa','a'])
     61811+:call add(tl, [2, '\v(a{-1,3})+', 'aa', 'aa', 'a'])
     61812+:call add(tl, [2, '^\s\{-}\zs\( x\|x$\)', ' x', ' x', ' x'])
     61813+:call add(tl, [2, '^\s\{-}\zs\(x\| x$\)', ' x', ' x', ' x'])
     61814+:call add(tl, [2, '^\s\{-}\ze\(x\| x$\)', ' x', '', ' x'])
     61815+:call add(tl, [2, '^\(\s\{-}\)\(x\| x$\)', ' x', ' x', '', ' x'])
     61816 :"
     61817 :" Test Character classes
     61818 :call add(tl, [2, '\d\+e\d\d','test 10e23 fd','10e23'])
     61819@@ -289,15 +293,29 @@
    6173761820 :call add(tl, [2, '.a\%$', " a\n "])
    6173861821 :call add(tl, [2, '.a\%$', " a\n_a", "_a"])
     
    6177361856 :"
    6177461857 :"""" Tests for \z features
    61775 @@ -314,6 +328,7 @@
     61858@@ -314,6 +332,7 @@
    6177661859 :call add(tl, [2, 'abc \zsmatch\ze abc', 'abc abc abc match abc abc', 'match'])
    6177761860 :call add(tl, [2, '\v(a \zsif .*){2}', 'a if then a if last', 'if last', 'a if last'])
     
    6178161864 :"""" Tests for \@= and \& features
    6178261865 :call add(tl, [2, 'abc\@=', 'abc', 'ab'])
    61783 @@ -358,6 +373,7 @@
     61866@@ -358,6 +377,7 @@
    6178461867 :call add(tl, [2, '\%x20', 'yes no', ' '])
    6178561868 :call add(tl, [2, '\%u0020', 'yes no', ' '])
     
    6178961872 :""""" \%[abc]
    6179061873 :call add(tl, [2, 'foo\%[bar]', 'fobar'])
    61791 @@ -390,6 +406,7 @@
     61874@@ -390,6 +410,8 @@
    6179261875 :call add(tl, [2, '^.*\.\(.*\)/.\+\(\1\)\@<!$', 'foo.bat/foo.bat'])
    6179361876 :call add(tl, [2, '^.*\.\(.*\)/.\+\(\1\)\@<=$', 'foo.bat/foo.bat', 'foo.bat/foo.bat', 'bat', 'bat'])
    6179461877 :call add(tl, [2, '\\\@<!\${\(\d\+\%(:.\{-}\)\?\\\@<!\)}', '2013-06-27${0}', '${0}', '0'])
    6179561878+:call add(tl, [2, '^\(a*\)\1$', 'aaaaaaaa', 'aaaaaaaa', 'aaaa'])
     61879+:call add(tl, [2, '^\(a\{-2,}\)\1\+$', 'aaaaaaaaa', 'aaaaaaaaa', 'aaa'])
    6179661880 :"
    6179761881 :"""" Look-behind with limit
    6179861882 :call add(tl, [2, '<\@<=span.', 'xxspanxx<spanyyy', 'spany'])
    61799 @@ -407,9 +424,15 @@
     61883@@ -407,9 +429,15 @@
    6180061884 :call add(tl, [2, '\(foo\)\@<=\>', 'barfoo', '', 'foo'])
    6180161885 :call add(tl, [2, '\(foo\)\@<=.*', 'foobar', 'bar', 'foo'])
     
    6181361897 :call add(tl, [1, '\(a*\)\@>a\|a\+', 'aaaa', 'aaaa'])
    6181461898 :"
    61815 @@ -484,6 +507,8 @@
     61899@@ -438,15 +466,15 @@
     61900 :    try
     61901 :      let l = matchlist(text, pat)
     61902 :    catch
     61903-:      $put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", caused an exception: \"' . v:exception . '\"'
     61904+:      $put ='ERROR ' . engine . ': pat: \"' . pat . '\", text: \"' . text . '\", caused an exception: \"' . v:exception . '\"'
     61905 :    endtry
     61906 :" check the match itself
     61907 :    if len(l) == 0 && len(t) > matchidx
     61908-:      $put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", did not match, expected: \"' . t[matchidx] . '\"'
     61909+:      $put ='ERROR ' . engine . ': pat: \"' . pat . '\", text: \"' . text . '\", did not match, expected: \"' . t[matchidx] . '\"'
     61910 :    elseif len(l) > 0 && len(t) == matchidx
     61911-:      $put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", match: \"' . l[0] . '\", expected no match'
     61912+:      $put ='ERROR ' . engine . ': pat: \"' . pat . '\", text: \"' . text . '\", match: \"' . l[0] . '\", expected no match'
     61913 :    elseif len(t) > matchidx && l[0] != t[matchidx]
     61914-:      $put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", match: \"' . l[0] . '\", expected: \"' . t[matchidx] . '\"'
     61915+:      $put ='ERROR ' . engine . ': pat: \"' . pat . '\", text: \"' . text . '\", match: \"' . l[0] . '\", expected: \"' . t[matchidx] . '\"'
     61916 :    else
     61917 :      $put ='OK ' . engine . ' - ' . pat
     61918 :    endif
     61919@@ -459,7 +487,7 @@
     61920 :          let e = t[matchidx + i]
     61921 :        endif
     61922 :        if l[i] != e
     61923-:          $put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", submatch ' . i . ': \"' . l[i] . '\", expected: \"' . e . '\"'
     61924+:          $put ='ERROR ' . engine . ': pat: \"' . pat . '\", text: \"' . text . '\", submatch ' . i . ': \"' . l[i] . '\", expected: \"' . e . '\"'
     61925 :        endif
     61926 :      endfor
     61927 :      unlet i
     61928@@ -484,6 +512,8 @@
    6181661929 :" Check a pattern with a line break and ^ and $
    6181761930 :call add(tl, [2, 'a\n^b$\n^c', ['a', 'b', 'c'], ['XX']])
     
    6182461937diff -Naur vim74.orig/src/testdir/test64.ok vim74/src/testdir/test64.ok
    6182561938--- vim74.orig/src/testdir/test64.ok    2013-08-01 16:28:56.000000000 +0000
    61826 +++ vim74/src/testdir/test64.ok 2014-04-27 05:20:58.431776447 +0000
    61827 @@ -650,30 +650,72 @@
     61939+++ vim74/src/testdir/test64.ok 2014-06-01 00:43:20.020798662 +0000
     61940@@ -533,6 +533,18 @@
     61941 OK 0 - \v(a{-1,3})+
     61942 OK 1 - \v(a{-1,3})+
     61943 OK 2 - \v(a{-1,3})+
     61944+OK 0 - ^\s\{-}\zs\( x\|x$\)
     61945+OK 1 - ^\s\{-}\zs\( x\|x$\)
     61946+OK 2 - ^\s\{-}\zs\( x\|x$\)
     61947+OK 0 - ^\s\{-}\zs\(x\| x$\)
     61948+OK 1 - ^\s\{-}\zs\(x\| x$\)
     61949+OK 2 - ^\s\{-}\zs\(x\| x$\)
     61950+OK 0 - ^\s\{-}\ze\(x\| x$\)
     61951+OK 1 - ^\s\{-}\ze\(x\| x$\)
     61952+OK 2 - ^\s\{-}\ze\(x\| x$\)
     61953+OK 0 - ^\(\s\{-}\)\(x\| x$\)
     61954+OK 1 - ^\(\s\{-}\)\(x\| x$\)
     61955+OK 2 - ^\(\s\{-}\)\(x\| x$\)
     61956 OK 0 - \d\+e\d\d
     61957 OK 1 - \d\+e\d\d
     61958 OK 2 - \d\+e\d\d
     61959@@ -650,30 +662,72 @@
    6182861960 OK 0 - .a\%$
    6182961961 OK 1 - .a\%$
     
    6191662048 OK 1 - \C[^A-Z]\+
    6191762049 OK 2 - \C[^A-Z]\+
    61918 @@ -710,6 +752,9 @@
     62050@@ -710,6 +764,9 @@
    6191962051 OK 0 - \>\zs.
    6192062052 OK 1 - \>\zs.
     
    6192662058 OK 1 - abc\@=
    6192762059 OK 2 - abc\@=
    61928 @@ -818,6 +863,9 @@
     62060@@ -818,6 +875,9 @@
    6192962061 OK 0 - \%U00000020
    6193062062 OK 1 - \%U00000020
     
    6193662068 OK 1 - foo\%[bar]
    6193762069 OK 2 - foo\%[bar]
    61938 @@ -896,6 +944,9 @@
     62070@@ -896,6 +956,12 @@
    6193962071 OK 0 - \\\@<!\${\(\d\+\%(:.\{-}\)\?\\\@<!\)}
    6194062072 OK 1 - \\\@<!\${\(\d\+\%(:.\{-}\)\?\\\@<!\)}
     
    6194362075+OK 1 - ^\(a*\)\1$
    6194462076+OK 2 - ^\(a*\)\1$
     62077+OK 0 - ^\(a\{-2,}\)\1\+$
     62078+OK 1 - ^\(a\{-2,}\)\1\+$
     62079+OK 2 - ^\(a\{-2,}\)\1\+$
    6194562080 OK 0 - <\@<=span.
    6194662081 OK 1 - <\@<=span.
    6194762082 OK 2 - <\@<=span.
    61948 @@ -932,12 +983,24 @@
     62083@@ -932,12 +998,24 @@
    6194962084 OK 0 - \(foo\)\@<=.*
    6195062085 OK 1 - \(foo\)\@<=.*
     
    6197162106 OK 2 - \(a*\)\@>a\|a\+
    6197262107 OK 0 - \_[^8-9]\+
    61973 @@ -968,6 +1031,9 @@
     62108@@ -968,6 +1046,9 @@
    6197462109 OK 0 - a\n^b$\n^c
    6197562110 OK 1 - a\n^b$\n^c
     
    6198362118diff -Naur vim74.orig/src/testdir/test68.in vim74/src/testdir/test68.in
    6198462119--- vim74.orig/src/testdir/test68.in    2012-07-25 13:57:06.000000000 +0000
    61985 +++ vim74/src/testdir/test68.in 2014-04-27 05:20:58.435109863 +0000
     62120+++ vim74/src/testdir/test68.in 2014-06-01 00:43:20.107465108 +0000
    6198662121@@ -62,6 +62,20 @@
    6198762122 }
     
    6200762142diff -Naur vim74.orig/src/testdir/test68.ok vim74/src/testdir/test68.ok
    6200862143--- vim74.orig/src/testdir/test68.ok    2012-07-25 14:03:05.000000000 +0000
    62009 +++ vim74/src/testdir/test68.ok 2014-04-27 05:20:58.435109863 +0000
     62144+++ vim74/src/testdir/test68.ok 2014-06-01 00:43:20.117465083 +0000
    6201062145@@ -43,6 +43,15 @@
    6201162146 
     
    6202662161diff -Naur vim74.orig/src/testdir/test69.in vim74/src/testdir/test69.in
    6202762162--- vim74.orig/src/testdir/test69.in    2013-03-07 17:30:50.000000000 +0000
    62028 +++ vim74/src/testdir/test69.in 2014-04-27 05:20:58.435109863 +0000
     62163+++ vim74/src/testdir/test69.in 2014-06-01 00:43:20.130798382 +0000
    6202962164@@ -1,6 +1,7 @@
    6203062165 Test for multi-byte text formatting.
     
    6206962204diff -Naur vim74.orig/src/testdir/test69.ok vim74/src/testdir/test69.ok
    6207062205--- vim74.orig/src/testdir/test69.ok    2013-03-07 17:31:32.000000000 +0000
    62071 +++ vim74/src/testdir/test69.ok 2014-04-27 05:20:58.435109863 +0000
     62206+++ vim74/src/testdir/test69.ok 2014-06-01 00:43:20.137465032 +0000
    6207262207@@ -149,3 +149,14 @@
    6207362208 aaaa
     
    6208762222diff -Naur vim74.orig/src/testdir/test72.in vim74/src/testdir/test72.in
    6208862223--- vim74.orig/src/testdir/test72.in    2012-01-04 18:04:17.000000000 +0000
    62089 +++ vim74/src/testdir/test72.in 2014-04-27 05:20:58.438443280 +0000
     62224+++ vim74/src/testdir/test72.in 2014-06-01 00:43:20.217464828 +0000
    6209062225@@ -105,7 +105,11 @@
    6209162226 u:.w >>test.out
     
    6210362238diff -Naur vim74.orig/src/testdir/test75.in vim74/src/testdir/test75.in
    6210462239--- vim74.orig/src/testdir/test75.in    2013-06-29 11:48:42.000000000 +0000
    62105 +++ vim74/src/testdir/test75.in 2014-04-27 05:20:58.438443280 +0000
     62240+++ vim74/src/testdir/test75.in 2014-06-01 00:43:20.277464675 +0000
    6210662241@@ -1,8 +1,11 @@
    6210762242-" Tests for functions.
     
    6214062275diff -Naur vim74.orig/src/testdir/test75.ok vim74/src/testdir/test75.ok
    6214162276--- vim74.orig/src/testdir/test75.ok    2013-06-29 11:50:08.000000000 +0000
    62142 +++ vim74/src/testdir/test75.ok 2014-04-27 05:20:58.438443280 +0000
     62277+++ vim74/src/testdir/test75.ok 2014-06-01 00:43:20.294131299 +0000
    6214362278@@ -4,3 +4,4 @@
    6214462279 {'silent': 0, 'noremap': 0, 'lhs': 'foo', 'mode': ' ', 'nowait': 1, 'expr': 0, 'sid': 0, 'rhs': 'bar', 'buffer': 1}
     
    6214862283diff -Naur vim74.orig/src/testdir/test77a.com vim74/src/testdir/test77a.com
    6214962284--- vim74.orig/src/testdir/test77a.com  1970-01-01 00:00:00.000000000 +0000
    62150 +++ vim74/src/testdir/test77a.com       2014-04-27 05:20:58.438443280 +0000
     62285+++ vim74/src/testdir/test77a.com       2014-06-01 00:43:20.344131172 +0000
    6215162286@@ -0,0 +1,8 @@
    6215262287+$! test77a - help file creating checksum on VMS
     
    6216062295diff -Naur vim74.orig/src/testdir/test77a.in vim74/src/testdir/test77a.in
    6216162296--- vim74.orig/src/testdir/test77a.in   1970-01-01 00:00:00.000000000 +0000
    62162 +++ vim74/src/testdir/test77a.in        2014-04-27 05:20:58.438443280 +0000
     62297+++ vim74/src/testdir/test77a.in        2014-06-01 00:43:20.347464497 +0000
    6216362298@@ -0,0 +1,31 @@
    6216462299+Inserts 2 million lines with consecutive integers starting from 1
     
    6219562330diff -Naur vim74.orig/src/testdir/test77a.ok vim74/src/testdir/test77a.ok
    6219662331--- vim74.orig/src/testdir/test77a.ok   1970-01-01 00:00:00.000000000 +0000
    62197 +++ vim74/src/testdir/test77a.ok        2014-04-27 05:20:58.438443280 +0000
     62332+++ vim74/src/testdir/test77a.ok        2014-06-01 00:43:20.347464497 +0000
    6219862333@@ -0,0 +1 @@
    6219962334+  CHECKSUM$CHECKSUM = "844110470"
    6220062335diff -Naur vim74.orig/src/testdir/test79.in vim74/src/testdir/test79.in
    6220162336--- vim74.orig/src/testdir/test79.in    2013-04-13 09:16:38.000000000 +0000
    62202 +++ vim74/src/testdir/test79.in 2014-04-27 05:20:58.441776697 +0000
     62337+++ vim74/src/testdir/test79.in 2014-06-01 00:43:20.380797745 +0000
    6220362338@@ -1,6 +1,7 @@
    6220462339 Test for *sub-replace-special* and *sub-replace-expression* on :substitute.
     
    6226962404diff -Naur vim74.orig/src/testdir/test79.ok vim74/src/testdir/test79.ok
    6227062405--- vim74.orig/src/testdir/test79.ok    2013-03-19 16:30:51.000000000 +0000
    62271 +++ vim74/src/testdir/test79.ok 2014-04-27 05:20:58.441776697 +0000
     62406+++ vim74/src/testdir/test79.ok 2014-06-01 00:43:20.387464395 +0000
    6227262407@@ -105,6 +105,7 @@
    6227362408 
     
    6229662431diff -Naur vim74.orig/src/testdir/test80.in vim74/src/testdir/test80.in
    6229762432--- vim74.orig/src/testdir/test80.in    2013-03-19 16:30:51.000000000 +0000
    62298 +++ vim74/src/testdir/test80.in 2014-04-27 05:20:58.441776697 +0000
     62433+++ vim74/src/testdir/test80.in 2014-06-01 00:43:20.430797618 +0000
    6229962434@@ -117,6 +117,7 @@
    6230062435 :set cpo&
     
    6234262477diff -Naur vim74.orig/src/testdir/test80.ok vim74/src/testdir/test80.ok
    6234362478--- vim74.orig/src/testdir/test80.ok    2013-03-19 16:31:45.000000000 +0000
    62344 +++ vim74/src/testdir/test80.ok 2014-04-27 05:20:58.441776697 +0000
     62479+++ vim74/src/testdir/test80.ok 2014-06-01 00:43:20.450797567 +0000
    6234562480@@ -90,6 +90,7 @@
    6234662481 
     
    6238062515diff -Naur vim74.orig/src/testdir/test86.in vim74/src/testdir/test86.in
    6238162516--- vim74.orig/src/testdir/test86.in    2013-07-13 12:00:31.000000000 +0000
    62382 +++ vim74/src/testdir/test86.in 2014-04-27 05:20:58.445110113 +0000
     62517+++ vim74/src/testdir/test86.in 2014-06-01 00:43:20.647463733 +0000
    6238362518@@ -39,6 +39,7 @@
    6238462519 py << EOF
     
    6271762852diff -Naur vim74.orig/src/testdir/test86.ok vim74/src/testdir/test86.ok
    6271862853--- vim74.orig/src/testdir/test86.ok    2013-06-23 14:38:39.000000000 +0000
    62719 +++ vim74/src/testdir/test86.ok 2014-04-27 05:20:58.448443529 +0000
     62854+++ vim74/src/testdir/test86.ok 2014-06-01 00:43:20.687463631 +0000
    6272062855@@ -41,6 +41,9 @@
    6272162856 [2, 3]
     
    6294563080diff -Naur vim74.orig/src/testdir/test87.in vim74/src/testdir/test87.in
    6294663081--- vim74.orig/src/testdir/test87.in    2013-07-06 11:41:30.000000000 +0000
    62947 +++ vim74/src/testdir/test87.in 2014-04-27 05:20:58.448443529 +0000
     63082+++ vim74/src/testdir/test87.in 2014-06-01 00:43:20.717463555 +0000
    6294863083@@ -33,6 +33,7 @@
    6294963084 py3 << EOF
     
    6330763442diff -Naur vim74.orig/src/testdir/test87.ok vim74/src/testdir/test87.ok
    6330863443--- vim74.orig/src/testdir/test87.ok    2013-06-23 14:38:39.000000000 +0000
    63309 +++ vim74/src/testdir/test87.ok 2014-04-27 05:20:58.448443529 +0000
     63444+++ vim74/src/testdir/test87.ok 2014-06-01 00:43:20.747463478 +0000
    6331063445@@ -41,6 +41,9 @@
    6331163446 [2, 3]
     
    6354663681diff -Naur vim74.orig/src/testdir/test92.in vim74/src/testdir/test92.in
    6354763682--- vim74.orig/src/testdir/test92.in    2013-04-18 21:33:45.000000000 +0000
    63548 +++ vim74/src/testdir/test92.in 2014-04-27 05:20:58.451776944 +0000
     63683+++ vim74/src/testdir/test92.in 2014-06-01 00:43:20.880796472 +0000
    6354963684@@ -33,7 +33,7 @@
    6355063685 :mksession! test.out
     
    6355863693diff -Naur vim74.orig/src/testdir/test93.in vim74/src/testdir/test93.in
    6355963694--- vim74.orig/src/testdir/test93.in    2013-02-26 16:13:01.000000000 +0000
    63560 +++ vim74/src/testdir/test93.in 2014-04-27 05:20:58.451776944 +0000
     63695+++ vim74/src/testdir/test93.in 2014-06-01 00:43:20.904129746 +0000
    6356163696@@ -33,7 +33,7 @@
    6356263697 :mksession! test.out
     
    6356863703 ENDTEST
    6356963704 
     63705diff -Naur vim74.orig/src/testdir/test95.in vim74/src/testdir/test95.in
     63706--- vim74.orig/src/testdir/test95.in    2013-07-21 14:53:52.000000000 +0000
     63707+++ vim74/src/testdir/test95.in 2014-06-01 00:43:20.937462994 +0000
     63708@@ -50,6 +50,12 @@
     63709 :call add(tl, [2, ".\u05b9", " y\u05bb\u05b9 x\u05b9 ", "y\u05bb\u05b9"])
     63710 :call add(tl, [1, "\u05b9\u05bb", " y\u05b9 x\u05b9\u05bb ", "x\u05b9\u05bb"])
     63711 :call add(tl, [2, ".\u05b9\u05bb", " y\u05bb x\u05b9\u05bb ", "x\u05b9\u05bb"])
     63712+:call add(tl, [2, "a", "ca\u0300t"])
     63713+:call add(tl, [2, "ca", "ca\u0300t"])
     63714+:call add(tl, [2, "a\u0300", "ca\u0300t", "a\u0300"])
     63715+:call add(tl, [2, 'a\%C', "ca\u0300t", "a\u0300"])
     63716+:call add(tl, [2, 'ca\%C', "ca\u0300t", "ca\u0300"])
     63717+:call add(tl, [2, 'ca\%Ct', "ca\u0300t", "ca\u0300t"])
     63718 
     63719 
     63720 :"""" Test \Z
     63721@@ -89,15 +95,15 @@
     63722 :    try
     63723 :      let l = matchlist(text, pat)
     63724 :    catch
     63725-:      $put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", caused an exception: \"' . v:exception . '\"'
     63726+:      $put ='ERROR ' . engine . ': pat: \"' . pat . '\", text: \"' . text . '\", caused an exception: \"' . v:exception . '\"'
     63727 :    endtry
     63728 :" check the match itself
     63729 :    if len(l) == 0 && len(t) > matchidx
     63730-:      $put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", did not match, expected: \"' . t[matchidx] . '\"'
     63731+:      $put ='ERROR ' . engine . ': pat: \"' . pat . '\", text: \"' . text . '\", did not match, expected: \"' . t[matchidx] . '\"'
     63732 :    elseif len(l) > 0 && len(t) == matchidx
     63733-:      $put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", match: \"' . l[0] . '\", expected no match'
     63734+:      $put ='ERROR ' . engine . ': pat: \"' . pat . '\", text: \"' . text . '\", match: \"' . l[0] . '\", expected no match'
     63735 :    elseif len(t) > matchidx && l[0] != t[matchidx]
     63736-:      $put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", match: \"' . l[0] . '\", expected: \"' . t[matchidx] . '\"'
     63737+:      $put ='ERROR ' . engine . ': pat: \"' . pat . '\", text: \"' . text . '\", match: \"' . l[0] . '\", expected: \"' . t[matchidx] . '\"'
     63738 :    else
     63739 :      $put ='OK ' . engine . ' - ' . pat
     63740 :    endif
     63741@@ -110,7 +116,7 @@
     63742 :          let e = t[matchidx + i]
     63743 :        endif
     63744 :        if l[i] != e
     63745-:          $put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", submatch ' . i . ': \"' . l[i] . '\", expected: \"' . e . '\"'
     63746+:          $put ='ERROR ' . engine . ': pat: \"' . pat . '\", text: \"' . text . '\", submatch ' . i . ': \"' . l[i] . '\", expected: \"' . e . '\"'
     63747 :        endif
     63748 :      endfor
     63749 :      unlet i
     63750diff -Naur vim74.orig/src/testdir/test95.ok vim74/src/testdir/test95.ok
     63751--- vim74.orig/src/testdir/test95.ok    2013-07-21 15:01:22.000000000 +0000
     63752+++ vim74/src/testdir/test95.ok 2014-06-01 00:43:20.940796319 +0000
     63753@@ -67,6 +67,24 @@
     63754 OK 0 - .Ö¹Ö»
     63755 OK 1 - .Ö¹Ö»
     63756 OK 2 - .Ö¹Ö»
     63757+OK 0 - a
     63758+OK 1 - a
     63759+OK 2 - a
     63760+OK 0 - ca
     63761+OK 1 - ca
     63762+OK 2 - ca
     63763+OK 0 - à
     63764+OK 1 - à
     63765+OK 2 - à
     63766+OK 0 - a\%C
     63767+OK 1 - a\%C
     63768+OK 2 - a\%C
     63769+OK 0 - ca\%C
     63770+OK 1 - ca\%C
     63771+OK 2 - ca\%C
     63772+OK 0 - ca\%Ct
     63773+OK 1 - ca\%Ct
     63774+OK 2 - ca\%Ct
     63775 OK 0 - ú\Z
     63776 OK 1 - ú\Z
     63777 OK 2 - ú\Z
     63778diff -Naur vim74.orig/src/testdir/test97.in vim74/src/testdir/test97.in
     63779--- vim74.orig/src/testdir/test97.in    2013-08-02 12:55:50.000000000 +0000
     63780+++ vim74/src/testdir/test97.in 2014-06-01 00:43:20.960796268 +0000
     63781@@ -3,14 +3,20 @@
     63782 
     63783 STARTTEST
     63784 :so small.vim
     63785+:" make sure glob() doesn't use the shell
     63786 :set shell=doesnotexist
     63787+:" consistent sorting of file names
     63788+:set nofileignorecase
     63789 :e test.out
     63790-:put =glob('Xxx\{')
     63791-:put =glob('Xxx\$')
     63792+:$put =glob('Xxx\{')
     63793+:$put =glob('Xxx\$')
     63794 :w! Xxx{
     63795 :w! Xxx\$
     63796-:put =glob('Xxx\{')
     63797-:put =glob('Xxx\$')
     63798+:$put =glob('Xxx\{')
     63799+:$put =glob('Xxx\$')
     63800+:"
     63801+:$put =string(globpath('sautest/autoload', '*.vim'))
     63802+:$put =string(globpath('sautest/autoload', '*.vim', 0, 1))
     63803 :w
     63804 :qa!
     63805 ENDTEST
     63806diff -Naur vim74.orig/src/testdir/test97.ok vim74/src/testdir/test97.ok
     63807--- vim74.orig/src/testdir/test97.ok    2013-07-03 14:14:50.000000000 +0000
     63808+++ vim74/src/testdir/test97.ok 2014-06-01 00:43:20.964129593 +0000
     63809@@ -3,3 +3,6 @@
     63810 
     63811 Xxx{
     63812 Xxx$
     63813+'sautest/autoload/Test104.vim
     63814+sautest/autoload/footest.vim'
     63815+['sautest/autoload/Test104.vim', 'sautest/autoload/footest.vim']
    6357063816diff -Naur vim74.orig/src/testdir/test99.in vim74/src/testdir/test99.in
    6357163817--- vim74.orig/src/testdir/test99.in    1970-01-01 00:00:00.000000000 +0000
    63572 +++ vim74/src/testdir/test99.in 2014-04-27 05:20:58.455110360 +0000
     63818+++ vim74/src/testdir/test99.in 2014-06-01 00:43:21.017462791 +0000
    6357363819@@ -0,0 +1,68 @@
    6357463820+Tests for regexp with multi-byte encoding and various magic settings.
     
    6364863894diff -Naur vim74.orig/src/testdir/test99.ok vim74/src/testdir/test99.ok
    6364963895--- vim74.orig/src/testdir/test99.ok    1970-01-01 00:00:00.000000000 +0000
    63650 +++ vim74/src/testdir/test99.ok 2014-04-27 05:20:58.455110360 +0000
     63896+++ vim74/src/testdir/test99.ok 2014-06-01 00:43:21.020796116 +0000
    6365163897@@ -0,0 +1,24 @@
    6365263898+1 a aa abb abbcc
     
    6367963925+א
    6368063926+ג
     63927diff -Naur vim74.orig/src/testdir/test_autoformat_join.in vim74/src/testdir/test_autoformat_join.in
     63928--- vim74.orig/src/testdir/test_autoformat_join.in      1970-01-01 00:00:00.000000000 +0000
     63929+++ vim74/src/testdir/test_autoformat_join.in   2014-06-01 00:43:21.024129440 +0000
     63930@@ -0,0 +1,23 @@
     63931+Tests for setting the '[,'] marks when joining lines.
     63932+
     63933+STARTTEST
     63934+:so small.vim
     63935+:/^\t\t/
     63936+0gqj
     63937+:let a=string(getpos("'[")).'/'.string(getpos("']"))
     63938+:/^This line/;'}-join
     63939+:let b=string(getpos("'[")).'/'.string(getpos("']"))
     63940+:$put ='First test: Start/End '.string(a)
     63941+:$put ='Second test: Start/End '.string(b)
     63942+:/^\t\t/,$wq! test.out
     63943+ENDTEST
     63944+
     63945+
     63946+               O sodales, ludite, vos qui
     63947+attamen consulite per voster honur. Tua pulchra facies me fay planszer milies
     63948+
     63949+This line.
     63950+Should be joined with the next line
     63951+and with this line
     63952+
     63953+Results:
     63954diff -Naur vim74.orig/src/testdir/test_autoformat_join.ok vim74/src/testdir/test_autoformat_join.ok
     63955--- vim74.orig/src/testdir/test_autoformat_join.ok      1970-01-01 00:00:00.000000000 +0000
     63956+++ vim74/src/testdir/test_autoformat_join.ok   2014-06-01 00:43:21.024129440 +0000
     63957@@ -0,0 +1,8 @@
     63958+               O sodales, ludite, vos qui attamen consulite per voster honur.
     63959+Tua pulchra facies me fay planszer milies
     63960+
     63961+This line.  Should be joined with the next line and with this line
     63962+
     63963+Results:
     63964+First test: Start/End '[0, 16, 1, 0]/[0, 17, 1, 0]'
     63965+Second test: Start/End '[0, 19, 11, 0]/[0, 19, 67, 0]'
    6368163966diff -Naur vim74.orig/src/testdir/test_eval.in vim74/src/testdir/test_eval.in
    6368263967--- vim74.orig/src/testdir/test_eval.in 1970-01-01 00:00:00.000000000 +0000
    63683 +++ vim74/src/testdir/test_eval.in      2014-04-27 05:20:58.455110360 +0000
    63684 @@ -0,0 +1,188 @@
     63968+++ vim74/src/testdir/test_eval.in      2014-06-01 00:43:21.027462765 +0000
     63969@@ -0,0 +1,207 @@
    6368563970+Test for various eval features.   vim: set ft=vim :
    6368663971+
     
    6386564150+:echo Foo(3)
    6386664151+:"
     64152+:" script-local function used in Funcref must exist.
     64153+:so test_eval_func.vim
     64154+:"
     64155+:" Using $ instead of '$' must give an error
     64156+:try
     64157+: call append($, 'foobar')
     64158+:catch
     64159+:$put =v:exception
     64160+:endtry
     64161+:"
     64162+:$put ='{{{1 getcurpos/setpos'
     64163+/^012345678
     64164+6l:let sp = getcurpos()
     64165+0:call setpos('.', sp)
     64166+jyl:$put
     64167+:"
    6386764168+:/^start:/+1,$wq! test.out
    6386864169+:" vim: et ts=4 isk-=\: fmr=???,???
     
    6387064171+ENDTEST
    6387164172+
     64173+012345678
     64174+012345678
     64175+
    6387264176+start:
    6387364177diff -Naur vim74.orig/src/testdir/test_eval.ok vim74/src/testdir/test_eval.ok
    6387464178--- vim74.orig/src/testdir/test_eval.ok 1970-01-01 00:00:00.000000000 +0000
    63875 +++ vim74/src/testdir/test_eval.ok      2014-04-27 05:20:58.458443777 +0000
    63876 @@ -0,0 +1,343 @@
     64179+++ vim74/src/testdir/test_eval.ok      2014-06-01 00:43:21.030796090 +0000
     64180@@ -0,0 +1,350 @@
    6387764181+{{{1 let tests
    6387864182+": type v; value: abc (['abc']), expr: abc (['abc'])
     
    6422264526+called Foo(2)
    6422364527+called Foo(3)
     64528+s:Testje exists: 0
     64529+func s:Testje exists: 1
     64530+Bar exists: 1
     64531+func Bar exists: 1
     64532+Vim(call):E116: Invalid arguments for function append
     64533+{{{1 getcurpos/setpos
     64534+6
     64535diff -Naur vim74.orig/src/testdir/test_eval_func.vim vim74/src/testdir/test_eval_func.vim
     64536--- vim74.orig/src/testdir/test_eval_func.vim   1970-01-01 00:00:00.000000000 +0000
     64537+++ vim74/src/testdir/test_eval_func.vim        2014-06-01 00:43:21.034129415 +0000
     64538@@ -0,0 +1,10 @@
     64539+" Vim script used in test_eval.in.  Needed for script-local function.
     64540+
     64541+func! s:Testje()
     64542+  return "foo"
     64543+endfunc
     64544+let Bar = function('s:Testje')
     64545+$put ='s:Testje exists: ' . exists('s:Testje')
     64546+$put ='func s:Testje exists: ' . exists('*s:Testje')
     64547+$put ='Bar exists: ' . exists('Bar')
     64548+$put ='func Bar exists: ' . exists('*Bar')
    6422464549diff -Naur vim74.orig/src/testdir/test_options.in vim74/src/testdir/test_options.in
    6422564550--- vim74.orig/src/testdir/test_options.in      1970-01-01 00:00:00.000000000 +0000
    64226 +++ vim74/src/testdir/test_options.in   2014-04-27 05:20:58.458443777 +0000
     64551+++ vim74/src/testdir/test_options.in   2014-06-01 00:43:21.050796039 +0000
    6422764552@@ -0,0 +1,17 @@
    6422864553+Test for ":options".
     
    6424564570diff -Naur vim74.orig/src/testdir/test_options.ok vim74/src/testdir/test_options.ok
    6424664571--- vim74.orig/src/testdir/test_options.ok      1970-01-01 00:00:00.000000000 +0000
    64247 +++ vim74/src/testdir/test_options.ok   2014-04-27 05:20:58.458443777 +0000
     64572+++ vim74/src/testdir/test_options.ok   2014-06-01 00:43:21.050796039 +0000
    6424864573@@ -0,0 +1,2 @@
    6424964574+result
     
    6425164576diff -Naur vim74.orig/src/ui.c vim74/src/ui.c
    6425264577--- vim74.orig/src/ui.c 2013-07-13 18:57:08.000000000 +0000
    64253 +++ vim74/src/ui.c      2014-04-27 05:20:58.458443777 +0000
     64578+++ vim74/src/ui.c      2014-06-01 00:43:21.167462409 +0000
    6425464579@@ -2610,13 +2610,11 @@
    6425564580        if (on_sep_line)
     
    6434064665diff -Naur vim74.orig/src/undo.c vim74/src/undo.c
    6434164666--- vim74.orig/src/undo.c       2013-06-10 18:13:37.000000000 +0000
    64342 +++ vim74/src/undo.c    2014-04-27 05:20:58.461777194 +0000
     64667+++ vim74/src/undo.c    2014-06-01 00:43:21.194129007 +0000
    6434364668@@ -83,6 +83,7 @@
    6434464669 
     
    6457264897diff -Naur vim74.orig/src/version.c vim74/src/version.c
    6457364898--- vim74.orig/src/version.c    2013-08-10 11:29:20.000000000 +0000
    64574 +++ vim74/src/version.c 2014-04-27 05:20:58.465110609 +0000
     64899+++ vim74/src/version.c 2014-06-01 00:43:21.227462256 +0000
    6457564900@@ -60,6 +60,11 @@
    6457664901 
     
    6461664941        NULL
    6461764942 };
    64618 @@ -728,6 +735,536 @@
     64943@@ -728,6 +735,638 @@
    6461964944 static int included_patches[] =
    6462064945 {   /* Add new patch number below this line */
    6462164946 /**/
     64947+    316,
     64948+/**/
     64949+    315,
     64950+/**/
     64951+    314,
     64952+/**/
     64953+    313,
     64954+/**/
     64955+    312,
     64956+/**/
     64957+    311,
     64958+/**/
     64959+    310,
     64960+/**/
     64961+    309,
     64962+/**/
     64963+    308,
     64964+/**/
     64965+    307,
     64966+/**/
     64967+    306,
     64968+/**/
     64969+    305,
     64970+/**/
     64971+    304,
     64972+/**/
     64973+    303,
     64974+/**/
     64975+    302,
     64976+/**/
     64977+    301,
     64978+/**/
     64979+    300,
     64980+/**/
     64981+    299,
     64982+/**/
     64983+    298,
     64984+/**/
     64985+    297,
     64986+/**/
     64987+    296,
     64988+/**/
     64989+    295,
     64990+/**/
     64991+    294,
     64992+/**/
     64993+    293,
     64994+/**/
     64995+    292,
     64996+/**/
     64997+    291,
     64998+/**/
     64999+    290,
     65000+/**/
     65001+    289,
     65002+/**/
     65003+    288,
     65004+/**/
     65005+    287,
     65006+/**/
     65007+    286,
     65008+/**/
     65009+    285,
     65010+/**/
     65011+    284,
     65012+/**/
     65013+    283,
     65014+/**/
     65015+    282,
     65016+/**/
     65017+    281,
     65018+/**/
     65019+    280,
     65020+/**/
     65021+    279,
     65022+/**/
     65023+    278,
     65024+/**/
     65025+    277,
     65026+/**/
     65027+    276,
     65028+/**/
     65029+    275,
     65030+/**/
     65031+    274,
     65032+/**/
     65033+    273,
     65034+/**/
     65035+    272,
     65036+/**/
     65037+    271,
     65038+/**/
     65039+    270,
     65040+/**/
     65041+    269,
     65042+/**/
     65043+    268,
     65044+/**/
     65045+    267,
     65046+/**/
     65047+    266,
     65048+/**/
    6462265049+    265,
    6462365050+/**/
     
    6515565582diff -Naur vim74.orig/src/vim.h vim74/src/vim.h
    6515665583--- vim74.orig/src/vim.h        2013-08-02 14:02:27.000000000 +0000
    65157 +++ vim74/src/vim.h     2014-04-27 05:20:58.465110609 +0000
     65584+++ vim74/src/vim.h     2014-06-01 00:43:21.297462078 +0000
    6515865585@@ -43,7 +43,7 @@
    6515965586  * it becomes zero.  This is likely a problem of not being able to run the
     
    6531765744diff -Naur vim74.orig/src/winclip.c vim74/src/winclip.c
    6531865745--- vim74.orig/src/winclip.c    2013-07-01 19:05:53.000000000 +0000
    65319 +++ vim74/src/winclip.c 2014-04-27 05:20:58.471777440 +0000
     65746+++ vim74/src/winclip.c 2014-06-01 00:43:21.514128193 +0000
    6532065747@@ -797,4 +797,29 @@
    6532165748        vim_free(widestr);
     
    6535065777diff -Naur vim74.orig/src/window.c vim74/src/window.c
    6535165778--- vim74.orig/src/window.c     2013-07-24 15:38:29.000000000 +0000
    65352 +++ vim74/src/window.c  2014-04-27 05:20:58.471777440 +0000
     65779+++ vim74/src/window.c  2014-06-01 00:43:21.530794817 +0000
    6535365780@@ -130,9 +130,7 @@
    6535465781     case Ctrl_S:
     
    6559466021 #ifdef FEAT_GUI
    6559566022     need_mouse_correct = TRUE;
    65596 @@ -6035,7 +6009,6 @@
     66023@@ -5649,7 +5623,7 @@
     66024     win_T      *wp;
     66025 {
     66026     wp->w_fraction = ((long)wp->w_wrow * FRACTION_MULT
     66027-                                   + FRACTION_MULT / 2) / (long)wp->w_height;
     66028+                                   + wp->w_height / 2) / (long)wp->w_height;
     66029 }
     66030 
     66031 /*
     66032@@ -5664,6 +5638,7 @@
     66033 {
     66034     linenr_T   lnum;
     66035     int                sline, line_size;
     66036+    int                prev_height = wp->w_height;
     66037 
     66038     /* Don't want a negative height.  Happens when splitting a tiny window.
     66039      * Will equalize heights soon to fix it. */
     66040@@ -5672,8 +5647,13 @@
     66041     if (wp->w_height == height)
     66042        return;     /* nothing to do */
     66043 
     66044-    if (wp->w_wrow != wp->w_prev_fraction_row && wp->w_height > 0)
     66045-       set_fraction(wp);
     66046+    if (wp->w_height > 0)
     66047+    {
     66048+       if (wp == curwin)
     66049+           validate_cursor();          /* w_wrow needs to be valid */
     66050+       if (wp->w_wrow != wp->w_prev_fraction_row)
     66051+           set_fraction(wp);
     66052+    }
     66053 
     66054     wp->w_height = height;
     66055     wp->w_skipcol = 0;
     66056@@ -5693,7 +5673,8 @@
     66057        lnum = wp->w_cursor.lnum;
     66058        if (lnum < 1)           /* can happen when starting up */
     66059            lnum = 1;
     66060-       wp->w_wrow = ((long)wp->w_fraction * (long)height - 1L) / FRACTION_MULT;
     66061+       wp->w_wrow = ((long)wp->w_fraction * (long)height - 1L
     66062+                                        + FRACTION_MULT / 2) / FRACTION_MULT;
     66063        line_size = plines_win_col(wp, lnum, (long)(wp->w_cursor.col)) - 1;
     66064        sline = wp->w_wrow - line_size;
     66065 
     66066@@ -5729,8 +5710,9 @@
     66067                    --wp->w_wrow;
     66068                }
     66069            }
     66070+            set_topline(wp, lnum);
     66071        }
     66072-       else
     66073+       else if (sline > 0)
     66074        {
     66075            while (sline > 0 && lnum > 1)
     66076            {
     66077@@ -5773,8 +5755,9 @@
     66078                lnum = 1;
     66079                wp->w_wrow -= sline;
     66080            }
     66081+
     66082+            set_topline(wp, lnum);
     66083        }
     66084-       set_topline(wp, lnum);
     66085     }
     66086 
     66087     if (wp == curwin)
     66088@@ -5783,7 +5766,8 @@
     66089            update_topline();
     66090        curs_columns(FALSE);    /* validate w_wrow */
     66091     }
     66092-    wp->w_prev_fraction_row = wp->w_wrow;
     66093+    if (prev_height > 0)
     66094+       wp->w_prev_fraction_row = wp->w_wrow;
     66095 
     66096     win_comp_scroll(wp);
     66097     redraw_win_later(wp, SOME_VALID);
     66098@@ -6035,7 +6019,6 @@
    6559766099     long       count;
    6559866100     linenr_T   *file_lnum;
     
    6560266104     {
    6560366105        int     len;
    65604 @@ -6046,7 +6019,6 @@
     66106@@ -6046,7 +6029,6 @@
    6560566107        return find_file_name_in_path(ptr, len,
    6560666108                     FNAME_MESS|FNAME_EXP|FNAME_REL, count, curbuf->b_ffname);
     
    6561266114diff -Naur vim74.orig/src/xxd/Make_cyg.mak vim74/src/xxd/Make_cyg.mak
    6561366115--- vim74.orig/src/xxd/Make_cyg.mak     2010-05-15 11:04:06.000000000 +0000
    65614 +++ vim74/src/xxd/Make_cyg.mak  2014-04-27 05:20:58.481777690 +0000
     66116+++ vim74/src/xxd/Make_cyg.mak  2014-06-01 00:43:21.840794027 +0000
    6561566117@@ -8,7 +8,7 @@
    6561666118 DEFINES =
Note: See TracChangeset for help on using the changeset viewer.