Changeset 1f29650b
- Timestamp:
- May 31, 2014, 5:49:35 PM (11 years ago)
- Branches:
- clfs-3.0.0-systemd, master, systemd
- Children:
- f91c528
- Parents:
- 6df80c0
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
patches/vim-7.4-branch_update-4.patch
r6df80c0 r1f29650b 1 1 Submitted By: William Harrington (kb0iic at cross-lfs dot org) 2 Date: 2014-0 4-262 Date: 2014-05-31 3 3 Initial Package Version: 7.4 4 4 Origin: Upstream 5 5 Upstream Status: Applied 6 Description: Contains all upstream patches up to 7.4. 265.6 Description: Contains all upstream patches up to 7.4.316. 7 7 8 8 diff -Naur vim74.orig/.hg_archival.txt vim74/.hg_archival.txt 9 9 --- vim74.orig/.hg_archival.txt 1970-01-01 00:00:00.000000000 +0000 10 +++ vim74/.hg_archival.txt 2014-0 4-27 05:20:57.181745403+000010 +++ vim74/.hg_archival.txt 2014-06-01 00:42:48.067546692 +0000 11 11 @@ -0,0 +1,5 @@ 12 12 +repo: 770908d1cb47c04be0aef5c173b17ab8be6b6476 13 +node: 01f2b7e6b33ca4da4fbe2a5b8e9184ea2749d64e13 +node: bed71c37618c11240596390f277d4f5e60d35ebc 14 14 +branch: default 15 +latesttag: v7-4- 26515 +latesttag: v7-4-316 16 16 +latesttagdistance: 1 17 17 diff -Naur vim74.orig/.hgignore vim74/.hgignore 18 18 --- vim74.orig/.hgignore 1970-01-01 00:00:00.000000000 +0000 19 +++ vim74/.hgignore 2014-0 4-27 05:20:57.188412237+000019 +++ vim74/.hgignore 2014-06-01 00:42:48.107546590 +0000 20 20 @@ -0,0 +1,74 @@ 21 21 +syntax: glob … … 95 95 diff -Naur vim74.orig/.hgtags vim74/.hgtags 96 96 --- vim74.orig/.hgtags 1970-01-01 00:00:00.000000000 +0000 97 +++ vim74/.hgtags 2014-0 4-27 05:20:57.195079070+000098 @@ -0,0 +1, 2990@@97 +++ vim74/.hgtags 2014-06-01 00:42:48.127546539 +0000 98 @@ -0,0 +1,3041 @@ 99 99 +004eb98eb3c30714cb6a24ec3e810275080a8413 v7-1-117 100 100 +006e9c8a6a8ad354a5cb6adcce6ebfceddeb20ee v7-0079 … … 3087 3087 +00acac0af680c2d8c82db5258474b121a5908926 v7-4-264 3088 3088 +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 3089 3140 diff -Naur vim74.orig/Filelist vim74/Filelist 3090 3141 --- 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 @@ 3093 3152 src/main.aap \ 3094 3153 src/testdir/main.aap \ … … 3102 3161 src/testdir/test83-tags? \ 3103 3162 + src/testdir/test77a.com \ 3163 + src/testdir/test_*.vim \ 3104 3164 src/testdir/python2/*.py \ 3105 3165 src/testdir/python3/*.py \ … … 3107 3167 diff -Naur vim74.orig/runtime/autoload/clojurecomplete.vim vim74/runtime/autoload/clojurecomplete.vim 3108 3168 --- vim74.orig/runtime/autoload/clojurecomplete.vim 2013-02-06 14:35:23.000000000 +0000 3109 +++ vim74/runtime/autoload/clojurecomplete.vim 2014-0 4-27 05:20:57.231746647+00003169 +++ vim74/runtime/autoload/clojurecomplete.vim 2014-06-01 00:42:49.274210286 +0000 3110 3170 @@ -1,20 +1,22 @@ 3111 3171 " Vim completion script … … 3148 3208 diff -Naur vim74.orig/runtime/autoload/getscript.vim vim74/runtime/autoload/getscript.vim 3149 3209 --- vim74.orig/runtime/autoload/getscript.vim 2013-04-17 13:40:44.000000000 +0000 3150 +++ vim74/runtime/autoload/getscript.vim 2014-0 4-27 05:20:57.235080063+00003210 +++ vim74/runtime/autoload/getscript.vim 2014-06-01 00:42:49.320876834 +0000 3151 3211 @@ -1,8 +1,8 @@ 3152 3212 " --------------------------------------------------------------------- … … 3182 3242 diff -Naur vim74.orig/runtime/autoload/netrw.vim vim74/runtime/autoload/netrw.vim 3183 3243 --- vim74.orig/runtime/autoload/netrw.vim 2013-05-19 03:28:33.000000000 +0000 3184 +++ vim74/runtime/autoload/netrw.vim 2014-0 4-27 05:20:57.241746894+00003244 +++ vim74/runtime/autoload/netrw.vim 2014-06-01 00:42:49.417543255 +0000 3185 3245 @@ -1,10 +1,10 @@ 3186 3246 " netrw.vim: Handles file transfer and remote directory listing across … … 3188 3248 -" Date: May 18, 2013 3189 3249 -" Version: 149 3190 +" Date: Ma r 20, 20143191 +" Version: 15 13250 +" Date: May 13, 2014 3251 +" Version: 152 3192 3252 " Maintainer: Charles E Campbell <NdrOchip@ScampbellPfamily.AbizM-NOSPAM> 3193 3253 " GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim … … 3197 3257 " with or without modifications, provided that this copyright 3198 3258 " notice is copied with it. Like anything else that's free, 3199 @@ -22,13 +22, 7@@3259 @@ -22,13 +22,14 @@ 3200 3260 if &cp || exists("g:loaded_netrw") 3201 3261 finish … … 3206 3266 - echo "***warning*** this version of netrw needs vim 7.3.465 or later" 3207 3267 - 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" 3211 3276 if !exists("s:NOTE") 3212 3277 let s:NOTE = 0 3213 3278 let s:WARNING = 1 3214 @@ -36,8 +3 0,9 @@3279 @@ -36,8 +37,9 @@ 3215 3280 endif 3216 3281 … … 3224 3289 3225 3290 " ====================== 3226 @@ -49,7 + 44,7 @@3291 @@ -49,7 +51,7 @@ 3227 3292 " 0=note = s:NOTE 3228 3293 " 1=warning = s:WARNING 3229 3294 " 2=error = s:ERROR 3230 3295 -" May 01, 2013 : max errnum currently is 93 3231 +" Mar 04, 2014 : max errnum currently is 963296 +" Apr 16, 2014 : max errnum currently is 97 3232 3297 fun! netrw#ErrorMsg(level,msg,errnum) 3233 3298 " call Dfunc("netrw#ErrorMsg(level=".a:level." msg<".a:msg."> errnum=".a:errnum.") g:netrw_use_errorwindow=".g:netrw_use_errorwindow) 3234 3299 3235 @@ -104, 7 +99,7@@3300 @@ -104,8 +106,8 @@ 3236 3301 hi link netrwMesgWarning WarningMsg 3237 3302 hi link netrwMesgError Error 3238 3303 endif 3239 3304 -" call Decho("(ErrorMsg) setl noma ro bh=wipe") 3305 - setl noma ro bh=wipe 3240 3306 +" call Decho("setl noma ro bh=wipe") 3241 setl noma robh=wipe3307 + setl ro nomod noma bh=wipe 3242 3308 3243 3309 else 3244 @@ -200,6 +195,7 @@ 3310 " (optional) netrw will show messages using echomsg. Even if the 3311 @@ -200,6 +202,7 @@ 3245 3312 let g:netrw_http_cmd = "" 3246 3313 endif … … 3250 3317 call s:NetrwInit("g:netrw_rsync_cmd", "rsync") 3251 3318 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 @@ 3253 3329 call s:NetrwInit("g:netrw_cursor" , 2) 3254 3330 let s:netrw_usercul = &cursorline … … 3258 3334 call s:NetrwInit("s:didstarstar",0) 3259 3335 call s:NetrwInit("g:netrw_dirhist_cnt" , 0) 3260 @@ -291,23 +2 88,19 @@3336 @@ -291,23 +295,19 @@ 3261 3337 endif 3262 3338 call s:NetrwInit("g:netrw_keepdir",1) … … 3283 3359 call s:NetrwInit("g:netrw_list_hide","") 3284 3360 " 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 @@ 3286 3418 call s:NetrwInit("g:netrw_rename_cmd" , g:netrw_ssh_cmd." USEPORT HOSTNAME mv") 3287 3419 call s:NetrwInit("g:netrw_rm_cmd" , g:netrw_ssh_cmd." USEPORT HOSTNAME rm") … … 3303 3435 call s:NetrwInit("g:netrw_sepchr" , (&enc == "euc-jp")? "\<Char-0x01>" : "\<Char-0xff>") 3304 3436 call s:NetrwInit("s:netrw_silentxfer" , (exists("g:netrw_silent") && g:netrw_silent != 0)? "sil keepj " : "keepj ") 3305 @@ -404,7 +4 06,7 @@3437 @@ -404,7 +429,7 @@ 3306 3438 endif 3307 3439 call s:NetrwInit("g:netrw_special_syntax" , 0) … … 3312 3444 call s:NetrwInit("g:netrw_timefmt","%c") 3313 3445 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 @@ 3315 3455 call s:NetrwInit("g:netrw_menu_escape",'.&? \') 3316 3456 call s:NetrwInit("g:netrw_tmpfile_escape",' &;') … … 3324 3464 " BufEnter event ignored by decho when following variable is true 3325 3465 " Has a side effect that doau BufReadPost doesn't work, so 3326 @@ -444,11 +4 51,18 @@3466 @@ -444,11 +473,18 @@ 3327 3467 " Netrw Initialization: {{{1 3328 3468 " ====================== … … 3348 3488 au WinEnter * if &ft == "netrw"|call s:NetrwInsureWinVars()|endif 3349 3489 3350 @@ -457,276 +4 71,43 @@3490 @@ -457,276 +493,43 @@ 3351 3491 " ============================== 3352 3492 … … 3659 3799 " indx: == -1: Nexplore 3660 3800 " == -2: Pexplore 3661 @@ -737,7 +5 18,7 @@3801 @@ -737,7 +540,7 @@ 3662 3802 " * If Hexplore or Vexplore, then this will override 3663 3803 " g:netrw_winsize to specify the qty of rows or columns the … … 3668 3808 " style == 0: Explore style == 1: Explore! 3669 3809 " == 2: Hexplore style == 3: Hexplore! 3670 @@ -747,26 +5 28,52 @@3810 @@ -747,26 +550,52 @@ 3671 3811 " 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("%")) 3672 3812 if !exists("b:netrw_curdir") … … 3731 3871 let winsz= g:netrw_winsize 3732 3872 if a:indx > 0 3733 @@ -774,106 + 581,106@@3873 @@ -774,106 +603,119 @@ 3734 3874 endif 3735 3875 … … 3738 3878 +" call Decho("style=0: Explore or Sexplore") 3739 3879 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") 3741 3884 3742 3885 elseif a:style == 1 "Explore!, Sexplore! … … 3744 3887 +" call Decho("style=1: Explore! or Sexplore!") 3745 3888 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") 3747 3893 3748 3894 elseif a:style == 2 " Hexplore … … 3750 3896 +" call Decho("style=2: Hexplore") 3751 3897 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") 3753 3902 3754 3903 elseif a:style == 3 " Hexplore! … … 3756 3905 +" call Decho("style=3: Hexplore!") 3757 3906 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") 3759 3911 3760 3912 elseif a:style == 4 " Vexplore … … 3762 3914 +" call Decho("style=4: Vexplore") 3763 3915 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") 3765 3920 3766 3921 elseif a:style == 5 " Vexplore! … … 3768 3923 +" call Decho("style=5: Vexplore!") 3769 3924 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") 3771 3929 3772 3930 elseif a:style == 6 " Texplore … … 3775 3933 +" call Decho("style = 6: Texplore") 3776 3934 exe "keepalt tabnew ".fnameescape(curdir) 3935 +" call Decho("exe keepalt tabnew ".fnameescape(curdir)) 3777 3936 call s:RestoreBufVars() 3778 3937 endif … … 3864 4023 if prefixdir =~ '^/' || (prefixdir =~ '^\a:/' && (has("win32") || has("win95") || has("win64") || has("win16"))) 3865 4024 let b:netrw_curdir = prefixdir 3866 @@ -882,30 + 689,30 @@4025 @@ -882,30 +724,30 @@ 3867 4026 endif 3868 4027 let dirname= substitute(dirname,'^.\{-}\(\*\*/.*\)$','\1','') … … 3902 4061 if dirname =~ '^scp://' || dirname =~ '^ftp://' 3903 4062 call netrw#Nread(2,dirname) 3904 @@ -914,15 +7 21,17 @@4063 @@ -914,15 +756,17 @@ 3905 4064 if dirname == "" 3906 4065 let dirname= getcwd() … … 3923 4082 if exists("w:netrw_bannercnt") 3924 4083 " done to handle P08-Ingelrest. :Explore will _Always_ go to the line just after the banner. 3925 @@ -930,7 +7 39,7 @@4084 @@ -930,7 +774,7 @@ 3926 4085 exe w:netrw_bannercnt 3927 4086 endif … … 3932 4091 " Jan 24, 2013: not sure why the following was present. See P08-Ingelrest 3933 4092 " if has("win32") || has("win95") || has("win64") || has("win16") 3934 @@ -946,30 +7 55,32 @@4093 @@ -946,30 +790,32 @@ 3935 4094 " starpat=4: Explore **/filepat (recursive descent search for filenames matching filepat) 3936 4095 elseif a:indx <= 0 … … 3972 4131 " call Dret("netrw#Explore") 3973 4132 return 3974 @@ -978,21 + 789,23 @@4133 @@ -978,21 +824,23 @@ 3975 4134 if indx < 0 | let indx= 0 | endif 3976 4135 if indx >= w:netrw_explore_listlen | let indx= w:netrw_explore_listlen - 1 | endif … … 4002 4161 " call Dret("netrw#Explore") 4003 4162 return 4004 @@ -1001,30 +8 14,30 @@4163 @@ -1001,30 +849,30 @@ 4005 4164 if indx < 0 | let indx= 0 | endif 4006 4165 if indx >= w:netrw_explore_listlen | let indx= w:netrw_explore_listlen - 1 | endif … … 4040 4199 exe "keepj noautocmd vimgrep /".pattern."/gj ".fnameescape(b:netrw_curdir)."/*" 4041 4200 catch /^Vim\%((\a\+)\)\=:E480/ 4042 @@ -1037,15 +8 50,17 @@4201 @@ -1037,15 +885,17 @@ 4043 4202 4044 4203 elseif starpat == 2 … … 4062 4221 " call Dret("netrw#Explore : no files matched pattern") 4063 4222 return 4064 @@ -1057, 29 +872,31@@4223 @@ -1057,53 +907,55 @@ 4065 4224 4066 4225 elseif starpat == 3 … … 4095 4254 - sil! let @* = keepregstar 4096 4255 - sil! let @+ = keepregstar 4256 - sil! let @/ = keepregslash 4257 -" call Dret("netrw#Explore : no files matched") 4097 4258 + if has("clipboard") 4098 4259 + sil! let @* = keepregstar 4099 4260 + sil! let @+ = keepregstar 4100 4261 + endif 4101 4102 4262 + sil! let @/ = keepregslash 4263 +" call Dret("netrw#Explore : no files matched") 4103 4264 return 4104 @@ -1088,22 +905,22 @@ 4265 endif 4266 endif " if indx ... endif 4105 4267 4106 4268 " NetrwStatusLine support - for exploring support … … 4130 4292 if !exists("w:netrw_liststyle") 4131 4293 let w:netrw_liststyle= g:netrw_liststyle 4132 @@ -1117,22 +9 34,24 @@4294 @@ -1117,22 +969,24 @@ 4133 4295 let w:netrw_explore_bufnr = bufnr("%") 4134 4296 let w:netrw_explore_line = line(".") … … 4160 4322 sil! unlet w:netrw_treedict 4161 4323 sil! unlet w:netrw_treetop 4162 @@ -1146,22 + 965,22 @@4324 @@ -1146,22 +1000,22 @@ 4163 4325 endif 4164 4326 … … 4190 4352 if s:explore_match == "" 4191 4353 let s:explore_match= '\<'.escape(strpart(fname,dirlen),g:netrw_markfileesc).'\>' 4192 @@ -1177,7 + 996,7 @@4354 @@ -1177,7 +1031,7 @@ 4193 4355 endif 4194 4356 let prvfname= fname … … 4199 4361 endif 4200 4362 echo "<s-up>==Pexplore <s-down>==Nexplore" 4201 @@ -1186,47 +10 05,76 @@4363 @@ -1186,47 +1040,76 @@ 4202 4364 if exists("s:explore_match") | unlet s:explore_match | endif 4203 4365 if exists("s:explore_prvdir") | unlet s:explore_prvdir | endif … … 4301 4463 if a:sys 4302 4464 let choice= confirm("Remove personal and system copies of netrw?","&Yes\n&No") 4303 @@ -1264,28 +11 12,44 @@4465 @@ -1264,28 +1147,44 @@ 4304 4466 endif 4305 4467 echohl None … … 4359 4521 4360 4522 if type(a:fname) == 1 4361 @@ -1294,7 +11 58,7 @@4523 @@ -1294,7 +1193,7 @@ 4362 4524 let fnamelist= a:fname 4363 4525 else … … 4368 4530 endif 4369 4531 " 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) 4371 4534 endif 4372 4535 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 + 4373 4548 elseif !exists("b:netrw_method") || b:netrw_method < 0 4374 4549 -" 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") 4376 4560 return 4377 4561 endif 4378 4562 4379 @@ -1492, 553 +1356,407 @@4563 @@ -1492,107 +1412,387 @@ 4380 4564 endif 4381 4565 endif … … 4447 4631 - call s:NetrwSafeOptions() 4448 4632 - call s:RestoreCursorline() 4449 -4450 - " NetRead: interpret mode into a readcmd {{{34451 - if a:mode == 0 " read remote file before current line4452 - let readcmd = "0r"4453 - elseif a:mode == 1 " read file after current line4454 - let readcmd = "r"4455 - elseif a:mode == 2 " replace with remote file4456 - let readcmd = "%r"4457 - elseif a:mode == 3 " skip read of file (leave as temporary)4458 - let readcmd = "t"4459 - else4460 - exe a:mode4461 - let readcmd = "r"4462 - endif4463 - let ichoice = (a:0 == 0)? 0 : 14464 -" call Decho("readcmd<".readcmd."> ichoice=".ichoice)4465 -4466 - " NetRead: get temporary filename {{{34467 - let tmpfile= s:GetTempfile("")4468 - if tmpfile == ""4469 -" call Dret("netrw#NetRead : unable to get a tempfile!")4470 4633 +" s:NetrwOptionRestore: restore options (based on prior s:NetrwOptionSave) {{{2 4471 4634 +fun! s:NetrwOptionRestore(vt) … … 4485 4648 +" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") 4486 4649 +" call Dret("s:NetrwOptionRestore : ".a:vt."netrw_optionsave doesn't exist") 4487 4488 4650 + return 4651 + endif 4489 4652 + unlet {a:vt}netrw_optionsave 4490 4653 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" 4545 4663 + if exists("+acd") 4546 4664 + if exists("{a:vt}netrw_acdkeep") … … 4551 4669 + if &l:acd 4552 4670 + 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 4564 4673 + endif 4565 4674 + if exists("{a:vt}netrw_aikeep") |let &l:ai = {a:vt}netrw_aikeep |unlet {a:vt}netrw_aikeep |endif … … 4590 4699 + if exists("{a:vt}netrw_modkeep") |let &l:mod = {a:vt}netrw_modkeep |unlet {a:vt}netrw_modkeep |endif 4591 4700 + 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 4592 4702 + if exists("{a:vt}netrw_repkeep") |let &l:report = {a:vt}netrw_repkeep |unlet {a:vt}netrw_repkeep |endif 4593 4703 + if exists("{a:vt}netrw_rokeep") |let &l:ro = {a:vt}netrw_rokeep |unlet {a:vt}netrw_rokeep |endif … … 4617 4727 + sil! let &l:swf= {a:vt}netrw_swfkeep 4618 4728 + 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 4629 4730 + endif 4630 4731 + if exists("{a:vt}netrw_dirkeep") && isdirectory({a:vt}netrw_dirkeep) && g:netrw_keepdir … … 4645 4746 + if exists("s:nbcd_curpos_".bufnr('%')) 4646 4747 + unlet s:nbcd_curpos_{bufnr('%')} 4647 endif 4648 + else 4748 + endif 4749 else 4750 - exe a:mode 4751 - let readcmd = "r" 4649 4752 +" 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 4658 4762 +" call Decho("g:netrw_keepdir=".g:netrw_keepdir.": getcwd<".getcwd()."> acd=".&acd) 4659 4763 +" call Decho("fo=".&fo.(exists("+acd")? " acd=".&acd : " acd doesn't exist")) … … 4667 4771 +" call Decho("filetype detect (ft=".&ft.")") 4668 4772 + filetype detect 4669 +endif4773 endif 4670 4774 +" 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) 4671 4775 +" call Dret("s:NetrwOptionRestore : tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> modified=".&modified." modifiable=".&modifiable." readonly=".&readonly) 4672 4776 +endfun 4673 4777 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 4700 4785 +" --------------------------------------------------------------------- 4701 4786 +" s:NetrwOptionSave: save options prior to setting to "netrw-buffer-standard" form {{{2 … … 4711 4796 +" 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) 4712 4797 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 . ">") 4752 4801 + if !exists("{a:vt}netrw_optionsave") 4753 4802 + let {a:vt}netrw_optionsave= 1 … … 4758 4807 +" call Decho("prior to save: fo=".&fo.(exists("+acd")? " acd=".&acd : " acd doesn't exist")." diff=".&l:diff) 4759 4808 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' 4776 4821 + " Save current settings and current directory 4777 4822 +" call Decho("saving current settings and current directory") … … 4782 4827 + let {a:vt}netrw_bhkeep = &l:bh 4783 4828 + let {a:vt}netrw_blkeep = &l:bl 4784 + "let {a:vt}netrw_btkeep = &l:bt4829 + let {a:vt}netrw_btkeep = &l:bt 4785 4830 + let {a:vt}netrw_bombkeep = &l:bomb 4786 4831 + let {a:vt}netrw_cedit = &cedit … … 4792 4837 + let {a:vt}netrw_diffkeep = &l:diff 4793 4838 + 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 4795 4842 + let {a:vt}netrw_fokeep = &l:fo " formatoptions 4796 4843 + let {a:vt}netrw_gdkeep = &l:gd " gdefault … … 4803 4850 + let {a:vt}netrw_modkeep = &l:mod 4804 4851 + let {a:vt}netrw_nukeep = &l:nu 4852 + let {a:vt}netrw_rnukeep = &l:rnu 4805 4853 + let {a:vt}netrw_repkeep = &l:report 4806 4854 + let {a:vt}netrw_rokeep = &l:ro … … 4818 4866 + let {a:vt}netrw_wrapkeep = &l:wrap 4819 4867 + 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 + 4834 4869 + " save a few selected netrw-related variables 4835 4870 +" call Decho("saving a few selected netrw-related variables") … … 4841 4876 + endif 4842 4877 + 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 + 4854 4879 +" 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) 4855 4880 +" call Dret("s:NetrwOptionSave : tab#".tabpagenr()." win#".winnr()) 4856 4881 +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 + 4875 4883 +" ------------------------------------------------------------------------ 4876 4884 +" s:NetrwSafeOptions: sets options to help netrw do its job {{{2 … … 4911 4919 + setl cedit& 4912 4920 + 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 + 4927 4922 + " allow the user to override safe options 4928 4923 +" call Decho("ft<".&ft."> ei=".&ei) … … 4931 4926 + sil! keepalt keepj doau FileType netrw 4932 4927 + 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 + 5053 4929 +" call Decho("fo=".&fo.(exists("+acd")? " acd=".&acd : " acd doesn't exist")." bh=".&l:bh) 5054 4930 +" 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) 5055 4931 +" call Dret("s:NetrwSafeOptions") 5056 4932 +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 + 5066 4934 +" --------------------------------------------------------------------- 5067 4935 +" NetrwStatusLine: {{{2 5068 4936 +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 + 5076 4938 +" vvv NetrwStatusLine() debugging vvv 5077 4939 +" let g:stlmsg="" … … 5090 4952 +" endif 5091 4953 +" ^^^ 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 + 5102 4955 + 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") 5103 4956 + " restore user's status line … … 5109 4962 + else 5110 4963 + 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 + 5117 4967 +" --------------------------------------------------------------------- 5118 4968 +" Netrw Transfer Functions: {{{1 5119 4969 +" =============================== 5120 4970 + 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 +" ------------------------------------------------------------------------ 5125 4972 +" netrw#NetRead: responsible for reading a file over the net {{{2 5126 4973 +" mode: =0 read remote file and insert before current line … … 5130 4977 +fun! netrw#NetRead(mode,...) 5131 4978 +" 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 + 5135 4980 + " NetRead: save options {{{3 5136 5137 4981 + call s:NetrwOptionSave("w:") 4982 + call s:NetrwSafeOptions() 5138 4983 + 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 + 5166 4985 + " NetRead: interpret mode into a readcmd {{{3 5167 4986 + if a:mode == 0 " read remote file before current line … … 5173 4992 + elseif a:mode == 3 " skip read of file (leave as temporary) 5174 4993 + 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 5179 4995 + exe a:mode 5180 4996 + let readcmd = "r" 5181 4997 + endif 5182 4998 + let ichoice = (a:0 == 0)? 0 : 1 5183 4999 +" 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 + 5190 5001 + " NetRead: get temporary filename {{{3 5191 5002 + let tmpfile= s:GetTempfile("") … … 5193 5004 +" call Dret("netrw#NetRead : unable to get a tempfile!") 5194 5005 + 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 5209 5018 +" 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 5235 5021 + " give help 5236 5022 + echomsg 'NetRead Usage:' … … 5245 5031 + echomsg ':Nread rcp://[user@]machine/path uses rcp' 5246 5032 + 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 45250 + break 5251 5252 - while match(choice,"\"$") == -1 5253 - let wholechoice= wholechoice . " " . choice 5254 - let ichoice = ichoice + 15255 - 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 + else5263 + " 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) 5281 5067 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>" 5282 5081 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 5320 5087 5321 5088 "......................................... 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" 5341 5097 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 5447 5107 5448 5108 "......................................... 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)") 5558 5141 - if !exists("g:netrw_quiet") 5559 5142 - call netrw#ErrorMsg(s:ERROR,"currently <netrw.vim> does not support writing using http:",16) 5560 - endif5561 -5562 - ".........................................5563 - " NetWrite: (dav) NetWrite Method #6 (cadaver) {{{35564 - elseif b:netrw_method == 65565 -" call Decho("write via cadaver (method #6)")5566 -5567 - " Construct execution string (four lines) which will be passed through filter5568 - let netrw_fname = escape(b:netrw_fname,g:netrw_fname_escape)5569 - let bhkeep = &l:bh5570 + " NetRead: (http) NetRead Method #5 (wget) {{{35571 + elseif b:netrw_method == 55572 +" 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 + endif5577 +" call Dret("netrw#NetRead :4 getcwd<".getcwd().">")5578 + return5579 + endif5580 5581 - " formerly just a "new...bd!", that changed the window sizes when equalalways. Using enew workaround instead5582 - let curbuf = bufnr("%")5583 - setl bh=hide5584 - keepalt enew5585 + 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 + else5592 +" 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 + endif5595 + let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)5596 5597 - setl ff=unix5598 - if exists("g:netrw_port") && g:netrw_port != ""5599 - keepj put ='open '.g:netrw_machine.' '.g:netrw_port5600 else5601 - keepj put ='open '.g:netrw_machine5602 - endif5603 - if exists("g:netrw_uid") && exists("s:netrw_passwd") && g:netrw_uid != ""5604 - keepj put ='user '.g:netrw_uid.' '.s:netrw_passwd5605 + " 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 endif5617 - keepj put ='put '.tmpfile.' '.netrw_fname5618 + let b:netrw_lastfile = choice5619 +" call Decho("setl ro")5620 + setl ro5621 5622 - " perform cadaver operation:5623 - keepj norm! 1Gdd5624 -" call Decho("executing: %!".g:netrw_dav_cmd)5625 - exe s:netrw_silentxfer."%!".g:netrw_dav_cmd5626 + ".........................................5627 + " NetRead: (dav) NetRead Method #6 {{{35628 + elseif b:netrw_method == 65629 +" 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 = bhkeep5635 - 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 + return5640 + endif5641 + 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 + else5645 + " Construct execution string (four lines) which will be passed through filter5646 + let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape)5647 + new5648 + setl ff=unix5649 + if exists("g:netrw_port") && g:netrw_port != ""5650 + keepj put ='open '.g:netrw_machine.' '.g:netrw_port5651 + else5652 + keepj put ='open '.g:netrw_machine5653 + endif5654 + if exists("g:netrw_uid") && exists("s:netrw_passwd") && g:netrw_uid != ""5655 + keepj put ='user '.g:netrw_uid.' '.s:netrw_passwd5656 + endif5657 + keepj put ='get '.netrw_fname.' '.tmpfile5658 + keepj put ='quit'5659 5660 + " perform cadaver operation:5661 + keepj norm! 1Gdd5662 +" call Decho("executing: %!".g:netrw_dav_cmd)5663 + exe s:netrw_silentxfer."%!".g:netrw_dav_cmd5664 + bd!5665 + endif5666 + let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)5667 let b:netrw_lastfile = choice5668 5669 ".........................................5670 - " NetWrite: (rsync) NetWrite Method #7 {{{35671 - elseif b:netrw_method == 75672 -" 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 {{{35676 + elseif b:netrw_method == 75677 +" 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 = choice5682 5683 ".........................................5684 - " NetWrite: (sftp) NetWrite Method #9 {{{35685 - elseif b:netrw_method == 95686 -" 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_machine5690 + " NetRead: (fetch) NetRead Method #8 {{{35691 + " fetch://[user@]host[:http]/path5692 + elseif b:netrw_method == 85693 +" 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 + endif5698 +" call Dret("NetRead")5699 + return5700 + endif5701 + if exists("g:netrw_option") && g:netrw_option =~ ":https\="5702 + let netrw_option= "http"5703 else5704 - let uid_machine = g:netrw_machine5705 + let netrw_option= "ftp"5706 endif5707 +" 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 instead5710 - let bhkeep = &l:bh5711 - let curbuf = bufnr("%")5712 - setl bh=hide5713 - keepalt enew5714 + 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 + else5718 +" 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 + endif5721 5722 - setl ff=unix5723 - 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 = bhkeep5731 - exe filtbuf."bw!"5732 + let result = s:NetrwGetFile(readcmd,tmpfile, b:netrw_method)5733 let b:netrw_lastfile = choice5734 +" call Decho("setl ro")5735 + setl ro5736 5737 ".........................................5738 - " NetWrite: Complain {{{35739 + " NetRead: (sftp) NetRead Method #9 {{{35740 + elseif b:netrw_method == 95741 +" 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)." ".tmpfile5744 + let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)5745 + let b:netrw_lastfile = choice5746 +5747 + ".........................................5748 + " NetRead: Complain {{{35749 else5750 - call netrw#ErrorMsg(s:WARNING,"unable to comply with your request<" . choice . ">",17)5751 - let leavemod= 15752 + call netrw#ErrorMsg(s:WARNING,"unable to comply with your request<" . choice . ">",8)5753 endif5754 endwhile5755 5756 - " NetWrite: Cleanup: {{{35757 -" 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 {{{35762 + if exists("b:netrw_method")5763 +" call Decho("cleanup b:netrw_method and b:netrw_fname")5764 + unlet b:netrw_method5765 + unlet b:netrw_fname5766 endif5767 - call s:NetrwOptionRestore("w:")5768 -5769 - if a:firstline == 1 && a:lastline == line("$")5770 - " restore modifiability; usually equivalent to set nomod5771 - let &mod= mod5772 -" 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 written5775 -" call Decho("(NetWrite) set nomod")5776 - set nomod5777 -" 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 endif5782 + keepj call s:NetrwOptionRestore("w:")5783 5784 -" call Dret("netrw#NetWrite")5785 +" call Dret("netrw#NetRead :5 getcwd<".getcwd().">")5786 endfun5787 5788 -" ---------------------------------------------------------------------5789 -" netrw#NetSource: source a remotely hosted vim script {{{25790 -" 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 help5797 - 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 45807 - else5808 - let i= 15809 - while i <= a:05810 - 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_tmpfile5818 - else5819 - call netrw#ErrorMsg(s:ERROR,"unable to source <".a:{i}.">!",48)5820 - endif5821 - let i= i + 15822 - endwhile5823 - endif5824 -" call Dret("netrw#NetSource")5825 -endfun5826 +" ------------------------------------------------------------------------5827 +" netrw#NetWrite: responsible for writing a file over the net {{{25828 +fun! netrw#NetWrite(...) range5829 +" 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". {{{25833 -" readcmd == %r : replace buffer with newly read file5834 -" == 0r : read file at top of buffer5835 -" == r : read file after current line5836 -" == 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 {{{35840 + let mod= 05841 + call s:NetrwOptionSave("w:")5842 + call s:NetrwSafeOptions()5843 5844 - " readcmd=='t': simply do nothing5845 - 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 {{{35849 + let tmpfile= s:GetTempfile("")5850 + if tmpfile == ""5851 +" call Dret("netrw#NetWrite : unable to get a tempfile!")5852 return5853 endif5854 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 == 05863 + let ichoice = 05864 + else5865 + let ichoice = 15866 endif5867 5868 - if a:readcmd[0] == '%'5869 - " get file into buffer5870 -" call Decho("get file into buffer")5871 -5872 - " rename the current buffer to the temp file (ie. tfile)5873 - if g:netrw_cygwin5874 - let tfile= substitute(a:tfile,'/cygdrive/\(.\)','\1:','')5875 - else5876 - let tfile= a:tfile5877 - endif5878 -" 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 - else5901 -" call Decho("edit temporary file")5902 - e!5903 - endif5904 -5905 - " rename buffer back to remote filename5906 -" 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.vim5911 - " to process this detection correctly.5912 -" call Decho("detect filetype of local version of remote file")5913 - let iskkeep= &l:isk5914 - setl isk-=/5915 - let &l:isk= iskkeep5916 -" call Dredir("renamed buffer back to remote filename<".rfile."> : expand(%)<".expand("%").">","ls!")5917 - let line1 = 15918 - let line2 = line("$")5919 -5920 - elseif s:FileReadable(a:tfile)5921 - " read file after current line5922 -" 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 + 15928 - let line2= line("$") - lastline + 15929 -5930 + let curbufname= expand("%")5931 +" call Decho("curbufname<".curbufname.">")5932 + if &binary5933 + " 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_cygwin5939 + " write (selected portion of) file to temporary5940 + 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 else5944 - " not readable5945 -" 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 - return5950 + " write (selected portion of) file to temporary5951 +" 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 endif5954 5955 - " User-provided (ie. optional) fix-it-up command5956 - 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 " Decho5960 -" 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 takes5963 + " on the temporary file's name. Deletion of the temporary file during5964 + " cleanup then causes an error message.5965 + 0file!5966 endif5967 5968 - if has("gui") && has("menu") && has("gui_running") && &go =~# 'm' && g:netrw_menu5969 - " update the Buffers menu5970 - keepj call s:UpdateBuffersMenu()5971 - endif5972 + " NetWrite: while choice loop: {{{35973 + while ichoice <= a:05974 5975 -" call Decho("readcmd<".a:readcmd."> cmdarg<".v:cmdarg."> tfile<".a:tfile."> readable=".s:FileReadable(a:tfile))5976 + " Process arguments: {{{45977 + " attempt to repeat with previous host-file-etc5978 + if exists("b:netrw_lastfile") && a:0 == 05979 +" call Decho("using b:netrw_lastfile<" . b:netrw_lastfile . ">")5980 + let choice = b:netrw_lastfile5981 + let ichoice= ichoice + 15982 + else5983 + exe "let choice= a:" . ichoice5984 5985 - " make sure file is being displayed5986 -" redraw!5987 + " Reconstruct Choice when choice starts with '"'5988 + if match(choice,"?") == 05989 + 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 46001 + break6002 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 -endfun6006 + elseif match(choice,"^\"") != -16007 + if match(choice,"\"$") != -16008 + " case "..."6009 + let choice=strpart(choice,1,strlen(choice)-2)6010 + else6011 + " case "... ... ..."6012 + let choice = strpart(choice,1,strlen(choice)-1)6013 + let wholechoice = ""6014 6015 -" ------------------------------------------------------------------------6016 -" s:NetrwMethod: determine method of transfer {{{26017 -" Input:6018 -" choice = url [protocol:]//[userid@]hostname[:port]/[path-to-file]6019 -" Output:6020 -" b:netrw_method= 1: rcp6021 -" 2: ftp + <.netrc>6022 -" 3: ftp + machine, id, password, and [path]filename6023 -" 4: scp6024 -" 5: http[s] (wget)6025 -" 6: dav6026 -" 7: rsync6027 -" 8: fetch6028 -" 9: sftp6029 -" g:netrw_machine= hostname6030 -" b:netrw_fname = filename6031 -" 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,"\"$") == -16036 + let wholechoice= wholechoice . " " . choice6037 + let ichoice = ichoice + 16038 + if choice > a:06039 + if !exists("g:netrw_quiet")6040 + call netrw#ErrorMsg(s:ERROR,"Unbalanced string in filename '". wholechoice ."'",13)6041 + endif6042 +" call Dret("netrw#NetWrite")6043 + return6044 + endif6045 + let choice= a:{ichoice}6046 + endwhile6047 + let choice= strpart(wholechoice,1,strlen(wholechoice)-1) . " " . strpart(choice,0,strlen(choice)-1)6048 + endif6049 + endif6050 + endif6051 + let ichoice= ichoice + 16052 +" call Decho("choice<" . choice . "> ichoice=".ichoice)6053 6054 - " sanity check: choice should have at least three slashes in it6055 - if strlen(substitute(a:choice,'[^/]','','g')) < 36056 - call netrw#ErrorMsg(s:ERROR,"not a netrw-style url; netrw uses protocol://[user@]hostname[:port]/[path])",78)6057 - let b:netrw_method = -16058 -" call Dret("NetrwMethod : incorrect url format<".a:choice.">")6059 + " Determine method of write (ftp, rcp, etc) {{{46060 + keepj call s:NetrwMethod(choice)6061 + if !exists("b:netrw_method") || b:netrw_method < 06062 +" call Dfunc("netrw#NetWrite : unsupported method")6063 return6064 endif6065 6066 - " record current g:netrw_machine, if any6067 - " curmachine used if protocol == ftp and no .netrc6068 - if exists("g:netrw_machine")6069 - let curmachine= g:netrw_machine6070 -" call Decho("curmachine<".curmachine.">")6071 - else6072 - let curmachine= "N O T A HOST"6073 - endif6074 - if exists("g:netrw_port")6075 - let netrw_port= g:netrw_port6076 + " =============6077 + " NetWrite: Perform Protocol-Based Write {{{36078 + " ============================6079 + if exists("g:netrw_silent") && g:netrw_silent == 0 && &ch >= 16080 + echo "(netrw) Processing your write request..."6081 +" call Decho("(netrw) Processing your write request...")6082 endif6083 6084 - " insure that netrw_ftp_cmd starts off every method determination6085 - " with the current g:netrw_ftp_cmd6086 - let s:netrw_ftp_cmd= g:netrw_ftp_cmd6087 + ".........................................6088 + " NetWrite: (rcp) NetWrite Method #1 {{{36089 + if b:netrw_method == 16090 +" call Decho("write via rcp (method #1)")6091 + if s:netrw_has_nt_rcp == 16092 + if exists("g:netrw_uid") && ( g:netrw_uid != "" )6093 + let uid_machine = g:netrw_machine .'.'. g:netrw_uid6094 + else6095 + let uid_machine = g:netrw_machine .'.'. $USERNAME6096 + endif6097 + else6098 + if exists("g:netrw_uid") && ( g:netrw_uid != "" )6099 + let uid_machine = g:netrw_uid .'@'. g:netrw_machine6100 + else6101 + let uid_machine = g:netrw_machine6102 + endif6103 + endif6104 +" 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 = choice6107 6108 - " initialization6109 - let b:netrw_method = 06110 - let g:netrw_machine = ""6111 - let b:netrw_fname = ""6112 - let g:netrw_port = ""6113 - let g:netrw_choice = a:choice6114 + ".........................................6115 + " NetWrite: (ftp + <.netrc>) NetWrite Method #2 {{{36116 + elseif b:netrw_method == 26117 +" call Decho("write via ftp+.netrc (method #2)")6118 + let netrw_fname = b:netrw_fname6119 6120 - " Patterns:6121 - " mipf : a:machine a:id password filename Use ftp6122 - " mf : a:machine filename Use ftp + <.netrc> or g:netrw_uid s:netrw_passwd6123 - " ftpurm : ftp://[user@]host[[#:]port]/filename Use ftp + <.netrc> or g:netrw_uid s:netrw_passwd6124 - " rcpurm : rcp://[user@]host/filename Use rcp6125 - " rcphf : [user@]host:filename Use rcp6126 - " scpurm : scp://[user@]host[[#:]port]/filename Use scp6127 - " httpurm : http[s]://[user@]host/filename Use wget6128 - " davurm : dav[s]://host[:port]/path Use cadaver/curl6129 - " rsyncurm : rsync://host[:port]/path Use rsync6130 - " fetchurm : fetch://[user@]host[:http]/filename Use fetch (defaults to ftp, override for http)6131 - " sftpurm : sftp://[user@]host/filename Use scp6132 - 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 instead6147 + let bhkeep = &l:bh6148 + let curbuf = bufnr("%")6149 + setl bh=hide6150 + keepalt enew6151 6152 -" call Decho("determine method:")6153 - " Determine Method6154 - " Method#1: rcp://user@hostname/...path-to-file {{{36155 - if match(a:choice,rcpurm) == 06156 -" call Decho("rcp://...")6157 - let b:netrw_method = 16158 - 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= userid6163 - endif6164 -6165 - " Method#4: scp://user@hostname/...path-to-file {{{36166 - elseif match(a:choice,scpurm) == 06167 -" call Decho("scp://...")6168 - let b:netrw_method = 46169 - 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=unix6174 + keepj put =g:netrw_ftpmode6175 +" call Decho("filter input: ".getline('$'))6176 + if exists("g:netrw_ftpextracmd")6177 + keepj put =g:netrw_ftpextracmd6178 +" call Decho("filter input: ".getline("$"))6179 + endif6180 + 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 + else6186 +" 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 + endif6190 + " 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 + endif6195 + let mod=16196 + endif6197 6198 - " Method#5: http[s]://user@hostname/...path-to-file {{{36199 - elseif match(a:choice,httpurm) == 06200 -" call Decho("http://...")6201 - let b:netrw_method = 56202 - 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 = bhkeep6208 + exe filtbuf."bw!"6209 6210 - " Method#6: dav://hostname[:port]/..path-to-file.. {{{36211 - elseif match(a:choice,davurm) == 06212 -" call Decho("dav://...")6213 - let b:netrw_method= 66214 - if a:choice =~ 'davs:'6215 - let g:netrw_machine= 'https://'.substitute(a:choice,davurm,'\1/\2',"")6216 - else6217 - let g:netrw_machine= 'http://'.substitute(a:choice,davurm,'\1/\2',"")6218 - endif6219 - let b:netrw_fname = substitute(a:choice,davurm,'\3',"")6220 + let b:netrw_lastfile = choice6221 6222 - " Method#7: rsync://user@hostname/...path-to-file {{{36223 - elseif match(a:choice,rsyncurm) == 06224 -" call Decho("rsync://...")6225 - let b:netrw_method = 76226 - 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 {{{36230 + elseif b:netrw_method == 36231 + " Construct execution string (three or more lines) which will be passed through filter6232 +" call Decho("read via ftp+mipf (method #3)")6233 + let netrw_fname = b:netrw_fname6234 + let bhkeep = &l:bh6235 6236 - " Methods 2,3: ftp://[user@]hostname[[:#]port]/...path-to-file {{{36237 - elseif match(a:choice,ftpurm) == 06238 -" 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= userid6246 - endif6247 + " formerly just a "new...bd!", that changed the window sizes when equalalways. Using enew workaround instead6248 + let curbuf = bufnr("%")6249 + setl bh=hide6250 + keepalt enew6251 + setl ff=unix6252 6253 - if curmachine != g:netrw_machine6254 - 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-entry6258 - unlet s:netrw_passwd6259 + if exists("g:netrw_port") && g:netrw_port != ""6260 + keepj put ='open '.g:netrw_machine.' '.g:netrw_port6261 +" call Decho("filter input: ".getline('.'))6262 + else6263 + keepj put ='open '.g:netrw_machine6264 +" call Decho("filter input: ".getline('.'))6265 endif6266 - if exists("netrw_port")6267 - unlet netrw_port6268 + if exists("g:netrw_uid") && g:netrw_uid != ""6269 + if exists("g:netrw_ftp") && g:netrw_ftp == 16270 + keepj put =g:netrw_uid6271 +" call Decho("filter input: ".getline('.'))6272 + if exists("s:netrw_passwd") && s:netrw_passwd != ""6273 + keepj put ='\"'.s:netrw_passwd.'\"'6274 + endif6275 +" 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 + endif6280 endif6281 - endif6282 -6283 - if exists("g:netrw_uid") && exists("s:netrw_passwd")6284 - let b:netrw_method = 36285 - else6286 - let host= substitute(g:netrw_machine,'\..*$','','')6287 - if exists("s:netrw_hup[host]")6288 - call NetUserPass("ftp:".host)6289 + keepj put =g:netrw_ftpmode6290 +" call Decho("filter input: ".getline('$'))6291 + if exists("g:netrw_ftpextracmd")6292 + keepj put =g:netrw_ftpextracmd6293 +" call Decho("filter input: ".getline("$"))6294 + endif6295 + keepj put ='put \"'.tmpfile.'\" \"'.netrw_fname.'\"'6296 +" call Decho("filter input: ".getline('.'))6297 + " save choice/id/password for future use6298 + let b:netrw_lastfile = choice6299 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 - endif6307 - let b:netrw_method= 26308 - elseif s:FileReadable(expand("$HOME/.netrc")) && !g:netrw_ignorenetrc6309 -" call Decho("using <".expand("$HOME/.netrc")."> (readable)")6310 - let b:netrw_method= 26311 - else6312 - 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_passwd6317 + " perform ftp:6318 + " -i : turns off interactive prompting from ftp6319 + " -n unix : DON'T use <.netrc>, even though it exists6320 + " -n win32: quit being obnoxious about password6321 + keepj norm! 1Gdd6322 +" call Decho("executing: %!".s:netrw_ftp_cmd." ".g:netrw_ftp_options)6323 + exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." ".g:netrw_ftp_options6324 + " 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 endif6329 - let b:netrw_method= 36330 + let mod=16331 endif6332 - endif6333 6334 - " Method#8: fetch {{{36335 - elseif match(a:choice,fetchurm) == 06336 -" call Decho("fetch://...")6337 - let b:netrw_method = 86338 - 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= bhkeep6346 + exe filtbuf."bw!"6347 6348 - " Method#3: Issue an ftp : "machine id password [path/]filename" {{{36349 - elseif match(a:choice,mipf) == 06350 -" call Decho("(ftp) host id pass file")6351 - let b:netrw_method = 36352 - 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 {{{36359 + elseif b:netrw_method == 46360 +" 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 + else6364 + let useport= ""6365 + endif6366 +" 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 = choice6369 6370 - " Method#3: Issue an ftp: "hostname [path/]filename" {{{36371 - elseif match(a:choice,mf) == 06372 -" call Decho("(ftp) host file")6373 - if exists("g:netrw_uid") && exists("s:netrw_passwd")6374 - let b:netrw_method = 36375 - 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 {{{36379 + elseif b:netrw_method == 56380 +" call Decho("write via http (method #5)")6381 5143 + let curl= substitute(g:netrw_http_put_cmd,'\s\+.*$',"","") 6382 5144 + if executable(curl) … … 6386 5148 + elseif !exists("g:netrw_quiet") 6387 5149 + call netrw#ErrorMsg(s:ERROR,"can't write to http using <".g:netrw_http_put_cmd".">".",16) 6388 + endif6389 6390 - elseif s:FileReadable(expand("$HOME/.netrc"))6391 - let b:netrw_method = 26392 - let g:netrw_machine = substitute(a:choice,mf,'\1',"")6393 - let b:netrw_fname = substitute(a:choice,mf,'\2',"")6394 - endif6395 + ".........................................6396 + " NetWrite: (dav) NetWrite Method #6 (cadaver) {{{36397 + elseif b:netrw_method == 66398 +" call Decho("write via cadaver (method #6)")6399 6400 - " Method#9: sftp://user@hostname/...path-to-file {{{36401 - elseif match(a:choice,sftpurm) == 06402 -" call Decho("sftp://...")6403 - let b:netrw_method = 96404 - 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 filter6407 + let netrw_fname = escape(b:netrw_fname,g:netrw_fname_escape)6408 + let bhkeep = &l:bh6409 6410 - " Method#1: Issue an rcp: hostname:filename" (this one should be last) {{{36411 - elseif match(a:choice,rcphf) == 06412 -" call Decho("(rcp) [user@]host:file) rcphf<".rcphf.">")6413 - let b:netrw_method = 16414 - 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= userid6423 - endif6424 + " formerly just a "new...bd!", that changed the window sizes when equalalways. Using enew workaround instead6425 + let curbuf = bufnr("%")6426 + setl bh=hide6427 + keepalt enew6428 6429 - " Cannot Determine Method {{{36430 - else6431 - if !exists("g:netrw_quiet")6432 - call netrw#ErrorMsg(s:WARNING,"cannot determine method (format: protocol://[user@]hostname[:port]/[path])",45)6433 - endif6434 - let b:netrw_method = -16435 - endif6436 - "}}}36437 + setl ff=unix6438 + if exists("g:netrw_port") && g:netrw_port != ""6439 + keepj put ='open '.g:netrw_machine.' '.g:netrw_port6440 + else6441 + keepj put ='open '.g:netrw_machine6442 + endif6443 + if exists("g:netrw_uid") && exists("s:netrw_passwd") && g:netrw_uid != ""6444 + keepj put ='user '.g:netrw_uid.' '.s:netrw_passwd6445 + endif6446 + keepj put ='put '.tmpfile.' '.netrw_fname6447 6448 - if g:netrw_port != ""6449 - " remove any leading [:#] from port number6450 - let g:netrw_port = substitute(g:netrw_port,'[#:]\+','','')6451 - elseif exists("netrw_port")6452 - " retain port number as implicit for subsequent ftp operations6453 - let g:netrw_port= netrw_port6454 - endif6455 + " perform cadaver operation:6456 + keepj norm! 1Gdd6457 +" call Decho("executing: %!".g:netrw_dav_cmd)6458 + exe s:netrw_silentxfer."%!".g:netrw_dav_cmd6459 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") "Decho6465 -" call Decho("g:netrw_uid <".g:netrw_uid.">")6466 -" endif "Decho6467 -" if exists("s:netrw_passwd") "Decho6468 -" call Decho("s:netrw_passwd <".s:netrw_passwd.">")6469 -" endif "Decho6470 -" 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 -endfun6473 + " remove enew buffer (quietly)6474 + let filtbuf= bufnr("%")6475 + exe curbuf."b!"6476 + let &l:bh = bhkeep6477 + exe filtbuf."bw!"6478 6479 -" ------------------------------------------------------------------------6480 -" NetReadFixup: this sort of function is typically written by the user {{{26481 -" to handle extra junk that their system's ftp dumps6482 -" into the transfer. This function is provided as an6483 -" example and as a fix for a Windows 95 problem: in my6484 -" experience, win95's ftp always dumped four blank lines6485 -" at the end of the transfer.6486 -if has("win95") && exists("g:netrw_win95ftp") && g:netrw_win95ftp6487 - fun! NetReadFixup(method, line1, line2)6488 -" call Dfunc("NetReadFixup(method<".a:method."> line1=".a:line1." line2=".a:line2.")")6489 + let b:netrw_lastfile = choice6490 6491 - " sanity checks -- attempt to convert inputs to integers6492 - let method = a:method + 06493 - let line1 = a:line1 + 06494 - let line2 = a:line2 + 06495 - if type(method) != 0 || type(line1) != 0 || type(line2) != 0 || method < 0 || line1 <= 0 || line2 <= 06496 -" call Dret("NetReadFixup")6497 - return6498 - endif6499 + ".........................................6500 + " NetWrite: (rsync) NetWrite Method #7 {{{36501 + elseif b:netrw_method == 76502 +" 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 = choice6506 6507 - if method == 3 " ftp (no <.netrc>)6508 - let fourblanklines= line2 - 36509 - if fourblanklines >= line16510 - exe "sil keepj ".fourblanklines.",".line2."g/^\s*$/d"6511 - call histdel("/",-1)6512 + ".........................................6513 + " NetWrite: (sftp) NetWrite Method #9 {{{36514 + elseif b:netrw_method == 96515 +" 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_machine6519 + else6520 + let uid_machine = g:netrw_machine6521 5150 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.">)") 6593 5158 +" 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.">)") 6596 5164 +" call Decho("set nomod") 6597 5165 + setl nomod 6598 5166 +" call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") 6599 5167 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.">") 6660 5175 +" 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)) 6662 5178 +" 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.")") 6664 5181 +" 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 6683 5189 +" --------------------------------------------------------------------- 6684 5190 +" netrw#SetTreetop: resets the tree top to the current directory/specified directory {{{2 … … 6720 5226 + else 6721 5227 + call s:NetrwBrowse(islocal,s:NetrwBrowseChgDir(islocal,treedir)) 6722 5228 + endif 6723 5229 +" call Dret("netrw#SetTreetop") 6724 5230 +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.">)") 6746 5240 +" 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!") 6748 5261 + 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 " --------------------------------------------------------------------- 6773 5324 -" s:NetrwMaps: {{{2 6774 5325 -fun! s:NetrwMaps(islocal) 6775 5326 -" 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 6779 5338 6780 5339 - " set up Rexplore and [ 2-leftmouse-click -or- c-leftmouse ] … … 6791 5350 - nmap <unique> <silent> <c-leftmouse> <Plug>NetrwReturn 6792 5351 - 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 6799 5353 - nno <silent> <Plug>NetrwReturn :Rexplore<cr> 6800 5354 -" 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 - 6868 5357 - if a:islocal 6869 5358 -" call Decho("(NetrwMaps) make local maps") … … 6971 5460 - nmap <buffer> <unique> <c-h> <Plug>NetrwHideEdit 6972 5461 - 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 7023 5463 - nnoremap <buffer> <silent> <Plug>NetrwHideEdit :call <SID>NetrwHideEdit(1)<cr> 7024 5464 - if !hasmapto('<Plug>NetrwRefresh') 7025 5465 - nmap <buffer> <unique> <c-l> <Plug>NetrwRefresh 7026 5466 - 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 7036 5468 - nnoremap <buffer> <silent> <Plug>NetrwRefresh :call <SID>NetrwRefresh(1,<SID>NetrwBrowseChgDir(1,'./'))<cr> 7037 5469 - if s:didstarstar || !mapcheck("<s-down>","n") … … 7064 5496 - exe 'vnoremap <buffer> <silent> <rightmouse> <leftmouse>:call <SID>NetrwLocalRm("'.mapsafecurdir.'")<cr>' 7065 5497 - 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 7069 5499 - exe 'nnoremap <buffer> <silent> <del> :call <SID>NetrwLocalRm("'.mapsafecurdir.'")<cr>' 7070 5500 - exe 'nnoremap <buffer> <silent> D :call <SID>NetrwLocalRm("'.mapsafecurdir.'")<cr>' … … 7079 5509 - exe 'inoremap <buffer> <silent> <Leader>m <c-o>:call <SID>NetrwMakeDir("")<cr>' 7080 5510 - nnoremap <buffer> <F1> :he netrw-quickhelp<cr> 7081 5511 - 7082 5512 - else " remote 7083 5513 -" call Decho("(NetrwMaps) make remote maps") … … 7189 5619 - imap <buffer> <c-l> <Plug>NetrwRefresh 7190 5620 - 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 - 7195 5622 - let mapsafepath = escape(s:path, s:netrw_map_escape) 7196 5623 - 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 - 7204 5625 - nnoremap <buffer> <silent> <Plug>NetrwRefresh :call <SID>NetrwRefresh(0,<SID>NetrwBrowseChgDir(0,'./'))<cr> 7205 5626 - if g:netrw_mousemaps == 1 … … 7223 5644 - exe 'vnoremap <buffer> <silent> <rightmouse> <leftmouse>:call <SID>NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")<cr>' 7224 5645 - 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 7264 5647 - exe 'nnoremap <buffer> <silent> <del> :call <SID>NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")<cr>' 7265 5648 - exe 'nnoremap <buffer> <silent> d :call <SID>NetrwMakeDir("'.mapsafeusermach.'")<cr>' … … 7276 5659 - inoremap <buffer> <F1> <c-o>:he netrw-quickhelp<cr> 7277 5660 - endif 7278 5661 - 7279 5662 - 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 - 7288 5664 -" call Dret("s:NetrwMaps") 7289 5665 -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 - 7298 5667 -" --------------------------------------------------------------------- 7299 5668 -" s:ExplorePatHls: converts an Explore pattern into a regular expression search pattern {{{2 … … 7308 5677 - return repat 7309 5678 -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 - 7321 5680 -" --------------------------------------------------------------------- 7322 5681 -" s:NetrwBookHistHandler: {{{2 … … 7333 5692 -" " call Dret("s:NetrwBookHistHandler - suppressed due to g:netrw_dirhistmax") 7334 5693 - return 7335 - endif7336 + " Method#7: rsync://user@hostname/...path-to-file {{{37337 + elseif match(a:choice,rsyncurm) == 07338 +" call Decho("rsync://...")7339 + let b:netrw_method = 77340 + 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 == 07345 - " bookmark the current directory7346 -" call Decho("(user: <b>) bookmark the current directory")7347 - if !exists("g:netrw_bookmarklist")7348 - let g:netrw_bookmarklist= []7349 - endif7350 - if index(g:netrw_bookmarklist,a:curdir) == -17351 - " curdir not currently in g:netrw_bookmarklist, so include it7352 - call add(g:netrw_bookmarklist,a:curdir)7353 - call sort(g:netrw_bookmarklist)7354 + " Methods 2,3: ftp://[user@]hostname[[:#]port]/...path-to-file {{{37355 + elseif match(a:choice,ftpurm) == 07356 +" 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= userid7364 endif7365 - echo "bookmarked the current directory"7366 7367 - elseif a:chg == 17368 - " change to the bookmarked directory7369 -" 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 - else7374 - echomsg "Sorry, bookmark#".v:count." doesn't exist!"7375 + if curmachine != g:netrw_machine7376 + 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-entry7380 + unlet s:netrw_passwd7381 + endif7382 + if exists("netrw_port")7383 + unlet netrw_port7384 + endif7385 endif7386 7387 - elseif a:chg == 27388 -" redraw!7389 - let didwork= 07390 - " list user's bookmarks7391 -" 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= 17395 - for bmd in g:netrw_bookmarklist7396 -" 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 = 17399 - let cnt = cnt + 17400 - endfor7401 - endif7402 + if exists("g:netrw_uid") && exists("s:netrw_passwd")7403 + let b:netrw_method = 37404 + else7405 + let host= substitute(g:netrw_machine,'\..*$','','')7406 + if exists("s:netrw_hup[host]")7407 + call NetUserPass("ftp:".host)7408 7409 - " list directory history7410 - let cnt = g:netrw_dirhist_cnt7411 - let first = 17412 - let histcnt = 07413 - if g:netrw_dirhistmax > 07414 - 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= 17420 + 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 endif7427 - let histcnt = histcnt + 17428 - let first = 07429 - let cnt = ( cnt - 1 ) % g:netrw_dirhistmax7430 - if cnt < 07431 - let cnt= cnt + g:netrw_dirhistmax7432 + let b:netrw_method= 27433 + elseif s:FileReadable(expand("$HOME/.netrc")) && !g:netrw_ignorenetrc7434 +" call Decho("using <".expand("$HOME/.netrc")."> (readable)")7435 + let b:netrw_method= 27436 + else7437 + 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_passwd7442 endif7443 - endwhile7444 - else7445 - let g:netrw_dirhist_cnt= 07446 - endif7447 - if didwork7448 - call inputsave()|call input("Press <cr> to continue")|call inputrestore()7449 - endif7450 -7451 - elseif a:chg == 37452 - " 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:curdir7455 - if g:netrw_dirhistmax > 07456 - let g:netrw_dirhist_cnt = ( g:netrw_dirhist_cnt + 1 ) % g:netrw_dirhistmax7457 - let g:netrw_dirhist_{g:netrw_dirhist_cnt} = a:curdir7458 + let b:netrw_method= 37459 endif7460 -" call Decho("save dirhist#".g:netrw_dirhist_cnt."<".g:netrw_dirhist_{g:netrw_dirhist_cnt}.">")7461 endif7462 7463 - elseif a:chg == 47464 - " u: change to the previous directory stored on the history list7465 -" call Decho("(user: <u>) chg to prev dir from history")7466 - if g:netrw_dirhistmax > 07467 - let g:netrw_dirhist_cnt= ( g:netrw_dirhist_cnt - v:count1 ) % g:netrw_dirhistmax7468 - if g:netrw_dirhist_cnt < 07469 - let g:netrw_dirhist_cnt= g:netrw_dirhist_cnt + g:netrw_dirhistmax7470 - endif7471 - else7472 - let g:netrw_dirhist_cnt= 07473 - endif7474 - 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 noro7478 -" call Decho("(NetrwBookHistHandler) setl ma noro")7479 - sil! keepj %d7480 - setl nomod7481 -" 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 - endif7484 -" " 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 - else7487 - if g:netrw_dirhistmax > 07488 - let g:netrw_dirhist_cnt= ( g:netrw_dirhist_cnt + v:count1 ) % g:netrw_dirhistmax7489 - else7490 - let g:netrw_dirhist_cnt= 07491 - endif7492 - echo "Sorry, no predecessor directory exists yet"7493 + " Method#8: fetch {{{37494 + elseif match(a:choice,fetchurm) == 07495 +" call Decho("fetch://...")7496 + let b:netrw_method = 87497 + 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" {{{37503 + elseif match(a:choice,mipf) == 07504 +" call Decho("(ftp) host id pass file")7505 + let b:netrw_method = 37506 + 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" {{{37513 + elseif match(a:choice,mf) == 07514 +" call Decho("(ftp) host file")7515 + if exists("g:netrw_uid") && exists("s:netrw_passwd")7516 + let b:netrw_method = 37517 + 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 = 27522 + let g:netrw_machine = substitute(a:choice,mf,'\1',"")7523 + let b:netrw_fname = substitute(a:choice,mf,'\2',"")7524 endif7525 7526 - elseif a:chg == 57527 - " U: change to the subsequent directory stored on the history list7528 -" call Decho("(user: <U>) chg to next dir from history")7529 - if g:netrw_dirhistmax > 07530 - let g:netrw_dirhist_cnt= ( g:netrw_dirhist_cnt + 1 ) % g:netrw_dirhistmax7531 - 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 noro7536 - sil! keepj %d7537 -" call Decho("removed all lines from buffer (%d)")7538 -" call Decho("(NetrwBookHistHandler) setl nomod")7539 - setl nomod7540 -" call Decho("(set nomod) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")7541 - endif7542 -" 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 - else7545 - let g:netrw_dirhist_cnt= ( g:netrw_dirhist_cnt - 1 ) % g:netrw_dirhistmax7546 - if g:netrw_dirhist_cnt < 07547 - let g:netrw_dirhist_cnt= g:netrw_dirhist_cnt + g:netrw_dirhistmax7548 - endif7549 - echo "Sorry, no successor directory exists yet"7550 - endif7551 - else7552 - let g:netrw_dirhist_cnt= 07553 - echo "Sorry, no successor directory exists yet (g:netrw_dirhistmax is ".g:netrw_dirhistmax.")"7554 + " Method#9: sftp://user@hostname/...path-to-file {{{37555 + elseif match(a:choice,sftpurm) == 07556 +" call Decho("sftp://...")7557 + let b:netrw_method = 97558 + 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) {{{37562 + elseif match(a:choice,rcphf) == 07563 +" call Decho("(rcp) [user@]host:file) rcphf<".rcphf.">")7564 + let b:netrw_method = 17565 + 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= userid7574 endif7575 7576 - elseif a:chg == 67577 - " delete the v:count'th bookmark7578 -" 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 first7583 -" call Decho("bookmark delete savefile<".savefile.">")7584 - keepj call delete(savefile)7585 + " Cannot Determine Method {{{37586 + else7587 + if !exists("g:netrw_quiet")7588 + call netrw#ErrorMsg(s:WARNING,"cannot determine method (format: protocol://[user@]hostname[:port]/[path])",45)7589 endif7590 -" 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 = -17594 endif7595 - call s:NetrwBookmarkMenu()7596 - call s:NetrwTgtMenu()7597 - let @@= ykeep7598 -" call Dret("s:NetrwBookHistHandler")7599 -endfun7600 + "}}}37601 7602 -" ---------------------------------------------------------------------7603 -" s:NetrwBookHistRead: this function reads bookmarks and history {{{27604 -" Sister function: s:NetrwBookHistSave()7605 -fun! s:NetrwBookHistRead()7606 -" call Dfunc("s:NetrwBookHistRead()")7607 - if !exists("g:netrw_dirhistmax") || g:netrw_dirhistmax <= 07608 -" " call Dret("s:NetrwBookHistRead - suppressed due to g:netrw_dirhistmax")7609 - return7610 + if g:netrw_port != ""7611 + " remove any leading [:#] from port number7612 + let g:netrw_port = substitute(g:netrw_port,'[#:]\+','','')7613 + elseif exists("netrw_port")7614 + " retain port number as implicit for subsequent ftp operations7615 + let g:netrw_port= netrw_port7616 endif7617 - 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 ".savefile7624 +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") "Decho7630 +" call Decho("g:netrw_uid <".g:netrw_uid.">")7631 +" endif "Decho7632 +" if exists("s:netrw_passwd") "Decho7633 +" call Decho("s:netrw_passwd <".s:netrw_passwd.">")7634 +" endif "Decho7635 +" 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 +endfun7638 +7639 +" ------------------------------------------------------------------------7640 +" NetReadFixup: this sort of function is typically written by the user {{{27641 +" to handle extra junk that their system's ftp dumps7642 +" into the transfer. This function is provided as an7643 +" example and as a fix for a Windows 95 problem: in my7644 +" experience, win95's ftp always dumped four blank lines7645 +" at the end of the transfer.7646 +if has("win95") && exists("g:netrw_win95ftp") && g:netrw_win95ftp7647 + 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 integers7651 + let method = a:method + 07652 + let line1 = a:line1 + 07653 + let line2 = a:line2 + 07654 + if type(method) != 0 || type(line1) != 0 || type(line2) != 0 || method < 0 || line1 <= 0 || line2 <= 07655 +" call Dret("NetReadFixup")7656 + return7657 endif7658 - if g:netrw_dirhistmax > 07659 - let savefile= home."/.netrwhist"7660 - if filereadable(savefile)7661 -" call Decho("sourcing .netrwhist")7662 - exe "keepalt keepj so ".savefile7663 +7664 + if method == 3 " ftp (no <.netrc>)7665 + let fourblanklines= line2 - 37666 + if fourblanklines >= line17667 + exe "sil keepj ".fourblanklines.",".line2."g/^\s*$/d"7668 + call histdel("/",-1)7669 endif7670 - let s:netrw_initbookhist= 17671 - au VimLeave * call s:NetrwBookHistSave()7672 endif7673 - endif7674 - let @@= ykeep7675 -" call Dret("s:NetrwBookHistRead")7676 -endfun7677 +7678 +" call Dret("NetReadFixup")7679 + endfun7680 +endif7681 7682 " ---------------------------------------------------------------------7683 -" s:NetrwBookHistSave: this function saves bookmarks and history {{{27684 -" Sister function: s:NetrwBookHistRead()7685 -" I used to do this via viminfo but that appears to7686 -" be unreliable for long-term storage7687 -fun! s:NetrwBookHistSave()7688 -" call Dfunc("s:NetrwBookHistSave() dirhistmax=".g:netrw_dirhistmax)7689 - if !exists("g:netrw_dirhistmax") || g:netrw_dirhistmax <= 07690 -" call Dret("s:NetrwBookHistSave : dirhistmax=".g:netrw_dirhistmax)7691 - return7692 - endif7693 +" NetUserPass: set username and password for subsequent ftp transfer {{{27694 +" Usage: :call NetUserPass() -- will prompt for userid and password7695 +" :call NetUserPass("uid") -- will prompt for password7696 +" :call NetUserPass("uid","password") -- sets global userid and password7697 +" :call NetUserPass("ftp:host") -- looks up userid and password using hup dictionary7698 +" :call NetUserPass("host","uid","password") -- sets hup dictionary with host, userid, password7699 +fun! NetUserPass(...)7700 7701 - let savefile= s:NetrwHome()."/.netrwhist"7702 - 1split7703 - call s:NetrwEnew()7704 - setl cino= com= cpo-=a cpo-=A fo=nroql2 tw=0 report=10000 noswf7705 - setl nocin noai noci magic nospell nohid wig= noaw7706 - setl ma noro write7707 - if exists("+acd") | setl noacd | endif7708 - sil! keepj keepalt %d7709 +" call Dfunc("NetUserPass() a:0=".a:0)7710 7711 - " save .netrwhist -- no attempt to merge7712 - sil! keepalt file .netrwhist7713 - 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 = 17717 - while cnt <= g:netrw_dirhist_cnt7718 - call setline((cnt+lastline),'let g:netrw_dirhist_'.cnt."='".g:netrw_dirhist_{cnt}."'")7719 - let cnt= cnt + 17720 - endwhile7721 - exe "sil! w! ".savefile7722 + if !exists('s:netrw_hup')7723 + let s:netrw_hup= {}7724 + endif7725 7726 - sil keepj %d7727 - if exists("g:netrw_bookmarklist") && g:netrw_bookmarklist != []7728 - " merge and write .netrwbook7729 - let savefile= s:NetrwHome()."/.netrwbook"7730 + if a:0 == 07731 + " case: no input arguments7732 7733 - if filereadable(savefile)7734 - let booklist= deepcopy(g:netrw_bookmarklist)7735 - exe "sil keepj keepalt so ".savefile7736 - for bdm in booklist7737 - if index(g:netrw_bookmarklist,bdm) == -17738 - call add(g:netrw_bookmarklist,bdm)7739 - endif7740 - endfor7741 - call sort(g:netrw_bookmarklist)7742 - exe "sil! w! ".savefile7743 - endif7744 + " change host and username if not previously entered; get new password7745 + if !exists("g:netrw_machine")7746 + let g:netrw_machine= input('Enter hostname: ')7747 + endif7748 + if !exists("g:netrw_uid") || g:netrw_uid == ""7749 + " get username (user-id) via prompt7750 + let g:netrw_uid= input('Enter username: ')7751 + endif7752 + " get password via prompting7753 + let s:netrw_passwd= inputsecret("Enter Password: ")7754 7755 - " construct and save .netrwbook7756 - call setline(1,"let g:netrw_bookmarklist= ".string(g:netrw_bookmarklist))7757 - exe "sil! w! ".savefile7758 + " set up hup database7759 + let host = substitute(g:netrw_machine,'\..*$','','')7760 + if !exists('s:netrw_hup[host]')7761 + let s:netrw_hup[host]= {}7762 endif7763 - let bgone= bufnr("%")7764 - q!7765 - exe "keepalt ".bgone."bwipe!"7766 + let s:netrw_hup[host].uid = g:netrw_uid7767 + let s:netrw_hup[host].passwd = s:netrw_passwd7768 7769 -" call Dret("s:NetrwBookHistSave")7770 -endfun7771 + elseif a:0 == 17772 + " case: one input argument7773 7774 -" ---------------------------------------------------------------------7775 -" s:NetrwBrowse: This function uses the command in g:netrw_list_cmd to provide a {{{27776 -" list of the contents of a local or remote directory. It is assumed that the7777 -" g:netrw_list_cmd has a string, USEPORT HOSTNAME, that needs to be substituted7778 -" 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|endif7781 -" 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 {{{37784 - if !exists("s:netrw_initbookhist")7785 - keepj call s:NetrwBookHistRead()7786 - endif7787 + if a:1 =~ '^ftp:'7788 + " get host from ftp:... url7789 + " access userid and password from hup (host-user-passwd) dictionary7790 +" 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].uid7795 + let s:netrw_passwd = s:netrw_hup[host].passwd7796 +" 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 + else7799 + let g:netrw_uid = input("Enter UserId: ")7800 + let s:netrw_passwd = inputsecret("Enter Password: ")7801 + endif7802 7803 - " s:NetrwBrowse: simplify the dirname (especially for ".."s in dirnames) {{{37804 - if a:dirname !~ '^\a\+://'7805 - let dirname= simplify(a:dirname)7806 else7807 - let dirname= a:dirname7808 - endif7809 -7810 - if exists("s:netrw_skipbrowse")7811 - unlet s:netrw_skipbrowse7812 -" 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 - return7815 + " 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_machine7820 + else7821 + let host= substitute(g:netrw_machine,'\..*$','','')7822 + endif7823 + else7824 + let g:netrw_machine= input('Enter hostname: ')7825 + endif7826 + let g:netrw_uid = a:17827 +" call Decho("set g:netrw_uid= <".g:netrw_uid.">")7828 + if exists("g:netrw_passwd")7829 + " ask for password if one not previously entered7830 + let s:netrw_passwd= g:netrw_passwd7831 + else7832 + let s:netrw_passwd = inputsecret("Enter Password: ")7833 + endif7834 endif7835 7836 - " s:NetrwBrowse: sanity checks: {{{37837 - 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 - return7841 - endif7842 - 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 - return7846 +" call Decho("host<".host.">")7847 + if exists("host")7848 + if !exists('s:netrw_hup[host]')7849 + let s:netrw_hup[host]= {}7850 + endif7851 + let s:netrw_hup[host].uid = g:netrw_uid7852 + let s:netrw_hup[host].passwd = s:netrw_passwd7853 endif7854 7855 - " s:NetrwBrowse: save options: {{{37856 - call s:NetrwOptionSave("w:")7857 + elseif a:0 == 27858 + let g:netrw_uid = a:17859 + let s:netrw_passwd = a:27860 7861 - " s:NetrwBrowse: re-instate any marked files {{{37862 - if exists("s:netrwmarkfilelist_{bufnr('%')}")7863 -" call Decho("(NetrwBrowse) clearing marked files")7864 - exe "2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/"7865 + elseif a:0 == 37866 + " enter hostname, user-id, and password into the hup dictionary7867 + 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 endif7872 + let s:netrw_hup[host].uid = a:27873 + let s:netrw_hup[host].passwd = a:37874 + let g:netrw_uid = s:netrw_hup[host].uid7875 + let s:netrw_passwd = s:netrw_hup[host].passwd7876 +" 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 + endif7879 7880 - if a:islocal && exists("w:netrw_acdkeep") && w:netrw_acdkeep7881 - " s:NetrwBrowse: set up "safe" options for local directory/file {{{37882 -" 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 +endfun7889 7890 - elseif !a:islocal && dirname !~ '[\/]$' && dirname !~ '^"'7891 - " s:NetrwBrowse: looks like a remote regular file, attempt transfer {{{37892 -" call Decho("(NetrwBrowse) attempt transfer as regular file<".dirname.">")7893 +" ===========================================7894 +" Shared Browsing Support: {{{17895 +" ===========================================7896 7897 - " remove any filetype indicator from end of dirname, except for the7898 - " "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 {{{37905 - keepj mark '7906 - call s:NetrwEnew(dirname)7907 - call s:NetrwSafeOptions()7908 - setl ma noro7909 -" call Decho("(NetrwBrowse) setl ma noro")7910 - let b:netrw_curdir = dirname7911 - let url = s:method."://".s:user.s:machine.(s:port ? ":".s:port : "")."/".s:path7912 -" 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 error7918 - exe "sil keepj keepalt doau BufReadPost ".fnameescape(s:fname)7919 - endif7920 -7921 - " s:NetrwBrowse: save certain window-oriented variables into buffer-oriented variables {{{37922 - call s:SetBufWinVars()7923 - call s:NetrwOptionRestore("w:")7924 -" call Decho("(NetrwBrowse) setl ma nomod")7925 - setl ma nomod7926 -" 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 {{{27929 +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 repat7938 +endfun7939 7940 -" call Dret("s:NetrwBrowse : file<".s:fname.">")7941 5694 +" --------------------------------------------------------------------- 7942 5695 +" s:NetrwBookHistHandler: {{{2 … … 7952 5705 + if !exists("g:netrw_dirhistmax") || g:netrw_dirhistmax <= 0 7953 5706 +" " 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") 7954 5762 return 7955 5763 endif 7956 5764 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("%")} != "" 7972 5844 -" call Decho("(NetrwBrowse) bufnr(%)=".bufnr('%')) 7973 5845 -" 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 7976 5850 -" 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:") 7981 5856 -" call Decho("(NetrwBrowse) setl noma nomod nowrap") 7982 - setl noma nomod nowrap 5857 +" call Decho("setl noma nomod nowrap") 5858 setl noma nomod nowrap 7983 5859 -" 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 8002 5866 -" 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 8027 5882 -" 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 8033 5889 -" 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 8040 5897 -" call Decho("(NetrwBrowse) handle g:netrw_keepdir=".g:netrw_keepdir.": getcwd<".getcwd()."> acd=".&acd) 8041 5898 -" 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 8043 5902 -" call Decho('exe keepjumps lcd '.fnameescape(b:netrw_curdir)) 8044 5903 - try … … 8058 5917 - endif 8059 5918 - 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 8075 5921 endif 8076 5922 8077 - " -------------------------------- 8078 -" remote handling: {{{38079 -" --------------------------------8080 -else5923 @@ -3683,23 +3609,23 @@ 5924 " remote handling: {{{3 5925 " -------------------------------- 5926 else 8081 5927 -" 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 8084 5931 -" 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 8087 5935 -" 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 8094 5943 -" 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.">") 8114 5945 else 8115 -let dirname = substitute(dirname,'\\','/','g')5946 let dirname = substitute(dirname,'\\','/','g') 8116 5947 -" 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.">") 8121 5949 endif 8122 5950 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) 8134 5954 endif 8135 -keepj call s:NetrwOptionRestore("w:")5955 keepj call s:NetrwOptionRestore("w:") 8136 5956 -" call Decho("(NetrwBrowse) setl noma nomod nowrap") 8137 - setl noma nomod nowrap 5957 +" call Decho("setl noma nomod nowrap") 5958 setl noma nomod nowrap 8138 5959 -" 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 8142 5963 endif 8143 -let b:netrw_curdir= dirname5964 let b:netrw_curdir= dirname 8144 5965 -" 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") 8153 5976 - let &l:bexpr= "netrw#NetrwBalloonHelp()" 8154 5977 -" call Decho("(NetrwBrowse) set up balloon help: l:bexpr=".&l:bexpr) 8155 5978 - 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 8159 5985 - " 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). 8161 5988 - " However, s:NetrwBrowse() causes the ShellCmdPost event itself to fire once; setting 8162 5989 - " the variable below avoids that second refresh of the screen. The s:LocalBrowseShellCmdRefresh() … … 8164 5991 - " and skips the refresh and sets s:locbrowseshellcmd to zero. Oct 13, 2008 8165 5992 - let s:locbrowseshellcmd= 1 8166 - 5993 + " However, s:NetrwBrowse() causes the FocusGained event to fire the firstt time. 5994 8167 5995 -" 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) 8175 6004 -" 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") 8179 6009 - if exists("b:netrw_curdir") 8180 6010 -" 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).")") 8196 6034 endif 8197 6035 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)) 8225 6041 -" 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) 8240 6050 -" 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 8244 6055 -" 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 8247 6059 -" 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 8249 6062 -" call Decho("(NetrwGetBuffer) re-using w:netrw_treebufnr=".w:netrw_treebufnr) 8250 6063 - setl mod 8251 6064 - sil! keepj %d 8252 - let eikeep= &ei 6065 +" call Decho(" re-using w:netrw_treebufnr=".w:netrw_treebufnr) 6066 let eikeep= &ei 8253 6067 - set ei=all 8254 6068 - 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 8260 6079 -" 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 8264 6084 -" 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,'\')) 8268 6090 -" call Decho("(NetrwGetBuffer) find buffer<".dirname.">'s number ") 8269 6091 -" 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 / 8273 6097 -" 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 / 8282 6106 -" 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,'/$','','') 8287 6111 endif 8288 + echo "Sorry, no predecessor directory exists yet"8289 6112 endif 8290 6113 8291 6114 -" 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 8295 6119 -" 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("$") 8298 6123 -" 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/$','','') 8302 6128 -" 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 8307 6134 -" 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 8337 6137 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 8345 6143 -" 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 8350 6149 -" 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) 8353 6153 -" 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) 8355 6156 -" 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 8359 6161 -" 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 8364 6165 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 8371 6167 endif 8372 -let w:netrw_treebufnr= bufnr("%")6168 let w:netrw_treebufnr= bufnr("%") 8373 6169 -" 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) 8375 6172 - 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> 8380 6178 -" call Decho("(NetrwGetBuffer) tree listing#".s:netrw_treelistnum." bufnr=".w:netrw_treebufnr) 6179 +" call Decho(" tree listing#".s:netrw_treelistnum." bufnr=".w:netrw_treebufnr) 8381 6180 else 8382 -" let v:errmsg= "" " Decho8383 -let escdirname= fnameescape(dirname)6181 " let v:errmsg= "" " Decho 6182 let escdirname= fnameescape(dirname) 8384 6183 -" 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 8388 6188 -" 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)).">") 8391 6190 endif 8392 6191 -" 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 8395 6195 -" 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 8397 6198 - set ei=all 8398 - if getline(2) =~ '^" Netrw Directory Listing' 6199 + setl ei=all 6200 if getline(2) =~ '^" Netrw Directory Listing' 8399 6201 -" call Decho("(NetrwGetBuffer) getline(2)<".getline(2).'> matches "Netrw Directory Listing" : using keepalt b '.bufnum) 8400 6202 - 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 8402 6206 -" call Decho("(NetrwGetBuffer) getline(2)<".getline(2).'> does not match "Netrw Directory Listing" : using b '.bufnum) 8403 6207 - 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("%") == '.' 8406 6212 -" 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 8420 6229 -" call Decho("(NetrwGetBuffer) --re-use tree listing--") 8421 6230 -" 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 8438 6242 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 8449 6247 -" 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) 8452 6251 -" 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 8456 6256 -" call Decho("(NetrwGetBuffer) --delete all lines from buffer--") 8457 6257 -" 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 8460 6262 -" 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 8466 6266 endfun 8467 6267 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") 8618 6272 - 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("%") 8711 6283 -" call Decho("(NetrwListSettings) setl bt=nofile nobl ma nonu nowrap noro") 8712 6284 - 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 8729 6291 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 8820 6299 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" 8828 6320 -" call Decho("(NetrwListStyle) setl nomod") 8829 - setl nomod 6321 +" call Decho("setl nomod") 6322 setl nomod 8830 6323 -" 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 8833 6327 -" call Decho("(NetrwListStyle) refresh the listing") 8834 6328 - 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,'./')) 8836 6331 - 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() 8840 6333 8841 6334 - " keep cursor on the filename … … 8846 6339 - exe "sil! keepj ".w:netrw_bannercnt 8847 6340 - 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 8869 6350 - 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 8948 6359 - let ebmd= escape(bmd,g:netrw_menu_escape) 8949 6360 -" 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 8957 6365 - 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 8962 6369 - 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 9066 6380 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 called9069 -" and the current window is the NetrwMessage window.9070 -let @@= ykeep6381 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 9071 6385 -" call Decho("(NetrwBrowseChgDir) b:netrw_curdir doesn't exist!") 9072 6386 -" call Decho("(NetrwBrowseChgDir) getcwd<".getcwd().">") 9073 -" call Dret("s:NetrwBrowseChgDir")9074 - return9075 - endif9076 + if a:islocal9077 + if (has("unix") || has("macunix")) && executable("/bin/ls")9078 9079 - " NetrwBrowseChgDir: save options and initialize {{{39080 - keepj call s:NetrwOptionSave("s:")9081 - keepj call s:NetrwSafeOptions()9082 - let nbcd_curpos = netrw#NetrwSavePosn()9083 - let s:nbcd_curpos_{bufnr('%')} = nbcd_curpos9084 -" 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 - else9088 - let dirname= b:netrw_curdir9089 - endif9090 - let newdir = a:newdir9091 - let dolockout = 09092 + 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:treedepthstring9097 + 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 pattern9101 - 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 + else9109 + 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 + endif9112 +9113 + else9114 +" 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 + endif9118 + else9119 + " use vim functions to return information about file below cursor9120 +" 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 + else9124 + let fname= a:fname9125 + endif9126 + 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 + endif9131 else9132 - let dirpat= '[\/]$'9133 + echo "sorry, \"qf\" not supported yet for remote files"9134 endif9135 -" call Decho("(NetrwBrowseChgDir) dirname<".dirname."> dirpat<".dirpat.">")9136 + let @@= ykeep9137 +" call Dret("s:NetrwFileInfo")9138 +endfun9139 9140 - if dirname !~ dirpat9141 - " apparently vim is "recognizing" that it is in a directory and9142 - " is removing the trailing "/". Bad idea, so let's put it back.9143 - let dirname= dirname.'/'9144 -" call Decho("(NetrwBrowseChgDir) adjusting dirname<".dirname.">")9145 - endif9146 +" ---------------------------------------------------------------------9147 +" s:NetrwGetBuffer: {{{29148 +" returns 0=cleared buffer9149 +" 1=re-used buffer9150 +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:dirname9154 9155 - if newdir !~ dirpat9156 - " ------------------------------9157 - " NetrwBrowseChgDir: edit a file {{{39158 - " ------------------------------9159 -" call Decho('(NetrwBrowseChgDir:edit-a-file) case "handling a file": newdir<'.newdir.'> !~ dirpat<'.dirpat.">")9160 + " re-use buffer if possible {{{39161 +" call Decho("--re-use a buffer if possible--")9162 + if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST9163 + " find NetrwTreeList buffer if there is one9164 +" call Decho("case liststyle=treelist: find NetrwTreeList buffer if there is one")9165 + if exists("w:netrw_treebufnr") && w:netrw_treebufnr > 09166 +" call Decho(" re-using w:netrw_treebufnr=".w:netrw_treebufnr)9167 + let eikeep= &ei9168 + setl ei=all9169 + exe "sil! keepalt b ".w:netrw_treebufnr9170 + let &ei= eikeep9171 + setl ma9172 + sil! keepj %d9173 +" 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 09176 + endif9177 + let bufnum= -19178 +" call Decho(" liststyle=TREE but w:netrw_treebufnr doesn't exist")9179 9180 - " save position for benefit of Rexplore9181 - let s:rexposn_{bufnr("%")}= netrw#NetrwSavePosn()9182 + else9183 + " find buffer number of buffer named precisely the same as dirname {{{39184 +" 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.newdir9192 - else9193 - let dirname= s:NetrwTreeDir()."/".newdir9194 + " get dirname and associated buffer number9195 + 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 > 09204 + let dirname= dirname.'/'9205 endif9206 -" call Decho("(NetrwBrowseChgDir:edit-a-file) dirname<".dirname.">")9207 -" call Decho("(NetrwBrowseChgDir:edit-a-file) tree listing")9208 - elseif newdir =~ '^\(/\|\a:\)'9209 - let dirname= newdir9210 - else9211 - let dirname= s:ComposePath(dirname,newdir)9212 endif9213 -" call Decho("(NetrwBrowseChgDir:edit-a-file) handling a file: dirname<".dirname."> (a:0=".a:0.")")9214 - " this lets NetrwBrowseX avoid the edit9215 - if a:0 < 19216 -" 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 == 19221 - " horizontally splitting the window first9222 - keepalt new9223 - if !&ea9224 - keepalt wincmd _9225 - endif9226 - elseif g:netrw_browse_split == 29227 - " vertically splitting the window first9228 - keepalt rightb vert new9229 - if !&ea9230 - keepalt wincmd |9231 - endif9232 - elseif g:netrw_browse_split == 39233 - " open file in new tab9234 - keepalt tabnew9235 - elseif g:netrw_browse_split == 49236 - " act like "P" (ie. open previous window)9237 - if s:NetrwPrevWinOpen(2) == 39238 - let @@= ykeep9239 -" call Dret("s:NetrwBrowseChgDir")9240 - return9241 - endif9242 - else9243 - " handling a file, didn't split, so remove menu9244 -" call Decho("(NetrwBrowseChgDir:edit-a-file) handling a file+didn't split, so remove menu")9245 - call s:NetrwMenu(0)9246 - " optional change to window9247 - if g:netrw_chgwin >= 19248 - exe "keepj keepalt ".g:netrw_chgwin."wincmd w"9249 - endif9250 - endif9251 - endif9252 9253 - " the point where netrw actually edits the (local) file9254 - " if its local only: LocalBrowseCheck() doesn't edit a file, but NetrwBrowse() will9255 - if a:islocal9256 -" 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 - else9260 -" 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 > 09266 + let dirname= substitute(dirname,'/$','','')9267 endif9268 - let dolockout= 19269 + endif9270 9271 - " handle g:Netrw_funcref -- call external-to-netrw functions9272 - " This code will handle g:Netrw_funcref as an individual function reference9273 - " or as a list of function references. It will ignore anything that's not9274 - " 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) == 29278 -" call Decho("(NetrwBrowseChgDir:edit-a-file) handling a g:Netrw_funcref")9279 - keepj call g:Netrw_funcref()9280 - elseif type(g:Netrw_funcref) == 39281 -" call Decho("(NetrwBrowseChgDir:edit-a-file) handling a list of g:Netrw_funcrefs")9282 - for Fncref in g:Netrw_funcref9283 - if type(FncRef) == 29284 - keepj call FncRef()9285 - endif9286 - endfor9287 +" 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 matches9291 +" call Decho(" handling approx match: bufnum#".bufnum.">0 AND bufname<".bufname(bufnum).">!=dirname<".dirname."> AND bufname(".bufnum.")!='.'")9292 + let ibuf = 19293 + let buflast = bufnr("$")9294 +" call Decho(" findbuf2: buflast=bufnr($)=".buflast)9295 + while ibuf <= buflast9296 + 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 empty9301 + " dirname ends with bname,9302 + " dirname doesn't start with /, so its not a absolute path9303 +" call Decho(" findbuf3a: passes test 1 : dirname<".dirname.'> =~ /'.bname.'/\=$ && dirname !~ ^/')9304 + break9305 + endif9306 + if bname =~ '^'.dirname.'/\=$'9307 + " bname begins with dirname9308 +" call Decho(' findbuf3b: passes test 2 : bname<'.bname.'>=~^'.dirname.'/\=$')9309 + break9310 + endif9311 + if dirname =~ '^'.bname.'/$'9312 +" call Decho(' findbuf3c: passes test 3 : dirname<'.dirname.'>=~^'.bname.'/$')9313 + break9314 + endif9315 + if bname != '' && dirname =~ '/'.bname.'$' && bname == bufname("%") && line("$") == 19316 +" call Decho(' findbuf3d: passes test 4 : dirname<'.dirname.'>=~ /'.bname.'$')9317 + break9318 endif9319 + let ibuf= ibuf + 19320 + endwhile9321 + if ibuf > buflast9322 + let bufnum= -19323 + else9324 + let bufnum= ibuf9325 endif9326 +" call Decho(" findbuf4: bufnum=".bufnum." (ibuf=".ibuf." buflast=".buflast.")")9327 endif9328 + endif9329 9330 - elseif newdir =~ '^/'9331 - " ----------------------------------------------------9332 - " NetrwBrowseChgDir: just go to the new directory spec {{{39333 - " ----------------------------------------------------9334 -" call Decho('(NetrwBrowseChgDir:goto-newdir) case "just go to new directory spec": newdir<'.newdir.'>')9335 - let dirname = newdir9336 - keepj call s:SetRexDir(a:islocal,dirname)9337 - keepj call s:NetrwOptionRestore("s:")9338 -9339 - elseif newdir == './'9340 - " ---------------------------------------------9341 - " NetrwBrowseChgDir: refresh the directory list {{{39342 - " ---------------------------------------------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 {{{39349 - " --------------------------------------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 refresh9354 -" call Decho("(NetrwBrowseChgDir:go-up) clear buffer<".expand("%")."> with :%d")9355 -" call Decho("(NetrwBrowseChgDir:go-up) setl noro ma")9356 - setl noro ma9357 - keepj %d9358 - endif9359 -9360 - if has("amiga")9361 - " amiga9362 -" call Decho('(NetrwBrowseChgDir:go-up) case "go up one directory": newdir == "../" and amiga')9363 - if a:islocal9364 - let dirname= substitute(dirname,'^\(.*[/:]\)\([^/]\+$\)','\1','')9365 - let dirname= substitute(dirname,'/$','','')9366 + " get enew buffer and name it -or- re-use buffer {{{39367 +" 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 buffer9374 + if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST9375 + " Got enew buffer; transform into a NetrwTreeListing9376 +" call Decho("--transform enew buffer#".bufnr("%")." into a NetrwTreeListing --")9377 + if !exists("s:netrw_treelistnum")9378 + let s:netrw_treelistnum= 19379 else9380 - let dirname= substitute(dirname,'^\(.*[/:]\)\([^/]\+/$\)','\1','')9381 + let s:netrw_treelistnum= s:netrw_treelistnum + 19382 endif9383 -" 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 noswf9389 + 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 else9395 - " unix or cygwin9396 -" call Decho('(NetrwBrowseChgDir:go-up) case "go up one directory": newdir == "../" and unix or cygwin')9397 - if a:islocal9398 - let dirname= substitute(dirname,'^\(.*\)/\([^/]\+\)/$','\1','')9399 - if dirname == ""9400 - let dirname= '/'9401 - endif9402 - else9403 - let dirname= substitute(dirname,'^\(\a\+://.\{-}/\{1,2}\)\(.\{-}\)\([^/]\+\)/$','\1\2','')9404 - endif9405 -" call Decho("(NetrwBrowseChgDir:go-up) unix: dirname<".dirname."> (go up one dir)")9406 - endif9407 - 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 {{{39412 - " --------------------------------------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 ma9417 - 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 %d9420 +" let v:errmsg= "" " Decho9421 + 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= "" " Decho9425 + exe 'sil! keepalt file '.escdirname9426 +" call Decho(" errmsg<".v:errmsg."> bufnr(".escdirname.")=".bufnr(escdirname)."<".bufname(bufnr(escdirname)).">")9427 endif9428 - let treedir = s:NetrwTreeDir()9429 - let s:treecurpos = nbcd_curpos9430 - let haskey= 09431 -" 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-is9435 - if has_key(w:netrw_treedict,treedir)9436 -" call Decho('(NetrwBrowseChgDir:tree-list) ....searched for treedir<'.treedir.'> : found it!')9437 - let haskey= 19438 + else " Re-use the buffer9439 +" call Decho("--re-use buffer#".bufnum." (bufnum#".bufnum.">=0 AND bufexists(".bufnum.")=".bufexists(bufnum)."!=0)")9440 + let eikeep= &ei9441 + setl ei=all9442 + 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 ".bufnum9445 else9446 -" call Decho('(NetrwBrowseChgDir:tree-list) ....searched for treedir<'.treedir.'> : not found')9447 - endif9448 -9449 - " search treedict for treedir with a / appended9450 - 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 = 19455 - else9456 -" call Decho('(NetrwBrowseChgDir:tree-list) ....searched for treedir<'.treedir.'/> : not found')9457 - endif9458 +" call Decho(" getline(2)<".getline(2).'> does not match "Netrw Directory Listing" : using b '.bufnum)9459 + exe "sil! keepalt b ".bufnum9460 endif9461 -9462 - " search treedict for treedir with any trailing / elided9463 - 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 = 19468 - else9469 -" call Decho('(NetrwBrowseChgDir:tree-list) ....searched for treedir<'.treedir.'> : not found')9470 - endif9471 + if bufname("%") == '.'9472 +" call Decho("exe sil! keepalt file ".fnameescape(getcwd()))9473 + exe "sil! keepalt file ".fnameescape(getcwd())9474 endif9475 -9476 - if haskey9477 - " close tree listing for selected subdirectory9478 -" 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_treetop9483 + let &ei= eikeep9484 + if line("$") <= 19485 + 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 09489 + elseif g:netrw_fastbrowse == 0 || (a:islocal && g:netrw_fastbrowse == 1)9490 + keepj call s:NetrwListSettings(a:islocal)9491 + sil keepj %d9492 +" 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 09495 + elseif exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST9496 +" call Decho("--re-use tree listing--")9497 +" call Decho(" clear buffer<".expand("%")."> with :%d")9498 + sil keepj %d9499 + 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 09503 else9504 - " go down one directory9505 - 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 19510 endif9511 - keepj call s:SetRexDir(a:islocal,dirname)9512 - let s:treeforceredraw = 19513 -9514 - else9515 - " ----------------------------------------9516 - " NetrwBrowseChgDir: Go down one directory {{{39517 - " ----------------------------------------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 endif9522 9523 - " --------------------------------------9524 - " NetrwBrowseChgDir: Restore and Cleanup {{{39525 - " --------------------------------------9526 - keepj call s:NetrwOptionRestore("s:")9527 - if dolockout9528 -" 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 noro9533 -" call Decho("(NetrwBrowseChgDir:restore) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")9534 - else9535 -" call Decho("(NetrwBrowseChgDir:restore) doing modification lockout settings: ma nomod ro")9536 -" call Decho("(NetrwBrowseChgDir:restore) setl ma nomod noro")9537 - setl ma nomod ro9538 -" call Decho("(NetrwBrowseChgDir:restore) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")9539 - endif9540 - endif9541 - let @@= ykeep9542 + " do netrw settings: make this buffer not-a-file, modifiable, not line-numbered, etc {{{39543 + " 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 H9546 + " fast 2 H H9547 +" 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 dirname9555 + " delete all lines from buffer {{{39556 +" call Decho("--delete all lines from buffer--")9557 +" call Decho(" clear buffer<".expand("%")."> with :%d")9558 + sil! keepalt keepj %d9559 +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 09563 endfun9564 9565 " ---------------------------------------------------------------------9566 -" s:NetrwBrowseX: (implements "x") executes a special "viewer" script or program for the {{{29567 -" given filename; typically this means given their extension.9568 -" 0=local, 1=remote9569 -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 handler9576 - if a:fname =~ '/core\(\.\d\+\)\=$'9577 - if exists("g:Netrw_corehandler")9578 - if type(g:Netrw_corehandler) == 29579 - " 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) == 39583 - " 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_corehandler9586 - if type(FncRef) == 29587 - call FncRef(a:fname)9588 - endif9589 - endfor9590 - endif9591 - call netrw#NetrwRestorePosn(screenposn)9592 - let @@= ykeep9593 -" call Dret("NetrwBrowseX : coredump handler invoked")9594 - return9595 - endif9596 +" s:NetrwGetcwd: get the current directory. {{{29597 +" Change backslashes to forward slashes, if any.9598 +" If doesc is true, escape certain troublesome characters9599 +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 endif9605 -9606 - " set up the filename9607 - " (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:doesc9612 + let curdir= fnameescape(curdir)9613 endif9614 -" call Decho("exten<".exten.">")9615 +" call Dret("NetrwGetcwd <".curdir.">")9616 + return curdir9617 +endfun9618 9619 - " seems kde systems often have gnome-open due to dependencies, even though9620 - " gnome-open's subsidiary display tools are largely absent. Kde systems9621 - " 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_error9626 - let s:haskdeinit = 09627 - endif9628 - else9629 - let s:haskdeinit= 09630 - endif9631 -" call Decho("setting s:haskdeinit=".s:haskdeinit)9632 - endif9633 +" ---------------------------------------------------------------------9634 +" s:NetrwGetWord: it gets the directory/file named under the cursor {{{29635 +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 == 19640 - " create a local copy9641 -" call Decho("(remote) a:remote=".a:remote.": create a local copy of <".a:fname.">")9642 - setl bh=delete9643 - call netrw#NetRead(3,a:fname)9644 - " attempt to rename tempfile9645 - 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) == 09650 - " renaming succeeded9651 - let fname= newname9652 + " insure that w:netrw_liststyle is set up9653 + if !exists("w:netrw_liststyle")9654 + if exists("g:netrw_liststyle")9655 + let w:netrw_liststyle= g:netrw_liststyle9656 else9657 - " renaming failed9658 - let fname= s:netrw_tmpfile9659 - endif9660 - else9661 -" call Decho("(local) a:remote=".a:remote.": handling local copy of <".a:fname.">")9662 - let fname= a:fname9663 - " special ~ handler for local9664 - if fname =~ '^\~' && expand("$HOME") != ""9665 -" call Decho('invoking special ~ handler')9666 - let fname= substitute(fname,'^\~',expand("$HOME"),'')9667 + let w:netrw_liststyle= s:THINLIST9668 endif9669 +" call Decho("w:netrw_liststyle=".w:netrw_liststyle)9670 endif9671 -" call Decho("fname<".fname.">")9672 -" call Decho("exten<".exten."> "."netrwFileHandlers#NFH_".exten."():exists=".exists("*netrwFileHandlers#NFH_".exten))9673 9674 - " set up redirection9675 - if &srr =~ "%s"9676 - if (has("win32") || has("win95") || has("win64") || has("win16"))9677 - let redir= substitute(&srr,"%s","nul","")9678 - else9679 - let redir= substitute(&srr,"%s","/dev/null","")9680 - endif9681 - elseif (has("win32") || has("win95") || has("win64") || has("win16"))9682 - let redir= &srr . "nul"9683 - else9684 - let redir= &srr . "/dev/null"9685 - endif9686 -" call Decho("set up redirection: redir{".redir."} srr{".&srr."}")9687 + if exists("w:netrw_bannercnt") && line(".") < w:netrw_bannercnt9688 + " Active Banner support9689 +" call Decho("active banner handling")9690 + keepj norm! 09691 + 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 = 19703 - while !executable(viewer) && viewer != oviewer9704 - 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 + 19707 - let oviewer = viewer9708 -" call Decho("!exe: viewer<".viewer."> viewopt<".viewopt.">")9709 - endwhile9710 - else9711 - let viewer = g:netrw_browsex_viewer9712 - let viewopt = ""9713 - endif9714 -" call Decho("viewer<".viewer."> viewopt<".viewopt.">")9715 - endif9716 + if curline =~ '"\s*Sorted by\s'9717 + keepj norm s9718 + let s:netrw_skipbrowse= 19719 + echo 'Pressing "s" also works'9720 9721 - " execute the file handler9722 -" 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= 19728 + 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).redir9734 - let ret= v:shell_error9735 + elseif curline =~ '"\s*Quick Help:'9736 + keepj norm ?9737 + let s:netrw_skipbrowse= 19738 + 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 - else9749 - call netrw#ErrorMsg(s:WARNING,"rundll32 not on path",74)9750 - endif9751 - call inputsave()|call input("Press <cr> to continue")|call inputrestore()9752 - let ret= v:shell_error9753 + elseif curline =~ '"\s*\%(Hiding\|Showing\):'9754 + keepj norm a9755 + let s:netrw_skipbrowse= 19756 + 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 - else9768 - call netrw#ErrorMsg(s:WARNING,"rundll32 not on path",74)9769 + elseif line("$") > w:netrw_bannercnt9770 + exe 'sil keepj '.w:netrw_bannercnt9771 endif9772 - call inputsave()|call input("Press <cr> to continue")|call inputrestore()9773 - let ret= v:shell_error9774 9775 - elseif has("unix") && executable("xdg-open") && !s:haskdeinit9776 -" 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).redir9779 - let ret= v:shell_error9780 + elseif w:netrw_liststyle == s:THINLIST9781 +" call Decho("thin column handling")9782 + keepj norm! 09783 + let dirname= getline('.')9784 9785 - elseif has("unix") && executable("kfmclient") && s:haskdeinit9786 -" call Decho("unix and kfmclient")9787 -" call Decho("exe sil !kfmclient exec ".shellescape(fname,1)." ".redir)9788 - exe "sil !kfmclient exec ".shellescape(fname,1)." ".redir9789 - let ret= v:shell_error9790 + elseif w:netrw_liststyle == s:LONGLIST9791 +" call Decho("long column handling")9792 + keepj norm! 09793 + 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)." ".redir9799 - let ret= v:shell_error9800 + elseif w:netrw_liststyle == s:TREELIST9801 +" call Decho("treelist handling")9802 + let dirname= substitute(getline('.'),'^\('.s:treedepthstring.'\)*','','e')9803 9804 else9805 - " netrwFileHandlers#Invoke() always returns 09806 - let ret= netrwFileHandlers#Invoke(exten,fname)9807 - endif9808 +" call Decho("obtain word from wide listing")9809 + let dirname= getline('.')9810 9811 - " if unsuccessful, attempt netrwFileHandlers#Invoke()9812 - if ret9813 - let ret= netrwFileHandlers#Invoke(exten,fname)9814 + if !exists("b:netrw_cpf")9815 + let b:netrw_cpf= 09816 + 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 + endif9820 +9821 +" call Decho("buf#".bufnr("%")."<".bufname("%").">")9822 + let filestart = (virtcol(".")/b:netrw_cpf)*b:netrw_cpf9823 +" 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 == 09826 + keepj norm! 0ma9827 + else9828 + call cursor(line("."),filestart+1)9829 + keepj norm! ma9830 + endif9831 + let rega= @a9832 + let eofname= filestart + b:netrw_cpf + 19833 + if eofname <= col("$")9834 + call cursor(line("."),filestart+b:netrw_cpf+1)9835 + keepj norm! "ay`a9836 + else9837 + keepj norm! "ay$9838 + endif9839 + let dirname = @a9840 + let @a = rega9841 +" call Decho("2: dirname<".dirname.">")9842 + let dirname= substitute(dirname,'\s\+$','','e')9843 +" call Decho("3: dirname<".dirname.">")9844 endif9845 9846 - " restoring redraw! after external file handlers9847 - 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 of9855 - " temporary file because it wasn't getting seen.9856 -" if a:remote == 1 && fname != a:fname9857 -"" call Decho("deleting temporary file<".fname.">")9858 -" call s:NetrwDelete(fname)9859 -" endif9860 -9861 - if a:remote == 19862 - setl bh=delete bt=nofile9863 - if g:netrw_use_noswf9864 - setl noswf9865 - endif9866 - exe "sil! keepj norm! \<c-o>"9867 -" redraw!9868 - endif9869 - call netrw#NetrwRestorePosn(screenposn)9870 - let @@= ykeep9871 + " 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 dirname9877 endfun9878 9879 " ---------------------------------------------------------------------9880 -" s:NetrwChgPerm: (implements "gp") change file permission {{{29881 -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 != 09892 - 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 {{{29894 +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 noro9900 +" call Decho("(NetrwListSettings) exe sil! keepalt file ".fnameescape(fname))9901 + exe "sil! keepalt file ".fnameescape(fname)9902 + if g:netrw_use_noswf9903 + setl noswf9904 endif9905 - if a:islocal9906 - 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:islocal9912 + setl bh=hide9913 + else9914 + setl bh=delete9915 endif9916 - let @@= ykeep9917 -" 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 endfun9921 9922 " ---------------------------------------------------------------------9923 -" s:NetrwClearExplore: clear explore variables (if any) {{{29924 -fun! s:NetrwClearExplore()9925 -" call Dfunc("s:NetrwClearExplore()")9926 - 2match none9927 - if exists("s:explore_match") |unlet s:explore_match |endif9928 - if exists("s:explore_indx") |unlet s:explore_indx |endif9929 - if exists("s:netrw_explore_prvdir") |unlet s:netrw_explore_prvdir |endif9930 - if exists("s:dirstarstar") |unlet s:dirstarstar |endif9931 - if exists("s:explore_prvdir") |unlet s:explore_prvdir |endif9932 - if exists("w:netrw_explore_indx") |unlet w:netrw_explore_indx |endif9933 - if exists("w:netrw_explore_listlen")|unlet w:netrw_explore_listlen|endif9934 - if exists("w:netrw_explore_list") |unlet w:netrw_explore_list |endif9935 - if exists("w:netrw_explore_bufnr") |unlet w:netrw_explore_bufnr |endif9936 -" redraw!9937 - echo " "9938 - echo " "9939 -" call Dret("s:NetrwClearExplore")9940 -endfun9941 +" s:NetrwListStyle: {{{29942 +" islocal=0: remote browsing9943 +" =1: local browsing9944 +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|endif9949 + let w:netrw_liststyle = (w:netrw_liststyle + 1) % s:MAXLIST9950 +" 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: {{{29956 -fun! s:NetrwExploreListUniq(explist)9957 -" call Dfunc("s:NetrwExploreListUniq(explist<".string(a:explist).">)")9958 + if w:netrw_liststyle == s:THINLIST9959 + " use one column listing9960 +" 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 sorted9964 - let newexplist= []9965 - for member in a:explist9966 - if !exists("uniqmember") || member != uniqmember9967 - let uniqmember = member9968 - let newexplist = newexplist + [ member ]9969 - endif9970 - endfor9971 + elseif w:netrw_liststyle == s:LONGLIST9972 + " use long list9973 +" 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 newexplist9978 -endfun9979 + elseif w:netrw_liststyle == s:WIDELIST9980 + " give wide list9981 +" 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 {{{29986 -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 treatment9991 - if a:newdir =~ '@$'9992 - let newdir= substitute(a:newdir,'@$','/','')9993 - elseif a:newdir =~ '[*=|\\]$'9994 - let newdir= substitute(a:newdir,'.$','/','')9995 - else9996 - let newdir= a:newdir.'/'9997 - endif9998 -" call Decho("adjusting newdir<".newdir."> due to gd")9999 - else10000 - " should already be getting treatment as a directory10001 - let newdir= a:newdir10002 - endif10003 - let newdir= s:NetrwBrowseChgDir(a:islocal,newdir)10004 - call s:NetrwBrowse(a:islocal,newdir)10005 - let @@= ykeep10006 -" call Dret("s:NetrwForceChgDir")10007 -endfun10008 + elseif w:netrw_liststyle == s:TREELIST10009 +" 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 {{{210014 -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 else10019 - let newfile= a:newfile10020 + keepj call netrw#ErrorMsg(s:WARNING,"bad value for g:netrw_liststyle (=".w:netrw_liststyle.")",46)10021 + let g:netrw_liststyle = s:THINLIST10022 + let w:netrw_liststyle = g:netrw_liststyle10023 + let g:netrw_list_cmd = substitute(g:netrw_list_cmd,' -l','','ge')10024 endif10025 - if a:islocal10026 - call s:NetrwBrowseChgDir(a:islocal,newfile)10027 - else10028 - call s:NetrwBrowse(a:islocal,s:NetrwBrowseChgDir(a:islocal,newfile))10029 + setl ma noro10030 +" call Decho("setl ma noro")10031 +10032 + " clear buffer - this will cause NetrwBrowse/LocalBrowseCheck to do a refresh10033 +" call Decho("clear buffer<".expand("%")."> with :%d")10034 + sil! keepj %d10035 + " following prevents tree listing buffer from being marked "modified"10036 +" call Decho("setl nomod")10037 + setl nomod10038 +" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")10039 +10040 + " refresh the listing10041 +" 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 filename10048 + 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_bannercnt10053 endif10054 -" call Dret("s:NetrwForceFile")10055 + let @@= ykeep10056 +10057 +" call Dret("NetrwListStyle".(exists("w:netrw_liststyle")? ' : w:netrw_liststyle='.w:netrw_liststyle : ""))10058 endfun10059 10060 " ---------------------------------------------------------------------10061 -" s:NetrwHide: this function is invoked by the "a" map for browsing {{{210062 -" and switches the hiding mode. The actual hiding is done by10063 -" s:NetrwListHide().10064 -" g:netrw_hide= 0: show all10065 -" 1: show not-hidden files10066 -" 2: show hidden files only10067 -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 {{{210076 +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 list10080 - 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.'\>') != -110083 - " remove fname from hiding list10084 - 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 - else10089 - " append fname to hiding list10090 - 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 - else10093 - let g:netrw_list_hide= '\<'.escape(fname,g:netrw_fname_escape).'\>'10094 - endif10095 -" call Decho("hide: g:netrw_list_hide<".g:netrw_list_hide.">")10096 - endif10097 - endfor10098 - keepj call s:NetrwUnmarkList(bufnr("%"),b:netrw_curdir)10099 - let g:netrw_hide= 110100 + let ykeep= @@10101 + " toggle the banner (enable/suppress)10102 + let g:netrw_banner= !g:netrw_banner10103 10104 - else10105 + " refresh the listing10106 + let svpos= netrw#SavePosn()10107 + call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))10108 10109 - " switch between show-all/show-not-hidden/show-hidden10110 - let g:netrw_hide=(g:netrw_hide+1)%310111 - 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 @@= ykeep10115 -" call Dret("NetrwHide")10116 - return10117 - endif10118 + " keep cursor on the filename10119 + 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_bannercnt10125 endif10126 -10127 - keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))10128 - keepj call netrw#NetrwRestorePosn(svpos)10129 let @@= ykeep10130 -" call Dret("NetrwHide")10131 +" call Dret("s:NetrwBannerCtrl : g:netrw_banner=".g:netrw_banner)10132 endfun10133 10134 " ---------------------------------------------------------------------10135 -" s:NetrwHidden: invoked by "gh" {{{210136 -fun! s:NetrwHidden(islocal)10137 -" call Dfunc("s:NetrwHidden()")10138 - let ykeep= @@10139 - " save current position10140 - let svpos= netrw#NetrwSavePosn()10141 +" s:NetrwBookmarkMenu: Uses menu priorities {{{210142 +" .2.[cnt] for bookmarks, and10143 +" .3.[cnt] for history10144 +" (see s:NetrwMenu())10145 +fun! s:NetrwBookmarkMenu()10146 + if !exists("s:netrw_menucnt")10147 + return10148 + endif10149 +" 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 list10153 - let g:netrw_list_hide= substitute(g:netrw_list_hide,'\(^\|,\)\\(^\\|\\s\\s\\)\\zs\\.\\S\\+','','')10154 - elseif s:Strlen(g:netrw_list_hide) >= 110155 - let g:netrw_list_hide= g:netrw_list_hide . ',\(^\|\s\s\)\zs\.\S\+'10156 - else10157 - let g:netrw_list_hide= '\(^\|\s\s\)\zs\.\S\+'10158 - endif10159 + " 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_menu10161 + 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 + endif10166 + if !exists("s:netrw_initbookhist")10167 + call s:NetrwBookHistRead()10168 + endif10169 10170 - " refresh screen and return to saved position10171 - keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))10172 - keepj call netrw#NetrwRestorePosn(svpos)10173 - let @@= ykeep10174 -" call Dret("s:NetrwHidden")10175 -endfun10176 + " show bookmarked places10177 + if exists("g:netrw_bookmarklist") && g:netrw_bookmarklist != [] && g:netrw_dirhistmax > 010178 + let cnt= 110179 + for bmd in g:netrw_bookmarklist10180 +" 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 menu10184 + exe 'sil! menu '.g:NetrwMenuPriority.".2.".cnt." ".g:NetrwTopLvlMenu.'Bookmarks.'.bmd.' :e '.bmd."\<cr>"10185 +10186 + " show bookmarks for deletion menu10187 + exe 'sil! menu '.g:NetrwMenuPriority.".8.2.".cnt." ".g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Bookmark\ Delete.'.bmd.' '.cnt."mB"10188 + let cnt= cnt + 110189 + endfor10190 10191 -" ---------------------------------------------------------------------10192 -" s:NetrwHome: this function determines a "home" for saving bookmarks and history {{{210193 -fun! s:NetrwHome()10194 - if exists("g:netrw_home")10195 - let home= g:netrw_home10196 - else10197 - " go to vim plugin home10198 - for home in split(&rtp,',') + ['']10199 - if isdirectory(home) && filewritable(home) | break | endif10200 - let basehome= substitute(home,'[/\\]\.vim$','','')10201 - if isdirectory(basehome) && filewritable(basehome)10202 - let home= basehome."/.vim"10203 - break10204 - endif10205 - endfor10206 - if home == ""10207 - " just pick the first directory10208 - let home= substitute(&rtp,',.*$','','')10209 - endif10210 - if (has("win32") || has("win95") || has("win64") || has("win16"))10211 - let home= substitute(home,'/','\\','g')10212 endif10213 - endif10214 - " insure that the home directory exists10215 - if g:netrw_dirhistmax > 0 && !isdirectory(home)10216 - if exists("g:netrw_mkdir")10217 - call system(g:netrw_mkdir." ".shellescape(home))10218 - else10219 - call mkdir(home)10220 +10221 + " show directory browsing history10222 + if g:netrw_dirhistmax > 010223 + let cnt = g:netrw_dirhist_cnt10224 + let first = 110225 + let histcnt = 010226 + while ( first || cnt != g:netrw_dirhist_cnt )10227 + let histcnt = histcnt + 110228 + let priority = g:netrw_dirhist_cnt + histcnt10229 + 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 + endif10234 + let first = 010235 + let cnt = ( cnt - 1 ) % g:netrw_dirhistmax10236 + if cnt < 010237 + let cnt= cnt + g:netrw_dirhistmax10238 + endif10239 + endwhile10240 endif10241 +10242 endif10243 - let g:netrw_home= home10244 - return home10245 +" call Dret("NetrwBookmarkMenu")10246 endfun10247 10248 " ---------------------------------------------------------------------10249 -" s:NetrwLeftmouse: handles the <leftmouse> when in a netrw browsing window {{{210250 -fun! s:NetrwLeftmouse(islocal)10251 - if exists("s:netrwdrag")10252 - return10253 - endif10254 -" call Dfunc("s:NetrwLeftmouse(islocal=".a:islocal.")")10255 +" s:NetrwBrowseChgDir: constructs a new directory based on the current {{{210256 +" directory and a new directory name. Also, if the10257 +" "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 name10265 - while getchar(0) != 010266 - "clear the input stream10267 - endwhile10268 - call feedkeys("\<LeftMouse>")10269 - let c = getchar()10270 - let mouse_lnum = v:mouse_lnum10271 - 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 click10277 - let @@= ykeep10278 -" call Dret("s:NetrwLeftmouse : detected a status bar leftmouse click")10279 - return10280 - endif10281 - 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 called10284 + " and the current window is the NetrwMessage window.10285 let @@= ykeep10286 -" call Dret("s:NetrwLeftmouse : detected a vertical separator bar leftmouse click")10287 6387 +" call Decho("b:netrw_curdir doesn't exist!") 10288 6388 +" call Decho("getcwd<".getcwd().">") 10289 6389 +" call Dredir("ls!") 10290 +" call Dret("s:NetrwBrowseChgDir")6390 " call Dret("s:NetrwBrowseChgDir") 10291 6391 return 10292 6392 endif 10293 6393 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 10299 6395 +" 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() 10302 6399 + 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") 10304 6402 +" 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') 10306 6405 + let dirname = substitute(b:netrw_curdir,'\\','/','ge') 10307 6406 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 10311 6408 + let dirname = b:netrw_curdir 10312 6409 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 10318 6413 +" 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 + 10332 6415 + " ignore <cr>s when done in the banner 10333 6416 + if g:netrw_banner … … 10338 6421 + let g:netrw_quickhelp= (g:netrw_quickhelp + 1)%len(s:QuickHelp) 10339 6422 +" 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 manowrap6423 + setl ma noro nowrap 10341 6424 + keepj call setline(line('.'),'" Quick Help: <F1>:help '.s:QuickHelp[g:netrw_quickhelp]) 10342 6425 + setl noma nomod nowrap … … 10345 6428 +" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") 10346 6429 + endif 10347 6430 + endif 10348 6431 +" else " Decho 10349 6432 +" 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= '[\/]$' 10350 6441 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.">") 10390 6443 +" call Decho("dirname<".dirname."> dirpat<".dirpat.">") 10391 6444 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.">") 10425 6450 +" call Decho("adjusting dirname<".dirname.">") 10426 6451 endif 10427 6452 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.">") 10435 6458 +" call Decho('edit-a-file: case "handling a file": newdir<'.newdir.'> !~ dirpat<'.dirpat.">") 10436 6459 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() 10441 6462 + 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 + 10447 6464 +" call Decho("edit-a-file: setting s:rexposn_".bufnr("%")." to SavePosn") 10448 6465 +" call Decho("edit-a-file: win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> ft=".&ft) 10449 6466 +" 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.">") 10450 6467 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:\)' 10455 6470 +" call Decho("edit-a-file: handle tree listing: w:netrw_treedict<".(exists("w:netrw_treedict")? string(w:netrw_treedict) : 'n/a').">") 10456 6471 +" 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 10461 6477 + 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") 10463 6481 +" call Decho("edit-a-file: dirname<".dirname.">") 10464 6482 +" 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.")") 10470 6489 +" 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")) 10473 6493 +" 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()) 10476 6497 +" 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") 10501 6506 +" 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 10518 6525 + " 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) 10520 6529 +" call Decho("edit-a-file: edit local file: exe e! ".fnameescape(dirname)) 10521 6530 + " some like c-^ to return to the last edited file … … 10526 6535 + exe "keepj e! ".fnameescape(dirname) 10527 6536 + 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") 10530 6546 +" call Decho("edit-a-file: remote file: NetrwBrowse will edit it") 10531 +endif10532 +let dolockout= 110533 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") 10541 6557 +" 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") 10543 6560 +" 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") 10546 6564 +" 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.'>') 10563 6573 +" 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 == "./"') 10574 6582 +" 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 == "../"') 10585 6590 +" call Decho('go-up: case "go up one directory": newdir == "../"') 10586 6591 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") 10594 6596 +" call Decho("go-up: clear buffer<".expand("%")."> with :%d") 10595 6597 +" 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') 10607 6605 +" 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)") 10614 6613 +" call Decho("go-up: amiga: dirname<".dirname."> (go up one dir)") 10615 10616 -" call Dret("NetSortSequence") 10617 -endfun 6614 + 10618 6615 + elseif !g:netrw_cygwin && (has("win32") || has("win95") || has("win64") || has("win16")) 10619 6616 + " windows … … 10631 6628 +" call Decho("go-up: windows: dirname<".dirname."> (go up one dir)") 10632 6629 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') 10639 6633 +" call Decho('go-up: case "go up one directory": newdir == "../" and unix or cygwin') 10640 +if a:islocal10641 +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)") 10648 6642 +" 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') 10664 6651 +" 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") 10666 6654 +" 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") 10669 6658 +" 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).">") 10675 6665 +" call Decho("tree-list: w:netrw_treedict<".string(w:netrw_treedict).">") 10676 6666 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!') 10683 6670 +" 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') 10686 6674 +" 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!') 10693 6682 +" 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') 10696 6686 +" 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!') 10704 6695 +" 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') 10707 6699 +" 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.">") 10713 6706 +" 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).">") 10715 6710 +" call Decho("tree-list: removed entry<".treedir."> from treedict") 10716 6711 +" 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.">") 10721 6717 +" 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.">") 10731 6726 +" 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) 10733 6728 endif 10734 6729 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 10742 6747 +" 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.">)") 10744 6758 +" call Decho("restore: doing modification lockout settings: ma nomod noro") 10745 6759 +" call Decho("restore: setl ma nomod noro") 10746 + setl ma no mod noro6760 + setl ma noro nomod 10747 6761 +" call Decho("restore: ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") 10748 6762 + else 10749 6763 +" call Decho("restore: doing modification lockout settings: ma nomod ro") 10750 6764 +" call Decho("restore: setl ma nomod noro") 10751 + setl ma nomod ro6765 + setl ma ro nomod 10752 6766 +" 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 " --------------------------------------------------------------------- 10769 6777 +" s:NetrwBrowseUpDir: implements the "-" mappings {{{2 10770 6778 +" for thin, long, and wide: cursor placed just after banner … … 10788 6796 + if !search('\c^'.curline,'cw') 10789 6797 + 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 10798 6800 + exe "sil! keepj norm! z\<cr>" 10799 6801 + while winline() < swwline … … 10822 6824 + 10823 6825 +" --------------------------------------------------------------------- 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() 10831 6834 + 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 10848 6841 endif 6842 - call netrw#NetrwRestorePosn(screenposn) 10849 6843 + call netrw#RestorePosn(screenposn) 10850 6844 let @@= ykeep 10851 -" call Dret("NetrwMakeDir : file<".newdirname."> exists previously") 10852 +" call Dret("NetrwBrowseX : coredump handler invoked") 6845 " call Dret("NetrwBrowseX : coredump handler invoked") 10853 6846 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 10854 6858 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.">") 10912 6861 +" 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) 11050 6870 + 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() 11168 6879 + 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("%")}).">") 11171 6883 +" 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) 11210 6892 + 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() 11221 6901 + 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) 11234 6910 + 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.")") 11275 6924 +" s:NetrwLeftmouse: handles the <leftmouse> when in a netrw browsing window {{{2 11276 6925 +fun! s:NetrwLeftmouse(islocal) … … 11466 7115 +fun! s:NetrwMakeDir(usrhost) 11467 7116 +" 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('.') 11470 7137 + " get name of new directory from user. A bare <CR> will skip. 11471 7138 + " if its currently a directory, also request will be skipped, but with … … 11477 7144 + 11478 7145 + if newdirname == "" 11479 + let @@= ykeep 7146 let @@= ykeep 7147 -" call Dret("s:NetrwLeftmouse : detected a vertical separator bar leftmouse click") 11480 7148 +" 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())) 11484 7155 + if a:usrhost == "" 11485 7156 +" call Decho("local mkdir") … … 11496 7167 +" call Dret("s:NetrwMakeDir : directory<".newdirname."> exists previously") 11497 7168 + return 11498 + endif 7169 endif 7170 - else 7171 - if exists("b:netrw_curdir") 7172 - keepj call s:NetrwBrowse(0,s:NetrwBrowseChgDir(0,s:NetrwGetWord())) 11499 7173 + if s:FileReadable(fullnewdir) 11500 7174 + if !exists("g:netrw_quiet") … … 11504 7178 +" call Dret("s:NetrwMakeDir : file<".newdirname."> exists previously") 11505 7179 + 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> 11508 7196 + " requested new local directory is neither a pre-existing file or 11509 7197 + " directory, so make it! … … 11524 7212 + call netrw#ErrorMsg(s:ERROR,"consider setting g:netrw_localmkdir<".g:netrw_localmkdir."> to something that works",80) 11525 7213 +" 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 11531 7217 +" call Decho("restoring netrw_origdir since g:netrw_keepdir=".g:netrw_keepdir) 11532 7218 + call s:NetrwLcd(netrw_origdir) … … 11583 7269 +" call Decho("b:netrw_fname<".b:netrw_fname.">") 11584 7270 + let remotepath= b:netrw_fname 11585 + else 7271 else 7272 - nno <silent> <s-rightrelease> <leftmouse>:<c-u>call <SID>NetrwRightrelease(0)<cr> 11586 7273 + let remotepath= "" 11587 +endif7274 endif 11588 7275 + call s:NetrwRemoteFtpCmd(remotepath,g:netrw_remote_mkdir.' "'.newdirname.'"') 11589 7276 + keepj call s:NetrwRefresh(0,s:NetrwBrowseChgDir(0,'./')) 11590 7277 + keepj call netrw#RestorePosn(svpos) 11591 + endif 7278 endif 7279 -" call Dret("s:NetrwRightdrag : s:netrwdrag=".s:netrwdrag." buf#".bufnr("%")) 11592 7280 + 11593 7281 + let @@= ykeep 11594 7282 +" 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 11598 7305 +" s:TreeSqueezeDir: allows a shift-cr (gvim only) to squeeze the current tree-listing directory {{{2 11599 7306 +fun! s:TreeSqueezeDir(islocal) … … 11618 7325 +" call Decho("squeezing at line#".line(".").": ".getline('.')) 11619 7326 + call s:NetrwBrowse(a:islocal,s:NetrwBrowseChgDir(a:islocal,s:NetrwGetWord())) 11620 + endif 7327 endif 7328 -" call Dret("s:NetrwRightrelease") 11621 7329 +" 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= @@ 11625 7338 +" s:NetrwMaps: {{{2 11626 7339 +fun! s:NetrwMaps(islocal) 11627 7340 +" 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) 11629 7349 + if g:netrw_mousemaps && g:netrw_retmap 11630 7350 +" call Decho("set up Rexplore 2-leftmouse") … … 11636 7356 +" call Decho("making map for c-leftmouse") 11637 7357 + nmap <unique> <silent> <c-leftmouse> <Plug>NetrwReturn 11638 11639 7358 + endif 7359 + endif 11640 7360 + nno <silent> <Plug>NetrwReturn :Rexplore<cr> 11641 7361 +" call Decho("made <Plug>NetrwReturn map") 11642 7362 + 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 = "" 11644 7371 + if a:islocal 11645 7372 +" call Decho("make local maps") … … 11648 7375 + nnoremap <buffer> <silent> % :call <SID>NetrwOpenFile(1)<cr> 11649 7376 + 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> 11651 7378 + nnoremap <buffer> <silent> <cr> :call netrw#LocalBrowseCheck(<SID>NetrwBrowseChgDir(1,<SID>NetrwGetWord()))<cr> 11652 7379 + nnoremap <buffer> <silent> <s-cr> :call <SID>TreeSqueezeDir(1)<cr> … … 11701 7428 + inoremap <buffer> <silent> c <c-o>:exe "keepjumps lcd ".fnameescape(b:netrw_curdir)<cr> 11702 7429 + 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> 11704 7431 + inoremap <buffer> <silent> % <c-o>:call <SID>NetrwOpenFile(1)<cr> 11705 7432 + inoremap <buffer> <silent> - <c-o>:call <SID>NetrwBrowseUpDir(1)<cr> … … 11755 7482 + nmap <buffer> <unique> <c-l> <Plug>NetrwRefresh 11756 7483 + 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-/ @' 11758 7493 + nnoremap <buffer> <silent> <Plug>NetrwRefresh :call <SID>NetrwRefresh(1,<SID>NetrwBrowseChgDir(1,'./'))<cr> 11759 7494 + if s:didstarstar || !mapcheck("<s-down>","n") 11760 7495 + nnoremap <buffer> <silent> <s-down> :Nexplore<cr> 11761 7496 + 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") 11763 7580 + if s:didstarstar || !mapcheck("<s-up>","n") 11764 7581 + nnoremap <buffer> <silent> <s-up> :Pexplore<cr> … … 11799 7616 + exe 'inoremap <buffer> <silent> d <c-o>:call <SID>NetrwMakeDir("")<cr>' 11800 7617 + 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 11802 7630 + else " remote 11803 7631 +" call Decho("make remote maps") … … 11832 7660 + nnoremap <buffer> <silent> gh :<c-u>call <SID>NetrwHidden(0)<cr> 11833 7661 + 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> 11835 7663 + nnoremap <buffer> <silent> i :call <SID>NetrwListStyle(0)<cr> 11836 7664 + nnoremap <buffer> <silent> I :call <SID>NetrwBannerCtrl(1)<cr> … … 11880 7708 + inoremap <buffer> <silent> gh <c-o>:<c-u>call <SID>NetrwHidden(0)<cr> 11881 7709 + 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> 11883 7711 + inoremap <buffer> <silent> i <c-o>:call <SID>NetrwListStyle(0)<cr> 11884 7712 + inoremap <buffer> <silent> I <c-o>:call <SID>NetrwBannerCtrl(1)<cr> … … 11905 7733 + nmap <buffer> <c-h> <Plug>NetrwHideEdit 11906 7734 + 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 11908 7743 + nnoremap <buffer> <silent> <Plug>NetrwHideEdit :call <SID>NetrwHideEdit(0)<cr> 11909 7744 + if !hasmapto('<Plug>NetrwRefresh') 11910 7745 + nmap <buffer> <c-l> <Plug>NetrwRefresh 11911 7746 + 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 11914 7769 + let mapsafepath = escape(s:path, s:netrw_map_escape) 11915 7770 + let mapsafeusermach = escape(s:user.s:machine, s:netrw_map_escape) … … 11938 7793 + exe 'vnoremap <buffer> <silent> <rightmouse> <leftmouse>:call <SID>NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")<cr>' 11939 7794 + exe 'inoremap <buffer> <silent> <rightmouse> <c-o><leftmouse><c-o>:call <SID>NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")<cr>' 11940 +endif7795 endif 11941 7796 + exe 'nnoremap <buffer> <silent> <del> :call <SID>NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")<cr>' 11942 7797 + exe 'nnoremap <buffer> <silent> d :call <SID>NetrwMakeDir("'.mapsafeusermach.'")<cr>' … … 12055 7910 12056 7911 " --------------------------------------------------------------------- 12057 @@ -5324,7 +5 765,16 @@7912 @@ -5324,7 +5846,16 @@ 12058 7913 let ykeep = @@ 12059 7914 let curbufnr= bufnr("%") … … 12073 7928 if exists("s:netrwmarkfilelist_{curbufnr}") 12074 7929 " markfile list pre-exists 12075 @@ -5336,7 +5 786,7 @@7930 @@ -5336,7 +5867,7 @@ 12076 7931 " append filename to buffer's markfilelist 12077 7932 " call Decho("append filename<".a:fname."> to local markfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr}).">") … … 12082 7937 else 12083 7938 " remove filename from buffer's markfilelist 12084 @@ -5350,12 +58 00,12 @@7939 @@ -5350,12 +5881,12 @@ 12085 7940 " rebuild match list to display markings correctly 12086 7941 " call Decho("rebuild s:netrwmarkfilemtch_".curbufnr) … … 12098 7953 let first= 0 12099 7954 endfor 12100 @@ -5373,9 +5 823,9 @@7955 @@ -5373,9 +5904,9 @@ 12101 7956 12102 7957 " build initial markfile matching pattern … … 12110 7965 " call Decho("ending s:netrwmarkfilemtch_".curbufnr."<".s:netrwmarkfilemtch_{curbufnr}.">") 12111 7966 endif 12112 @@ -5427,7 +5 877,7 @@7967 @@ -5427,7 +5958,7 @@ 12113 7968 " g:netrw_decompress = { ".gz" : "gunzip" , ".bz2" : "bunzip2" , ".zip" : "unzip" , ".tar" : "tar -xf", ".xz" : "unxz"} 12114 7969 fun! s:NetrwMarkFileCompress(islocal) … … 12119 7974 let curbufnr = bufnr("%") 12120 7975 12121 @@ -5482,7 + 5932,7 @@7976 @@ -5482,7 +6013,7 @@ 12122 7977 12123 7978 call s:NetrwUnmarkList(curbufnr,curdir) … … 12128 7983 " call Dret("s:NetrwMarkFileCompress") 12129 7984 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 @@ 12131 7995 elseif !a:islocal && s:netrwmftgt_islocal 12132 7996 " Copy marked files, remote directory to local directory … … 12137 8001 elseif !a:islocal && !s:netrwmftgt_islocal 12138 8002 " Copy marked files, remote directory to remote directory 12139 @@ -5617,15 +6 067,15 @@8003 @@ -5617,15 +6148,15 @@ 12140 8004 endif 12141 8005 endif … … 12156 8020 if v:shell_error != 0 12157 8021 call netrw#ErrorMsg(s:WARNING,"consider setting g:netrw_localrmdir<".g:netrw_localrmdir."> to something that works",80) 12158 @@ -5633,7 +6 083,7 @@8022 @@ -5633,7 +6164,7 @@ 12159 8023 return 12160 8024 endif … … 12165 8029 endif 12166 8030 endif 12167 @@ -5655,7 +61 05,7 @@8031 @@ -5655,7 +6186,7 @@ 12168 8032 keepj call s:NetrwRefreshDir(a:islocal,curdir) 12169 8033 endif … … 12174 8038 12175 8039 " call Dret("s:NetrwMarkFileCopy 1") 12176 @@ -5679,7 +6 129,7 @@8040 @@ -5679,7 +6210,7 @@ 12177 8041 endif 12178 8042 " call Decho("sanity chk passed: s:netrwmarkfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr})) … … 12183 8047 let curdir = b:netrw_curdir 12184 8048 for fname in s:netrwmarkfilelist 12185 @@ -5771,7 +6 221,7 @@8049 @@ -5771,7 +6302,7 @@ 12186 8050 " Uses the local marked-file list. 12187 8051 fun! s:NetrwMarkFileExe(islocal) … … 12192 8056 let curbufnr = bufnr("%") 12193 8057 12194 @@ -5829,7 +6 279,7 @@8058 @@ -5829,7 +6360,7 @@ 12195 8059 12196 8060 " refresh the listing … … 12201 8065 keepj call netrw#ErrorMsg(s:ERROR,"no files marked!",59) 12202 8066 endif 12203 @@ -5843,7 +6 293,7 @@8067 @@ -5843,7 +6374,7 @@ 12204 8068 " Uses the local marked file list. 12205 8069 fun! s:NetrwMarkHideSfx(islocal) … … 12210 8074 12211 8075 " s:netrwmarkfilelist_{curbufnr}: the List of marked files 12212 @@ -5886,7 +6 336,7 @@8076 @@ -5886,7 +6417,7 @@ 12213 8077 12214 8078 " refresh the listing … … 12219 8083 keepj call netrw#ErrorMsg(s:ERROR,"no files marked!",59) 12220 8084 endif 12221 @@ -5899,7 +6 349,7 @@8085 @@ -5899,7 +6430,7 @@ 12222 8086 " Uses the local marked-file list. 12223 8087 fun! s:NetrwMarkFileVimCmd(islocal) … … 12228 8092 let curbufnr = bufnr("%") 12229 8093 12230 @@ -5943,7 +6 393,7 @@8094 @@ -5943,7 +6474,7 @@ 12231 8095 12232 8096 " refresh the listing … … 12237 8101 keepj call netrw#ErrorMsg(s:ERROR,"no files marked!",59) 12238 8102 endif 12239 @@ -5957,7 +64 07,7 @@8103 @@ -5957,7 +6488,7 @@ 12240 8104 " Uses the local marked file list. 12241 8105 fun! s:NetrwMarkHideSfx(islocal) … … 12246 8110 12247 8111 " s:netrwmarkfilelist_{curbufnr}: the List of marked files 12248 @@ -6000,7 +6 450,7 @@8112 @@ -6000,7 +6531,7 @@ 12249 8113 12250 8114 " refresh the listing … … 12255 8119 keepj call netrw#ErrorMsg(s:ERROR,"no files marked!",59) 12256 8120 endif 12257 @@ -6013,7 +6 463,7 @@8121 @@ -6013,7 +6544,7 @@ 12258 8122 " Uses the global markfilelist 12259 8123 fun! s:NetrwMarkFileGrep(islocal) … … 12264 8128 12265 8129 if exists("s:netrwmarkfilelist") 12266 @@ -6053,7 +65 03,7 @@8130 @@ -6053,7 +6584,7 @@ 12267 8131 echo "(use :cn, :cp to navigate, :Rex to return)" 12268 8132 … … 12273 8137 if exists("nonisi") 12274 8138 " original, user-supplied pattern did not begin with a character from isident 12275 @@ -6094, 7 +6544,7@@8139 @@ -6094,8 +6625,8 @@ 12276 8140 if a:islocal && s:netrwmftgt_islocal 12277 8141 " move: local -> local 12278 8142 " call Decho("move from local to local") 12279 8143 -" call Decho("(s:NetrwMarkFileMove) local to local move") 8144 - if !executable(g:netrw_localmovecmd) && g:netrw_localmovecmd !~ '\<cmd\s' 12280 8145 +" 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' 12282 8147 call netrw#ErrorMsg(s:ERROR,"g:netrw_localmovecmd<".g:netrw_localmovecmd."> not executable on your system, aborting",90) 12283 8148 " call Dfunc("s:NetrwMarkFileMove : g:netrw_localmovecmd<".g:netrw_localmovecmd."> n/a!") 12284 @@ -6189,7 +6639,7 @@ 8149 return 8150 @@ -6189,7 +6720,7 @@ 12285 8151 endif 12286 8152 if g:netrw_fastbrowse <= 1 … … 12291 8157 12292 8158 " call Dret("s:NetrwMarkFileMove") 12293 @@ -6267,8 +67 17,8 @@8159 @@ -6267,8 +6798,8 @@ 12294 8160 let eikeep = &ei 12295 8161 let areg = @a … … 12302 8168 keepj call s:NetrwEnew() 12303 8169 keepj call s:NetrwSafeOptions() 12304 @@ -6276,7 +6 726,7 @@8170 @@ -6276,7 +6807,7 @@ 12305 8171 keepj 2 12306 8172 let bannercnt= search('^" =====','W') … … 12311 8177 sil keepj %s/\s\{2,}\S.*$//e 12312 8178 call histdel("/",-1) 12313 @@ -6284,7 +6 734,7 @@8179 @@ -6284,7 +6815,7 @@ 12314 8180 sil keepj %s/\s\{2,}/\r/ge 12315 8181 call histdel("/",-1) … … 12320 8186 call histdel("/",-1) 12321 8187 call histdel("/",-1) 12322 @@ -6348,7 +6 798,7 @@8188 @@ -6348,7 +6879,7 @@ 12323 8189 " Uses the global markfilelist 12324 8190 fun! s:NetrwMarkFileTag(islocal) … … 12329 8195 let curbufnr = bufnr("%") 12330 8196 12331 @@ -6374,7 +6 824,7 @@8197 @@ -6374,7 +6905,7 @@ 12332 8198 endif 12333 8199 else … … 12338 8204 1split 12339 8205 e tags 12340 @@ -6386,7 +6 836,7 @@8206 @@ -6386,7 +6917,7 @@ 12341 8207 endif 12342 8208 2match none … … 12347 8213 12348 8214 " call Dret("s:NetrwMarkFileTag") 12349 @@ -6400,7 +6 850,7 @@8215 @@ -6400,7 +6931,7 @@ 12350 8216 " 1=target directory is local 12351 8217 fun! s:NetrwMarkFileTgt(islocal) … … 12356 8222 let hadtgt = exists("s:netrwmftgt") 12357 8223 if !exists("w:netrw_bannercnt") 12358 @@ -6414,10 +6 864,10 @@8224 @@ -6414,10 +6945,10 @@ 12359 8225 " call Decho("cursor in banner region, and target already is <".b:netrw_curdir.">: removing target") 12360 8226 unlet s:netrwmftgt s:netrwmftgt_islocal … … 12369 8235 return 12370 8236 else 12371 @@ -6454,10 +69 04,10 @@8237 @@ -6454,10 +6985,10 @@ 12372 8238 let s:netrwmftgt_islocal= a:islocal 12373 8239 … … 12382 8248 sil! keepj norm! j 12383 8249 endif 12384 @@ -6559,7 +70 09,7 @@8250 @@ -6559,7 +7090,7 @@ 12385 8251 " s:NetrwUnMarkFile: {{{2 12386 8252 fun! s:NetrwUnMarkFile(islocal) … … 12391 8257 12392 8258 " unmark marked file list (although I expect s:NetrwUpload() 12393 @@ -6573,7 +7 023,7 @@8259 @@ -6573,7 +7104,7 @@ 12394 8260 endif 12395 8261 … … 12400 8266 endfun 12401 8267 12402 @@ -6688,10 +7 138,10 @@8268 @@ -6688,10 +7219,10 @@ 12403 8269 let ykeep= @@ 12404 8270 if exists("s:netrwmarkfilelist_{bufnr('%')}") … … 12413 8279 let @@= ykeep 12414 8280 12415 @@ -6707,19 +7 157,22 @@8281 @@ -6707,19 +7238,22 @@ 12416 8282 " choice = 2 : didn't save modified file, opened window 12417 8283 " choice = 3 : cancel open … … 12440 8306 " if only one window, open a new one first 12441 8307 " call Decho("only one window, so open a new one (g:netrw_alto=".g:netrw_alto.")") 12442 @@ -6732,68 +7 185,73 @@8308 @@ -6732,68 +7266,73 @@ 12443 8309 " call Decho("exe ".(g:netrw_alto? "bel " : "abo ").winsz."wincmd s") 12444 8310 exe (g:netrw_alto? "bel " : "abo ").winsz."wincmd s" … … 12551 8417 12552 8418 " restore b:netrw_curdir (window split/enew may have lost it) 12553 @@ -6806,7 +7 264,7 @@8419 @@ -6806,7 +7345,7 @@ 12554 8420 endif 12555 8421 endif … … 12560 8426 endfun 12561 8427 12562 @@ -6855,7 +73 13,7 @@8428 @@ -6855,7 +7394,7 @@ 12563 8429 " call Decho("handle uploading a list of files via scp") 12564 8430 let curdir= getcwd() … … 12569 8435 let args = join(map(filelist,"shellescape(v:val, 1)")) 12570 8436 if exists("g:netrw_port") && g:netrw_port != "" 12571 @@ -6867,7 +7 325,7 @@8437 @@ -6867,7 +7406,7 @@ 12572 8438 let tgt = substitute(a:tgt,'^scp://[^/]\+/\(.*\)$','\1','') 12573 8439 " call Decho("exe ".s:netrw_silentxfer."!".g:netrw_scp_cmd.shellescape(useport,1)." ".args." ".shellescape(machine.":".tgt,1)) … … 12578 8444 elseif a:tgt =~ '^ftp:' 12579 8445 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 12581 8453 " call Decho("setl ma noro") 12582 8454 " call Decho("clear buffer<".expand("%")."> with :%d") 12583 8455 let ykeep = @@ 12584 8456 - let screenposn = netrw#NetrwSavePosn() 8457 + 8458 + " save the cursor position before refresh. 12585 8459 + let screenposn = netrw#SavePosn() 8460 +" call Decho("win#".winnr().": ".winheight(0)."x".winwidth(0)." curfile<".expand("%").">") 12586 8461 " call Decho("clearing buffer prior to refresh") 12587 8462 sil! keepj %d 12588 8463 if a:islocal 12589 @@ -7043,7 +75 01,7@@8464 @@ -7043,7 +7583,9 @@ 12590 8465 else 12591 8466 keepj call s:NetrwBrowse(a:islocal,a:dirname) 12592 8467 endif 12593 8468 - keepj call netrw#NetrwRestorePosn(screenposn) 8469 + 8470 + " restore position 12594 8471 + keepj call netrw#RestorePosn(screenposn) 12595 8472 12596 8473 " restore file marks 12597 8474 if exists("s:netrwmarkfilemtch_{bufnr('%')}") && s:netrwmarkfilemtch_{bufnr("%")} != "" 12598 @@ -7062,7 +7 520,7 @@8475 @@ -7062,7 +7604,7 @@ 12599 8476 " --------------------------------------------------------------------- 12600 8477 " s:NetrwRefreshDir: refreshes a directory by name {{{2 … … 12605 8482 " call Dfunc("s:NetrwRefreshDir(islocal=".a:islocal." dirname<".a:dirname.">) g:netrw_fastbrowse=".g:netrw_fastbrowse) 12606 8483 if g:netrw_fastbrowse == 0 12607 @@ -7087, 7 +7545,7 @@8484 @@ -7087,12 +7629,27 @@ 12608 8485 12609 8486 elseif g:netrw_fastbrowse <= 1 … … 12614 8491 " call Dret("s:NetrwRefreshDir") 12615 8492 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 @@ 12617 8514 let priority = priority + 1 12618 8515 endwhile … … 12623 8520 endif 12624 8521 12625 @@ -7178,7 +7 636,7 @@8522 @@ -7178,7 +7735,7 @@ 12626 8523 " supports choosing a bookmark as a target using a qb-generated list 12627 8524 let choice= a:choice - 1 … … 12632 8529 echomsg "Sorry, bookmark#".a:choice." doesn't exist!" 12633 8530 endif 12634 @@ -7188,7 +7 646,7 @@8531 @@ -7188,7 +7745,7 @@ 12635 8532 let choice= (a:choice % g:netrw_dirhistmax) + 1 12636 8533 if exists("g:netrw_dirhist_".choice) … … 12641 8538 echomsg "Sorry, history#".a:choice." not available!" 12642 8539 endif 12643 @@ -7202,12 +7 660,12 @@8540 @@ -7202,12 +7759,12 @@ 12644 8541 fun! s:NetrwSortStyle(islocal) 12645 8542 " call Dfunc("s:NetrwSortStyle(islocal=".a:islocal.") netrw_sort_by<".g:netrw_sort_by.">") … … 12656 8553 " call Dret("s:NetrwSortStyle : netrw_sort_by<".g:netrw_sort_by.">") 12657 8554 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 @@ 12659 8580 elseif a:mode == 4 12660 8581 " local and t … … 12688 8609 12689 8610 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 @@ 12691 8618 let ebmd= escape(bmd,g:netrw_menu_escape) 12692 8619 " show bookmarks for goto menu … … 12697 8624 endfor 12698 8625 endif 12699 @@ -7337,7 +7 811,7 @@8626 @@ -7337,7 +7914,7 @@ 12700 8627 let histentry = g:netrw_dirhist_{histcnt} 12701 8628 let ehistentry = escape(histentry,g:netrw_menu_escape) … … 12706 8633 let histcnt = histcnt + 1 12707 8634 endwhile 12708 @@ -7350,60 +7 824,57 @@8635 @@ -7350,60 +7927,57 @@ 12709 8636 " s:NetrwTreeDir: determine tree directory given current cursor position {{{2 12710 8637 " (full path directory with trailing slash returned) … … 12799 8726 endfun 12800 8727 12801 @@ -7440,7 + 7911,7 @@8728 @@ -7440,7 +8014,7 @@ 12802 8729 endif 12803 8730 … … 12808 8735 " call Decho("display subtrees with depth<".depth."> and current leaves") 12809 8736 for entry in w:netrw_treedict[a:dir] 12810 @@ -7457,6 + 7928,7 @@8737 @@ -7457,6 +8031,7 @@ 12811 8738 sil! keepj call setline(line("$")+1,depth.entry) 12812 8739 endif … … 12816 8743 endfun 12817 8744 12818 @@ -7466,7 + 7938,8 @@8745 @@ -7466,7 +8041,8 @@ 12819 8746 if w:netrw_liststyle == s:TREELIST 12820 8747 " call Dfunc("NetrwTreeListing() bufname<".expand("%").">") … … 12826 8753 " update the treetop 12827 8754 " call Decho("update the treetop") 12828 @@ -7485,7 + 7958,7 @@8755 @@ -7485,7 +8061,7 @@ 12829 8756 12830 8757 " update the directory listing for the current directory … … 12835 8762 let w:netrw_treedict[a:dirname]= getline(w:netrw_bannercnt,line("$")) 12836 8763 " call Decho("w:treedict[".a:dirname."]= ".string(w:netrw_treedict[a:dirname])) 12837 @@ -7498,9 + 7971,19 @@8764 @@ -7498,9 +8074,19 @@ 12838 8765 let fname= "" 12839 8766 endif … … 12851 8778 + endwhile 12852 8779 + 12853 + setl noma nomod ro8780 + exe "setl ".g:netrw_bufsettings 12854 8781 12855 8782 " call Dret("NetrwTreeListing : bufname<".expand("%").">") 12856 8783 return 12857 @@ -7508,6 + 7991,44 @@8784 @@ -7508,6 +8094,44 @@ 12858 8785 endfun 12859 8786 … … 12900 8827 fun! s:NetrwWideListing() 12901 8828 12902 @@ -7544,7 +8 065,9 @@8829 @@ -7544,7 +8168,9 @@ 12903 8830 let newcolstart = w:netrw_bannercnt + fpc 12904 8831 let newcolend = newcolstart + fpc - 1 … … 12911 8838 if newcolend > line("$") | let newcolend= line("$") | endif 12912 8839 let newcolqty= newcolend - newcolstart 12913 @@ -7557, 7 +8080,9@@8840 @@ -7557,13 +8183,15 @@ 12914 8841 exe "sil! keepj ".newcolstart.','.newcolend.'d' 12915 8842 exe 'sil! keepj '.w:netrw_bannercnt … … 12922 8849 keepj call histdel("/",-1) 12923 8850 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 @@ 12925 8859 " s:PerformListing: {{{2 12926 8860 fun! s:PerformListing(islocal) … … 12961 8895 endif 12962 8896 12963 @@ -7614,7 +8 141,7 @@8897 @@ -7614,7 +8244,7 @@ 12964 8898 12965 8899 " Set up the banner {{{3 … … 12970 8904 keepj call setline(2,'" Netrw Directory Listing (netrw '.g:loaded_netrw.')') 12971 8905 if exists("g:netrw_bannerbackslash") && g:netrw_bannerbackslash 12972 @@ -7628,6 +8 155,7 @@8906 @@ -7628,6 +8258,7 @@ 12973 8907 keepj 1 12974 8908 let w:netrw_bannercnt= 1 … … 12978 8912 let sortby= g:netrw_sort_by 12979 8913 if g:netrw_sort_direction =~ "^r" 12980 @@ -7636,26 +8 164,28 @@8914 @@ -7636,26 +8267,28 @@ 12981 8915 12982 8916 " Sorted by... {{{3 … … 13011 8945 if s:netrwmftgt_islocal 13012 8946 sil! keepj call setline(line("."),'" Copy/Move Tgt: '.s:netrwmftgt.' (local)') 13013 @@ -7664,14 +8 194,14 @@8947 @@ -7664,14 +8297,14 @@ 13014 8948 endif 13015 8949 let w:netrw_bannercnt= w:netrw_bannercnt + 1 … … 13028 8962 if g:netrw_hide == 1 13029 8963 keepj put ='\" Hiding: '.g:netrw_list_hide 13030 @@ -7681,47 +8 211,62 @@8964 @@ -7681,47 +8314,62 @@ 13031 8965 let w:netrw_bannercnt= w:netrw_bannercnt + 1 13032 8966 endif … … 13101 9035 " normal direction sorting 13102 9036 exe 'sil keepj '.w:netrw_bannercnt.',$sort'.' '.g:netrw_sort_options 13103 @@ -7731,13 +8 276,13 @@9037 @@ -7731,13 +8379,13 @@ 13104 9038 endif 13105 9039 endif … … 13117 9051 " call Decho('exe sil keepjumps '.w:netrw_bannercnt.',$sort') 13118 9052 exe 'sil! keepj '.w:netrw_bannercnt.',$sort'.' '.g:netrw_sort_options 13119 @@ -7751, 149 +8296,306@@9053 @@ -7751,47 +8399,57 @@ 13120 9054 endif 13121 9055 … … 13183 9117 endfun 13184 9118 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 +endif13201 + 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 13204 9138 + 13205 9139 + " set up User9 highlighting as needed … … 13342 9276 +" call Dret("NetrwRemoteFtpCmd") 13343 9277 + 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 + 13348 9279 + "......................................... 13349 9280 + else " {{{3 13350 9281 + keepj call netrw#ErrorMsg(s:WARNING,"unable to comply with your request<" . bufname("%") . ">",23) 13351 9282 + 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 + 13358 9284 + " cleanup for Windows " {{{3 13359 9285 + if has("win32") || has("win95") || has("win64") || has("win16") … … 13370 9296 + exe "sil! keepj ".w:netrw_bannercnt.',$s/^\%(\S\+\s\+\)\{8}//e' 13371 9297 + 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 13388 9299 endif 13389 9300 … … 13477 9388 if exists("b:netrw_method") 13478 9389 " 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" 13484 9392 " use ftp to get remote file listing {{{3 13485 9393 " call Decho("use ftp to get remote file listing") … … 13491 9399 let listcmd= g:netrw_ftp_timelist_cmd 13492 9400 elseif g:netrw_sort_by =~ '^s' 13493 @@ -7903,6 +8 605,20 @@9401 @@ -7903,6 +8708,20 @@ 13494 9402 call s:NetrwRemoteFtpCmd(s:path,listcmd) 13495 9403 " exe "sil! keepalt keepj ".w:netrw_bannercnt.',$g/^./call Decho("raw listing: ".getline("."))' … … 13512 9420 " shorten the listing 13513 9421 " 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 @@ 13515 9432 endif 13516 9433 … … 13523 9440 keepj call histdel("/",-1) 13524 9441 endif 13525 @@ -8023,7 +8 739,9 @@9442 @@ -8023,7 +8842,9 @@ 13526 9443 " if exists("w:netrw_bannercnt") && w:netrw_bannercnt <= line("$") " Decho 13527 9444 " exe "keepj ".w:netrw_bannercnt.',$g/^./call Decho("listing: ".getline("."))' … … 13534 9451 13535 9452 " --------------------------------------------------------------------- 13536 @@ -8031,7 +8 749,7 @@9453 @@ -8031,7 +8852,7 @@ 13537 9454 fun! s:NetrwRemoteRm(usrhost,path) range 13538 9455 " call Dfunc("s:NetrwRemoteRm(usrhost<".a:usrhost."> path<".a:path.">) virtcol=".virtcol(".")) … … 13543 9460 let all= 0 13544 9461 if exists("s:netrwmarkfilelist_{bufnr('%')}") 13545 @@ -8070,7 +8 788,7 @@9462 @@ -8070,7 +8891,7 @@ 13546 9463 " refresh the (remote) directory listing 13547 9464 " call Decho("refresh remote directory listing") … … 13552 9469 " call Dret("s:NetrwRemoteRm") 13553 9470 endfun 13554 @@ -8190,141 + 8908,12 @@9471 @@ -8190,141 +9011,12 @@ 13555 9472 endfun 13556 9473 … … 13695 9612 let rename_cmd = s:MakeSshCmd(g:netrw_rename_cmd) 13696 9613 13697 @@ -8387,7 + 8976,7 @@9614 @@ -8387,7 +9079,7 @@ 13698 9615 13699 9616 " refresh the directory … … 13704 9621 " call Dret("NetrwRemoteRename") 13705 9622 endfun 13706 @@ -8439,9 +9 028,9 @@9623 @@ -8439,9 +9131,9 @@ 13707 9624 exe 'sil! bdelete '.plainfname 13708 9625 exe 'keepalt file! '.plainfname … … 13716 9633 exe "sil doau BufReadPost ".fname2396e 13717 9634 endfun 13718 @@ -8456,107 +9 045,263 @@9635 @@ -8456,107 +9148,263 @@ 13719 9636 " The &ft == "netrw" test was installed because the BufEnter event 13720 9637 " would hit when re-entering netrw windows, creating unexpected … … 14021 9938 else 14022 9939 " normal file 14023 @@ -8564,7 +9 309,7 @@9940 @@ -8564,7 +9412,7 @@ 14024 9941 endif 14025 9942 elseif executable(filename) … … 14030 9947 else 14031 9948 " normal file 14032 @@ -8575,45 +9 320,45 @@9949 @@ -8575,45 +9423,45 @@ 14033 9950 " normal file 14034 9951 let pfile= filename … … 14086 10003 endif 14087 10004 endfor 14088 @@ -8622,138 +9 367,13 @@10005 @@ -8622,138 +9470,13 @@ 14089 10006 sil! keepj g/^$/d 14090 10007 sil! keepj %s/\r$//e … … 14226 10143 fun! s:NetrwLocalExecute(cmd) 14227 10144 " call Dfunc("s:NetrwLocalExecute(cmd<".a:cmd.">)") 14228 @@ -8769,7 +9 389,7 @@10145 @@ -8769,7 +9492,7 @@ 14229 10146 let optargs= input(":!".a:cmd,"","file") 14230 10147 " call Decho("optargs<".optargs.">") … … 14235 10152 " strip any ansi escape sequences off 14236 10153 let result = substitute(result,"\e\\[[0-9;]*m","","g") 14237 @@ -8789,7 +9 409,7 @@10154 @@ -8789,7 +9512,7 @@ 14238 10155 " preparation for removing multiple files/directories 14239 10156 let ykeep = @@ … … 14244 10161 " rename files given by the markfilelist 14245 10162 if exists("s:netrwmarkfilelist_{bufnr('%')}") 14246 @@ -8848,7 +9 468,7 @@10163 @@ -8848,7 +9571,7 @@ 14247 10164 " refresh the directory 14248 10165 " call Decho("refresh the directory listing") … … 14253 10170 14254 10171 " call Dret("NetrwLocalRename") 14255 @@ -8864,7 +9 484,7 @@10172 @@ -8864,7 +9587,7 @@ 14256 10173 let ykeep = @@ 14257 10174 let ret = 0 … … 14262 10179 if exists("s:netrwmarkfilelist_{bufnr('%')}") 14263 10180 " remove all marked files 14264 @@ -8911,7 +9 531,7 @@10181 @@ -8911,7 +9634,7 @@ 14265 10182 " call Decho("bufname<".bufname("%").">") 14266 10183 if bufname("%") != "NetrwMessage" … … 14271 10188 let @@= ykeep 14272 10189 14273 @@ -9007,31 +9 627,26 @@10190 @@ -9007,31 +9730,26 @@ 14274 10191 " Support Functions: {{{1 14275 10192 … … 14320 10237 if exists("s:winBeforeErr") 14321 10238 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')) 14323 10255 14324 10256 " restore window … … 14329 10261 endif 14330 10262 if v:shell_error == 0 14331 @@ -9055, 29 +9670,38@@10263 @@ -9055,64 +9785,111 @@ 14332 10264 14333 10265 " restore top-of-screen line … … 14339 10271 14340 10272 " restore position 14341 10273 - if exists("w:netrw_line") && exists("w:netrw_col") 14342 10274 -" 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."|") 14344 10278 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 14345 10300 endif 14346 10301 … … 14372 10327 -" call Decho("(NetrwSavePosn) currently, win#".w:netrw_winnr." line#".w:netrw_line." col#".w:netrw_col) 14373 10328 +" 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) 14374 10344 14375 10345 " Save top-of-screen line 14376 10346 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 + 14378 10354 " 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 14380 10357 14381 10358 - keepj call netrw#NetrwRestorePosn() … … 14428 10405 14429 10406 " --------------------------------------------------------------------- 14430 @@ -9179,7 +9 799,7 @@10407 @@ -9179,7 +9956,7 @@ 14431 10408 " call Dfunc("s:FileReadable(fname<".a:fname.">)") 14432 10409 … … 14437 10414 let ret= filereadable(a:fname) 14438 10415 endif 14439 @@ -9205,7 +9 825,7 @@10416 @@ -9205,7 +9982,7 @@ 14440 10417 14441 10418 " sanity check -- does the temporary file's directory exist? … … 14446 10423 " call Dret("s:GetTempfile getcwd<".getcwd().">") 14447 10424 return "" 14448 @@ -9217,7 +9 837,7 @@10425 @@ -9217,7 +9994,7 @@ 14449 10426 14450 10427 " o/s dependencies … … 14455 10432 if !exists("+shellslash") || !&ssl 14456 10433 let tmpfile = substitute(tmpfile,'/','\','g') 14457 @@ -9253,7 + 9873,7 @@10434 @@ -9253,7 +10030,7 @@ 14458 10435 endif 14459 10436 endif … … 14464 10441 return tmpfile 14465 10442 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 @@ 14467 10457 let &l:cursorcolumn = s:netrw_usercuc 14468 10458 if w:netrw_liststyle == s:WIDELIST … … 14473 10463 " call Decho("case g:netrw_cursor==2 and not wide: (use user's cul,cuc)") 14474 10464 let &l:cursorline = s:netrw_usercul 14475 @@ -9361,7 + 9981,7 @@10465 @@ -9361,7 +10142,7 @@ 14476 10466 " --------------------------------------------------------------------- 14477 10467 " s:RestoreCursorline: restores cursorline/cursorcolumn to original user settings {{{2 … … 14482 10472 let &l:cursorline = s:netrw_usercul 14483 10473 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!") 14485 10477 let netrw_keepdiff= &l:diff 14486 keepj keepalt enew! 10478 - keepj keepalt enew! 10479 + noswapfile keepj keepalt enew! 14487 10480 let &l:diff= netrw_keepdiff 14488 10481 -" call Decho("bufnr($)=".bufnr("$")) … … 14491 10484 14492 10485 " copy function-local-variables to buffer variable equivalents 14493 @@ -9459,7 +10 079,7 @@10486 @@ -9459,7 +10240,7 @@ 14494 10487 if b:netrw_curdir =~ '/$' 14495 10488 if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST … … 14500 10493 nno <silent> <buffer> ] :sil call <SID>TreeListMove(']')<cr> 14501 10494 else 14502 @@ -9468,7 +10 088,7 @@10495 @@ -9468,7 +10249,7 @@ 14503 10496 endif 14504 10497 endif … … 14509 10502 14510 10503 " --------------------------------------------------------------------- 14511 @@ -9499,6 +10 119,43 @@10504 @@ -9499,6 +10280,43 @@ 14512 10505 " call Dret("s:NetrwInsureWinVars win#".winnr()) 14513 10506 endfun … … 14539 10532 + call s:NetrwOptionRestore("w:") 14540 10533 +" call Decho("setl noma nomod nowrap") 14541 + setl noma nomod nowrap10534 + exe "setl ".g:netrw_bufsettings 14542 10535 +" call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") 14543 10536 + let a:newdir= dirname … … 14553 10546 " s:NetrwSaveWordPosn: used to keep cursor on same word after refresh, {{{2 14554 10547 " changed sorting, etc. Also see s:NetrwRestoreWordPosn(). 14555 @@ -9537,13 +10 194,19 @@10548 @@ -9537,13 +10355,19 @@ 14556 10549 fun! s:RemotePathAnalysis(dirname) 14557 10550 " call Dfunc("s:RemotePathAnalysis(a:dirname<".a:dirname.">)") … … 14565 10558 - let s:port = substitute(a:dirname,dirpat,'\4','') 14566 10559 - let s:path = substitute(a:dirname,dirpat,'\5','') 10560 - let s:fname = substitute(a:dirname,'^.*/\ze.','','') 14567 10561 + let s:user = substitute(a:dirname,dirpat,'\3','') 14568 10562 + let s:machine = substitute(a:dirname,dirpat,'\4','') 14569 10563 + let s:port = substitute(a:dirname,dirpat,'\5','') 14570 10564 + let s:path = substitute(a:dirname,dirpat,'\6','') 14571 let s:fname = substitute(a:dirname,'^.*/\ze.','','')10565 + let s:fname = substitute(s:path,'^.*/\ze.','','') 14572 10566 + if s:machine =~ '@' 14573 10567 + let dirpat = '^\(.*\)@\(.\{-}\)$' … … 14578 10572 " call Decho("set up s:method <".s:method .">") 14579 10573 " call Decho("set up s:user <".s:user .">") 14580 @@ -9620,33 +10 283,51 @@10574 @@ -9620,33 +10444,51 @@ 14581 10575 return 14582 10576 endif … … 14637 10631 " call Dfunc("s:SaveBufVars() buf#".bufnr("%")) 14638 10632 14639 @@ -9717,42 +10 398,48 @@10633 @@ -9717,42 +10559,48 @@ 14640 10634 endfun 14641 10635 … … 14708 10702 endfun 14709 10703 14710 @@ -9764,7 +10 451,7 @@10704 @@ -9764,7 +10612,7 @@ 14711 10705 let prvline = (line(".") > 1)? getline(line(".")-1) : '' 14712 10706 let nxtline = (line(".") < line("$"))? getline(line(".")+1) : '' … … 14717 10711 " call Decho("curline <".curline."> #".line(".")) 14718 10712 " call Decho("nxtline <".nxtline."> #".line(".")+1) 14719 @@ -9775,22 +10 462,22 @@10713 @@ -9775,22 +10623,22 @@ 14720 10714 " call Decho('regfile') 14721 10715 if a:dir == '[' && prvline != '' … … 14744 10738 endif 14745 10739 endif 14746 @@ -9798,11 +10 485,11 @@10740 @@ -9798,11 +10646,11 @@ 14747 10741 elseif a:dir == ']' && nxtline != '' 14748 10742 keepj norm! $ … … 14760 10754 diff -Naur vim74.orig/runtime/autoload/netrwSettings.vim vim74/runtime/autoload/netrwSettings.vim 14761 10755 --- vim74.orig/runtime/autoload/netrwSettings.vim 2013-05-03 19:53:43.000000000 +0000 14762 +++ vim74/runtime/autoload/netrwSettings.vim 2014-0 4-27 05:20:57.241746894+000010756 +++ vim74/runtime/autoload/netrwSettings.vim 2014-06-01 00:42:49.474209777 +0000 14763 10757 @@ -1,7 +1,7 @@ 14764 10758 " netrwSettings.vim: makes netrw settings simpler … … 14794 10788 diff -Naur vim74.orig/runtime/autoload/netrw_gitignore.vim vim74/runtime/autoload/netrw_gitignore.vim 14795 10789 --- vim74.orig/runtime/autoload/netrw_gitignore.vim 1970-01-01 00:00:00.000000000 +0000 14796 +++ vim74/runtime/autoload/netrw_gitignore.vim 2014-0 4-27 05:20:57.245080310+000010790 +++ vim74/runtime/autoload/netrw_gitignore.vim 2014-06-01 00:42:49.487543077 +0000 14797 10791 @@ -0,0 +1,71 @@ 14798 10792 +" netrw_gitignore#Hide: gitignore-based hiding … … 14869 10863 diff -Naur vim74.orig/runtime/autoload/phpcomplete.vim vim74/runtime/autoload/phpcomplete.vim 14870 10864 --- vim74.orig/runtime/autoload/phpcomplete.vim 2011-12-08 15:38:25.000000000 +0000 14871 +++ vim74/runtime/autoload/phpcomplete.vim 2014-0 4-27 05:20:57.248413727+000014872 @@ -1,27 +1, 99@@10865 +++ vim74/runtime/autoload/phpcomplete.vim 2014-06-01 00:42:49.544209599 +0000 10866 @@ -1,27 +1,101 @@ 14873 10867 " Vim completion script 14874 10868 " Language: PHP … … 14877 10871 +" Maintainer: Dávid Szabó ( complex857 AT gmail DOT com ) 14878 10872 +" Previous Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl ) 10873 +" URL: https://github.com/shawncplus/phpcomplete.vim 10874 +" Last Change: 2014 May 08 14879 10875 " 14880 10876 -" TODO: … … 14901 10897 +" and generally not much more accurate then simple keyword completion. 14902 10898 +" 14903 +" let 10899 +" let g:phpcomplete_search_tags_for_variables = 1/0 [default 0] 14904 10900 +" Enables use of tags when the plugin tries to find variables. 14905 10901 +" When enabled the plugin will search for the variables in the tag files with kind 'v', … … 14984 10980 14985 10981 if phpbegin == [0,0] && phpend == [0,0] 14986 @@ -37,5116 +1 09,2449 @@10982 @@ -37,5116 +111,2449 @@ 14987 10983 let start = col('.') - 1 14988 10984 let curline = line('.') … … 15025 11021 + " chop of the "base" from the end of the current instruction 15026 11022 + 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]*$', '', '') 15028 11024 + end 15029 11025 + end … … 21425 17421 + if line =~# '^\s*'.object.'\s*=\s*new\s\+'.class_name_pattern && !object_is_array 21426 17422 + 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) 21427 17424 + break 21428 17425 + endif … … 21431 17428 + if line =~# '^\s*'.object.'\s*=&\?\s*'.class_name_pattern.'\s*::\s*getInstance' && !object_is_array 21432 17429 + 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) 21433 17431 + break 21434 17432 + endif … … 21694 17692 + return no_namespace_candidate 21695 17693 + endif 21696 +endif21697 +21698 17694 +endfunction 21699 17695 +" }}} … … 22430 18426 diff -Naur vim74.orig/runtime/colors/README.txt vim74/runtime/colors/README.txt 22431 18427 --- vim74.orig/runtime/colors/README.txt 2010-05-15 11:03:31.000000000 +0000 22432 +++ vim74/runtime/colors/README.txt 2014-0 4-27 05:20:57.261747391+000018428 +++ vim74/runtime/colors/README.txt 2014-06-01 00:42:49.970875179 +0000 22433 18429 @@ -36,6 +36,14 @@ 22434 18430 removed in your color scheme. Use something like "gui=NONE" to remove the … … 22448 18444 diff -Naur vim74.orig/runtime/colors/delek.vim vim74/runtime/colors/delek.vim 22449 18445 --- vim74.orig/runtime/colors/delek.vim 2010-05-15 11:03:31.000000000 +0000 22450 +++ vim74/runtime/colors/delek.vim 2014-0 4-27 05:20:57.261747391+000018446 +++ vim74/runtime/colors/delek.vim 2014-06-01 00:42:50.027541702 +0000 22451 18447 @@ -1,10 +1,10 @@ 22452 18448 " Vim color file … … 22478 18474 diff -Naur vim74.orig/runtime/colors/industry.vim vim74/runtime/colors/industry.vim 22479 18475 --- vim74.orig/runtime/colors/industry.vim 1970-01-01 00:00:00.000000000 +0000 22480 +++ vim74/runtime/colors/industry.vim 2014-0 4-27 05:20:57.265080808+000018476 +++ vim74/runtime/colors/industry.vim 2014-06-01 00:42:50.067541600 +0000 22481 18477 @@ -0,0 +1,40 @@ 22482 18478 +" Vim color file … … 22522 18518 diff -Naur vim74.orig/runtime/compiler/gcc.vim vim74/runtime/compiler/gcc.vim 22523 18519 --- vim74.orig/runtime/compiler/gcc.vim 2011-12-15 20:20:22.000000000 +0000 22524 +++ vim74/runtime/compiler/gcc.vim 2014-0 4-27 05:20:57.275081056+000018520 +++ vim74/runtime/compiler/gcc.vim 2014-06-01 00:42:50.447540632 +0000 22525 18521 @@ -25,10 +25,10 @@ 22526 18522 \%f:%l:\ %tarning:\ %m, … … 22540 18536 diff -Naur vim74.orig/runtime/doc/autocmd.txt vim74/runtime/doc/autocmd.txt 22541 18537 --- vim74.orig/runtime/doc/autocmd.txt 2013-08-10 11:24:52.000000000 +0000 22542 +++ vim74/runtime/doc/autocmd.txt 2014-0 4-27 05:20:57.295081553+000018538 +++ vim74/runtime/doc/autocmd.txt 2014-06-01 00:42:51.010872531 +0000 22543 18539 @@ -1,4 +1,4 @@ 22544 18540 -*autocmd.txt* For Vim version 7.4. Last change: 2013 Aug 04 22545 +*autocmd.txt* For Vim version 7.4. Last change: 2014 Jan 2318541 +*autocmd.txt* For Vim version 7.4. Last change: 2014 May 02 22546 18542 22547 18543 … … 22570 18566 *CompleteDone* 22571 18567 CompleteDone After Insert mode completion is done. Either 22572 @@ -553, 6 +562,9@@18568 @@ -553,11 +562,15 @@ 22573 18569 It is not allowed to change to another buffer 22574 18570 here. You can reload the buffer but not edit … … 22580 18576 FileChangedShell When Vim notices that the modification time of 22581 18577 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 @@ 22583 18586 command is run, before jumping to the first 22584 18587 location. For |:cfile| and |:lfile| commands … … 22591 18594 diff -Naur vim74.orig/runtime/doc/change.txt vim74/runtime/doc/change.txt 22592 18595 --- vim74.orig/runtime/doc/change.txt 2013-08-10 11:24:52.000000000 +0000 22593 +++ vim74/runtime/doc/change.txt 2014-0 4-27 05:20:57.295081553+000018596 +++ vim74/runtime/doc/change.txt 2014-06-01 00:42:51.047539105 +0000 22594 18597 @@ -1,4 +1,4 @@ 22595 18598 -*change.txt* For Vim version 7.4. Last change: 2013 Jul 17 … … 22660 18663 diff -Naur vim74.orig/runtime/doc/cmdline.txt vim74/runtime/doc/cmdline.txt 22661 18664 --- vim74.orig/runtime/doc/cmdline.txt 2013-08-10 11:24:52.000000000 +0000 22662 +++ vim74/runtime/doc/cmdline.txt 2014-0 4-27 05:20:57.298414969+000018665 +++ vim74/runtime/doc/cmdline.txt 2014-06-01 00:42:51.080872353 +0000 22663 18666 @@ -1,4 +1,4 @@ 22664 18667 -*cmdline.txt* For Vim version 7.4. Last change: 2013 Mar 16 … … 22710 18713 diff -Naur vim74.orig/runtime/doc/develop.txt vim74/runtime/doc/develop.txt 22711 18714 --- vim74.orig/runtime/doc/develop.txt 2013-08-10 11:24:52.000000000 +0000 22712 +++ vim74/runtime/doc/develop.txt 2014-0 4-27 05:20:57.298414969+000018715 +++ vim74/runtime/doc/develop.txt 2014-06-01 00:42:51.124205576 +0000 22713 18716 @@ -1,4 +1,4 @@ 22714 18717 -*develop.txt* For Vim version 7.4. Last change: 2013 Apr 27 … … 22727 18730 diff -Naur vim74.orig/runtime/doc/diff.txt vim74/runtime/doc/diff.txt 22728 18731 --- vim74.orig/runtime/doc/diff.txt 2013-08-10 11:24:52.000000000 +0000 22729 +++ vim74/runtime/doc/diff.txt 2014-0 4-27 05:20:57.301748385+000018732 +++ vim74/runtime/doc/diff.txt 2014-06-01 00:42:51.130872226 +0000 22730 18733 @@ -1,4 +1,4 @@ 22731 18734 -*diff.txt* For Vim version 7.4. Last change: 2013 Jul 07 22732 +*diff.txt* For Vim version 7.4. Last change: 201 3 Sep2018735 +*diff.txt* For Vim version 7.4. Last change: 2014 May 20 22733 18736 22734 18737 22735 18738 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". 22736 18748 @@ -123,10 +123,14 @@ 22737 18749 file for a moment and come back to the same file and be in diff mode again. … … 22753 18765 diff -Naur vim74.orig/runtime/doc/digraph.txt vim74/runtime/doc/digraph.txt 22754 18766 --- vim74.orig/runtime/doc/digraph.txt 2013-08-10 11:24:52.000000000 +0000 22755 +++ vim74/runtime/doc/digraph.txt 2014-0 4-27 05:20:57.301748385+000018767 +++ vim74/runtime/doc/digraph.txt 2014-06-01 00:42:51.154205500 +0000 22756 18768 @@ -1,4 +1,4 @@ 22757 18769 -*digraph.txt* For Vim version 7.4. Last change: 2011 Jan 15 22758 +*digraph.txt* For Vim version 7.4. Last change: 201 3 Dec 1218770 +*digraph.txt* For Vim version 7.4. Last change: 2014 Apr 17 22759 18771 22760 18772 … … 22769 18781 Percent sign % Greek/Cyrillic special 22770 18782 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 22771 18793 diff -Naur vim74.orig/runtime/doc/editing.txt vim74/runtime/doc/editing.txt 22772 18794 --- vim74.orig/runtime/doc/editing.txt 2013-08-10 11:24:53.000000000 +0000 22773 +++ vim74/runtime/doc/editing.txt 2014-0 4-27 05:20:57.301748385+000018795 +++ vim74/runtime/doc/editing.txt 2014-06-01 00:42:51.197538723 +0000 22774 18796 @@ -1,4 +1,4 @@ 22775 18797 -*editing.txt* For Vim version 7.4. Last change: 2013 Aug 03 22776 +*editing.txt* For Vim version 7.4. Last change: 201 3 Nov 2518798 +*editing.txt* For Vim version 7.4. Last change: 2014 May 02 22777 18799 22778 18800 … … 22786 18808 *:keepalt* *:keepa* 22787 18809 :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 22788 18834 diff -Naur vim74.orig/runtime/doc/eval.txt vim74/runtime/doc/eval.txt 22789 18835 --- vim74.orig/runtime/doc/eval.txt 2013-08-10 11:24:53.000000000 +0000 22790 +++ vim74/runtime/doc/eval.txt 2014-0 4-27 05:20:57.308415217+000018836 +++ vim74/runtime/doc/eval.txt 2014-06-01 00:42:51.230871971 +0000 22791 18837 @@ -1,4 +1,4 @@ 22792 18838 -*eval.txt* For Vim version 7.4. Last change: 2013 Aug 03 22793 +*eval.txt* For Vim version 7.4. Last change: 2014 Apr 0618839 +*eval.txt* For Vim version 7.4. Last change: 2014 May 07 22794 18840 22795 18841 … … 22895 18941 version 5.0 and 5.1 may have a patch 123, but these are 22896 18942 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 @@ 22898 18953 bufwinnr( {expr}) Number window number of buffer {expr} 22899 18954 byte2line( {byte}) Number line number at byte count {byte} … … 22903 18958 any call {func} with arguments {arglist} 22904 18959 ceil( {expr}) Float round {expr} up 22905 @@ -1735,7 +175 6,7 @@18960 @@ -1735,7 +1758,7 @@ 22906 18961 cursor( {lnum}, {col} [, {coladd}]) 22907 18962 Number move cursor to {lnum}, {col}, {coladd} … … 22912 18967 did_filetype() Number TRUE if FileType autocommand event used 22913 18968 diff_filler( {lnum}) Number diff filler lines about {lnum} 22914 @@ -1745,6 +176 6,7 @@18969 @@ -1745,6 +1768,7 @@ 22915 18970 eval( {string}) any evaluate {string} into its value 22916 18971 eventhandler( ) Number TRUE if inside an event handler … … 22920 18975 extend( {expr1}, {expr2} [, {expr3}]) 22921 18976 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 @@ 22923 18991 getpid() Number process ID of Vim 22924 18992 getpos( {expr}) List position of cursor, mark, etc. … … 22930 18998 gettabvar( {nr}, {varname} [, {def}]) 22931 18999 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 @@ 22933 19010 Number last index of {needle} in {haystack} 22934 19011 strtrans( {expr}) String translate string to make it printable … … 22940 19017 String all {pat} in {expr} replaced with {sub} 22941 19018 synID( {lnum}, {col}, {trans}) Number syntax ID at {lnum} and {col} 22942 @@ -1978,6 +200 2,7 @@19019 @@ -1978,6 +2005,7 @@ 22943 19020 synconcealed( {lnum}, {col}) List info about concealing 22944 19021 synstack( {lnum}, {col}) List stack of syntax IDs at {lnum} and {col} … … 22948 19025 tabpagenr( [{arg}]) Number number of current or last tab page 22949 19026 tabpagewinnr( {tabarg}[, {arg}]) 22950 @@ -1995,6 +202 0,8 @@19027 @@ -1995,6 +2023,8 @@ 22951 19028 type( {name}) Number type of variable {name} 22952 19029 undofile( {name}) String undo file name for {name} … … 22957 19034 virtcol( {expr}) Number screen column of cursor or mark 22958 19035 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 @@ 22960 19056 {expr}. Use zero for the first character, it returns zero. 22961 19057 This function is only useful when there are multibyte … … 22969 19065 echo matchstr(str, ".", byteidx(str, 3)) 22970 19066 < will display the fourth character. Another way to do the 22971 @@ -2269,7 +2 299,20 @@19067 @@ -2269,7 +2314,20 @@ 22972 19068 echo strpart(s, 0, byteidx(s, 1)) 22973 19069 < If there are less than {nr} characters -1 is returned. … … 22991 19087 call({func}, {arglist} [, {dict}]) *call()* *E699* 22992 19088 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 @@ 22994 19116 0 does not exist 22995 19117 -1 not implemented on this system … … 23007 19129 exists({expr}) The result is a Number, which is non-zero if {expr} is 23008 19130 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 @@ 23010 19142 <afile> autocmd file name 23011 19143 <abuf> autocmd buffer number (as a String!) … … 23016 19148 <cword> word under the cursor 23017 19149 <cWORD> WORD under the cursor 23018 @@ -3175,7 +32 27,7 @@19150 @@ -3175,7 +3250,7 @@ 23019 19151 If [expr] is 1, only check if a character is available, it is 23020 19152 not consumed. Return zero if no character available. … … 23025 19157 result is a number. Use nr2char() to convert it to a String. 23026 19158 Otherwise a String is returned with the encoded character. 23027 @@ -3185,7 +32 37,7 @@19159 @@ -3185,7 +3260,7 @@ 23028 19160 String when a modifier (shift, control, alt) was used that is 23029 19161 not included in the character. … … 23034 19166 Use nr2char() to convert it to a String. 23035 19167 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 @@ 23037 19187 :endfor 23038 19188 … … 23043 19193 {regname}. Example: > 23044 19194 :let cliptext = getreg('*') 23045 @@ -3426,6 +3 478,11 @@19195 @@ -3426,6 +3512,11 @@ 23046 19196 getreg('=', 1) returns the expression itself, so that it can 23047 19197 be restored with |setreg()|. For other registers the extra … … 23055 19205 23056 19206 23057 @@ -3435,7 +3 492,7 @@19207 @@ -3435,7 +3526,7 @@ 23058 19208 "v" for |characterwise| text 23059 19209 "V" for |linewise| text … … 23064 19214 If {regname} is not specified, |v:register| is used. 23065 19215 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 @@ 23067 19253 (|mapmode-ic|) 23068 19254 "sid" The script local ID, used for <sid> mappings … … 23073 19259 The mappings local to the current buffer are checked first, 23074 19260 then the global mappings. 23075 @@ -4210,6 +4 269,9 @@19261 @@ -4210,6 +4312,9 @@ 23076 19262 "match"). It will be highlighted with {group}. Returns an 23077 19263 identification number (ID), which can be used to delete the … … 23083 19269 The optional {priority} argument assigns a priority to the 23084 19270 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 @@ 23086 19282 it is the offset in screen columns from the start of the 23087 19283 character. E.g., a position within a <Tab> or after the last 23088 19284 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()|. 23089 19290 + Note that for '< and '> Visual mode matters: when it is "V" 23090 19291 + (visual line mode) the column of '< is zero and the column of 23091 19292 + '> 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 @@ 23096 19313 character. E.g., a position within a <Tab> or after the last 23097 19314 character. 23098 19315 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 + 23099 19322 + Note that for '< and '> changing the line number may result in 23100 19323 + the marks to be effectively be swapped, so that '< is always … … 23104 19327 An error message is given if {expr} is invalid. 23105 19328 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 @@ 23107 19342 *setreg()* 23108 19343 setreg({regname}, {value} [,{options}]) … … 23113 19348 then the value is appended. 23114 19349 {options} can also contain a register type specification: 23115 @@ -5312,10 +5 383,15 @@19350 @@ -5312,10 +5437,15 @@ 23116 19351 in the longest line (counting a <Tab> as 1 character). 23117 19352 … … 23133 19368 Examples: > 23134 19369 :call setreg(v:register, @*) 23135 @@ -5323,8 +5 399,11 @@19370 @@ -5323,8 +5453,11 @@ 23136 19371 :call setreg('a', "1\n2\n3", 'b5') 23137 19372 … … 23147 19382 .... 23148 19383 :call setreg('a', var_a, var_amode) 23149 @@ -5390,6 +5 469,7 @@19384 @@ -5390,6 +5523,7 @@ 23150 19385 < This results in a directory listing for the file under the 23151 19386 cursor. Example of use with |system()|: > … … 23155 19390 23156 19391 shiftwidth() *shiftwidth()* 23157 @@ -5449,20 +55 29,26 @@19392 @@ -5449,20 +5583,26 @@ 23158 19393 23159 19394 … … 23186 19421 func MyCompare(i1, i2) 23187 19422 return a:i1 == a:i2 ? 0 : a:i1 > a:i2 ? 1 : -1 23188 @@ -5604,7 +5 690,7 @@19423 @@ -5604,7 +5744,7 @@ 23189 19424 23190 19425 strdisplaywidth({expr}[, {col}]) *strdisplaywidth()* … … 23195 19430 screen column where to start. This matters for Tab 23196 19431 characters. 23197 @@ -5729,12 +58 15,23 @@19432 @@ -5729,12 +5869,23 @@ 23198 19433 Ambiguous, this function's return value depends on 'ambiwidth'. 23199 19434 Also see |strlen()|, |strdisplaywidth()| and |strchars()|. … … 23220 19455 :s/\d\+/\=submatch(0) + 1/ 23221 19456 < This finds the first number in the line and adds one to it. 23222 @@ -5867,19 + 5964,29 @@19457 @@ -5867,19 +6018,29 @@ 23223 19458 valid positions. 23224 19459 … … 23259 19494 < To make the result more system-independent, the shell output 23260 19495 is filtered to replace <CR> with <NL> for Macintosh, and 23261 @@ -5906,6 +60 13,16 @@19496 @@ -5906,6 +6067,16 @@ 23262 19497 Use |:checktime| to force a check. 23263 19498 … … 23276 19511 The result is a |List|, where each item is the number of the 23277 19512 buffer associated with each window in the current tab page. 23278 @@ -5928,7 +60 45,7 @@19513 @@ -5928,7 +6099,7 @@ 23279 19514 The number can be used with the |:tab| command. 23280 19515 … … 23285 19520 {tabarg} specifies the number of tab page to be used. 23286 19521 {arg} is used like with |winnr()|: 23287 @@ -6128,6 +62 45,14 @@19522 @@ -6128,6 +6299,14 @@ 23288 19523 blocks. Each item may again have an "alt" 23289 19524 item. … … 23300 19535 Return a |List| with all the values of {dict}. The |List| is 23301 19536 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 @@ 23303 19566 Example: > 23304 19567 :if has("gui_running") … … 23314 19577 -< Note that it's possible for patch 147 to be omitted even though 148 is 23315 19578 +< 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 23316 19588 included. 23317 19589 23318 +4. Beyond a certain version or at a certain version and including a specific23319 + patch. The "patch-7.4.123" feature means that the Vim version is 7.5 or23320 + 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 is23324 + included.23325 +23326 19590 +acl Compiled with |ACL| support. 23327 19591 all_builtin_terms Compiled with all builtin terminals enabled. 23328 19592 amiga Amiga version of Vim. 23329 19593 arabic Compiled with Arabic support |Arabic|. 23330 @@ -6503,7 +6 638,9 @@19594 @@ -6503,7 +6705,9 @@ 23331 19595 writebackup Compiled with 'writebackup' default on. 23332 19596 xfontset Compiled with X fontset support |xfontset|. … … 23339 19603 xsmp_interact Compiled with interactive X session management support. 23340 19604 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* 23342 19620 :fu[nction][!] {name}([arguments]) [range] [abort] [dict] 23343 19621 Define a new function by the name {name}. The name 23344 19622 must be made of alphanumeric characters and '_', and 23345 19623 - 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). 23348 19629 23349 19630 {name} can also be a |Dictionary| entry that is a 23350 19631 |Funcref|: > 23351 @@ -6599,7 +6 737,7 @@19632 @@ -6599,7 +6809,7 @@ 23352 19633 23353 19634 For the {arguments} see |function-argument|. … … 23358 19639 expected to take care of a range itself. The range is 23359 19640 passed as "a:firstline" and "a:lastline". If [range] 23360 @@ -6608,10 +6 746,10 @@19641 @@ -6608,10 +6818,10 @@ 23361 19642 of each line. See |function-range-example|. 23362 19643 The cursor is still moved to the first line of the … … 23371 19652 be invoked through an entry in a |Dictionary|. The 23372 19653 local variable "self" will then be set to the 23373 @@ -7273,6 +74 11,8 @@19654 @@ -7273,6 +7483,8 @@ 23374 19655 {pattern}, so long as it does not have a special 23375 19656 meaning (e.g., '|' or '"') and doesn't occur inside … … 23380 19661 an error message because it may vary in different 23381 19662 locales. 23382 @@ -7416,13 +7 556,22 @@19663 @@ -7416,13 +7628,22 @@ 23383 19664 for Vim commands, |shellescape()| for |:!| commands. 23384 19665 Examples: > … … 23410 19691 diff -Naur vim74.orig/runtime/doc/filetype.txt vim74/runtime/doc/filetype.txt 23411 19692 --- vim74.orig/runtime/doc/filetype.txt 2013-08-10 11:24:53.000000000 +0000 23412 +++ vim74/runtime/doc/filetype.txt 2014-0 4-27 05:20:57.315082050 +000019693 +++ vim74/runtime/doc/filetype.txt 2014-06-01 00:42:51.354204990 +0000 23413 19694 @@ -1,4 +1,4 @@ 23414 19695 -*filetype.txt* For Vim version 7.4. Last change: 2013 May 25 … … 23448 19729 diff -Naur vim74.orig/runtime/doc/fold.txt vim74/runtime/doc/fold.txt 23449 19730 --- vim74.orig/runtime/doc/fold.txt 2013-08-10 11:24:53.000000000 +0000 23450 +++ vim74/runtime/doc/fold.txt 2014-0 4-27 05:20:57.315082050+000019731 +++ vim74/runtime/doc/fold.txt 2014-06-01 00:42:51.370871615 +0000 23451 19732 @@ -1,4 +1,4 @@ 23452 19733 -*fold.txt* For Vim version 7.4. Last change: 2010 May 13 … … 23471 19752 diff -Naur vim74.orig/runtime/doc/gui.txt vim74/runtime/doc/gui.txt 23472 19753 --- vim74.orig/runtime/doc/gui.txt 2013-08-10 11:24:53.000000000 +0000 23473 +++ vim74/runtime/doc/gui.txt 2014-0 4-27 05:20:57.318415466+000019754 +++ vim74/runtime/doc/gui.txt 2014-06-01 00:42:51.410871513 +0000 23474 19755 @@ -1,4 +1,4 @@ 23475 19756 -*gui.txt* For Vim version 7.4. Last change: 2013 Jun 12 … … 23501 19782 diff -Naur vim74.orig/runtime/doc/gui_x11.txt vim74/runtime/doc/gui_x11.txt 23502 19783 --- vim74.orig/runtime/doc/gui_x11.txt 2013-08-10 11:24:54.000000000 +0000 23503 +++ vim74/runtime/doc/gui_x11.txt 2014-0 4-27 05:20:57.318415466 +000019784 +++ vim74/runtime/doc/gui_x11.txt 2014-06-01 00:42:51.460871386 +0000 23504 19785 @@ -1,4 +1,4 @@ 23505 19786 -*gui_x11.txt* For Vim version 7.4. Last change: 2011 Sep 14 … … 23519 19800 diff -Naur vim74.orig/runtime/doc/if_lua.txt vim74/runtime/doc/if_lua.txt 23520 19801 --- vim74.orig/runtime/doc/if_lua.txt 2013-08-10 11:24:55.000000000 +0000 23521 +++ vim74/runtime/doc/if_lua.txt 2014-0 4-27 05:20:57.321748882+000019802 +++ vim74/runtime/doc/if_lua.txt 2014-06-01 00:42:51.564204456 +0000 23522 19803 @@ -1,4 +1,4 @@ 23523 19804 -*if_lua.txt* For Vim version 7.4. Last change: 2012 Jun 29 … … 23537 19818 diff -Naur vim74.orig/runtime/doc/if_perl.txt vim74/runtime/doc/if_perl.txt 23538 19819 --- vim74.orig/runtime/doc/if_perl.txt 2013-08-10 11:24:55.000000000 +0000 23539 +++ vim74/runtime/doc/if_perl.txt 2014-0 4-27 05:20:57.325082297+000019820 +++ vim74/runtime/doc/if_perl.txt 2014-06-01 00:42:51.620870978 +0000 23540 19821 @@ -1,4 +1,4 @@ 23541 19822 -*if_perl.txt* For Vim version 7.4. Last change: 2012 Oct 25 … … 23546 19827 diff -Naur vim74.orig/runtime/doc/indent.txt vim74/runtime/doc/indent.txt 23547 19828 --- vim74.orig/runtime/doc/indent.txt 2013-08-10 11:24:56.000000000 +0000 23548 +++ vim74/runtime/doc/indent.txt 2014-0 4-27 05:20:57.328415713+000019829 +++ vim74/runtime/doc/indent.txt 2014-06-01 00:42:51.750870647 +0000 23549 19830 @@ -1,4 +1,4 @@ 23550 19831 -*indent.txt* For Vim version 7.4. Last change: 2013 Aug 03 23551 +*indent.txt* For Vim version 7.4. Last change: 201 3 Nov 0519832 +*indent.txt* For Vim version 7.4. Last change: 2014 Apr 23 23552 19833 23553 19834 … … 23635 19916 FORTRAN *ft-fortran-indent* 23636 19917 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 23637 19972 diff -Naur vim74.orig/runtime/doc/index.txt vim74/runtime/doc/index.txt 23638 19973 --- vim74.orig/runtime/doc/index.txt 2013-08-10 11:24:56.000000000 +0000 23639 +++ vim74/runtime/doc/index.txt 2014-0 4-27 05:20:57.331749130+000019974 +++ vim74/runtime/doc/index.txt 2014-06-01 00:42:51.770870596 +0000 23640 19975 @@ -1,4 +1,4 @@ 23641 19976 -*index.txt* For Vim version 7.4. Last change: 2013 Jul 17 … … 23697 20032 diff -Naur vim74.orig/runtime/doc/map.txt vim74/runtime/doc/map.txt 23698 20033 --- vim74.orig/runtime/doc/map.txt 2013-08-10 11:24:56.000000000 +0000 23699 +++ vim74/runtime/doc/map.txt 2014-0 4-27 05:20:57.335082547+000020034 +++ vim74/runtime/doc/map.txt 2014-06-01 00:42:51.837537093 +0000 23700 20035 @@ -1,4 +1,4 @@ 23701 20036 -*map.txt* For Vim version 7.4. Last change: 2013 Aug 03 23702 +*map.txt* For Vim version 7.4. Last change: 201 3 Aug 2220037 +*map.txt* For Vim version 7.4. Last change: 2014 May 10 23703 20038 23704 20039 23705 20040 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 @@ 23707 20084 The simplest way to load a set of related language mappings is by using the 23708 20085 'keymap' option. See |45.5|. … … 23713 20090 search pattern) the mappings are disabled until a CTRL-^ is typed. The state 23714 20091 last used is remembered for Insert mode and Search patterns separately. The 23715 @@ -593,7 + 593,7 @@20092 @@ -593,7 +605,7 @@ 23716 20093 When you have a mapping that contains an Ex command, you need to put a line 23717 20094 terminator after it to have it executed. The use of <CR> is recommended for … … 23722 20099 To avoid mapping of the characters you type in insert or Command-line mode, 23723 20100 type a CTRL-V first. The mapping in Insert mode is disabled if the 'paste' 23724 @@ -1359,6 +13 59,8 @@20101 @@ -1359,6 +1371,8 @@ 23725 20102 In the cases of the -count and -register attributes, if the optional argument 23726 20103 is supplied, it is removed from the argument list and is available to the … … 23733 20110 diff -Naur vim74.orig/runtime/doc/motion.txt vim74/runtime/doc/motion.txt 23734 20111 --- vim74.orig/runtime/doc/motion.txt 2013-08-10 11:24:57.000000000 +0000 23735 +++ vim74/runtime/doc/motion.txt 2014-0 4-27 05:20:57.338415962+000020112 +++ vim74/runtime/doc/motion.txt 2014-06-01 00:42:51.920870214 +0000 23736 20113 @@ -1,4 +1,4 @@ 23737 20114 -*motion.txt* For Vim version 7.4. Last change: 2013 Jul 17 … … 23751 20128 diff -Naur vim74.orig/runtime/doc/options.txt vim74/runtime/doc/options.txt 23752 20129 --- vim74.orig/runtime/doc/options.txt 2013-08-10 11:24:57.000000000 +0000 23753 +++ vim74/runtime/doc/options.txt 2014-0 4-27 05:20:57.345082794+000020130 +++ vim74/runtime/doc/options.txt 2014-06-01 00:42:51.970870087 +0000 23754 20131 @@ -1,4 +1,4 @@ 23755 20132 -*options.txt* For Vim version 7.4. Last change: 2013 Jul 09 23756 +*options.txt* For Vim version 7.4. Last change: 2014 Ma r 2320133 +*options.txt* For Vim version 7.4. Last change: 2014 May 13 23757 20134 23758 20135 … … 23787 20164 global 23788 20165 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,Ï 20175 y,ζz 20176 @@ -4629,7 +4631,7 @@ 23790 20177 23791 20178 *'lispwords'* *'lw'* … … 23796 20183 {not available when compiled without the |+lispindent| 23797 20184 feature} 23798 @@ -4757,8 +475 7,9 @@20185 @@ -4757,8 +4759,9 @@ 23799 20186 global or local to buffer |global-local| 23800 20187 {not in Vi} … … 23808 20195 about including spaces and backslashes. 23809 20196 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 @@ 23811 20208 region by listing them: "en_us,en_ca" supports both US and Canadian 23812 20209 English, but not words specific for Australia, New Zealand or Great … … 23818 20215 As a special case the name of a .spl file can be given as-is. The 23819 20216 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 @@ 23821 20229 immediately deleted. When 'swapfile' is set, and 'updatecount' is 23822 20230 non-zero, a swap file is immediately created. … … 23827 20235 This option is used together with 'bufhidden' and 'buftype' to 23828 20236 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 @@ 23830 20299 *'undolevels'* *'ul'* 23831 20300 'undolevels' 'ul' number (default 100, 1000 for Unix, VMS, … … 23836 20305 Maximum number of changes that can be undone. Since undo information 23837 20306 is kept in memory, higher numbers will cause more memory to be used 23838 @@ -7605,8 +76 11,9 @@20307 @@ -7605,8 +7626,9 @@ 23839 20308 < But you can also get Vi compatibility by including the 'u' flag in 23840 20309 'cpoptions', and still be able to use CTRL-R to repeat undo. … … 23850 20319 diff -Naur vim74.orig/runtime/doc/os_vms.txt vim74/runtime/doc/os_vms.txt 23851 20320 --- vim74.orig/runtime/doc/os_vms.txt 2013-08-10 11:24:59.000000000 +0000 23852 +++ vim74/runtime/doc/os_vms.txt 2014-0 4-27 05:20:57.351749627+000020321 +++ vim74/runtime/doc/os_vms.txt 2014-06-01 00:42:52.130869680 +0000 23853 20322 @@ -1,4 +1,4 @@ 23854 20323 -*os_vms.txt* For Vim version 7.4. Last change: 2011 Aug 14 … … 23891 20360 diff -Naur vim74.orig/runtime/doc/os_win32.txt vim74/runtime/doc/os_win32.txt 23892 20361 --- vim74.orig/runtime/doc/os_win32.txt 2013-08-10 11:24:59.000000000 +0000 23893 +++ vim74/runtime/doc/os_win32.txt 2014-0 4-27 05:20:57.351749627+000020362 +++ vim74/runtime/doc/os_win32.txt 2014-06-01 00:42:52.144202979 +0000 23894 20363 @@ -93,7 +93,7 @@ 23895 20364 $PATH *win32-PATH* … … 23903 20372 diff -Naur vim74.orig/runtime/doc/pattern.txt vim74/runtime/doc/pattern.txt 23904 20373 --- vim74.orig/runtime/doc/pattern.txt 2013-08-10 11:24:59.000000000 +0000 23905 +++ vim74/runtime/doc/pattern.txt 2014-0 4-27 05:20:57.351749627+000020374 +++ vim74/runtime/doc/pattern.txt 2014-06-01 00:42:52.164202928 +0000 23906 20375 @@ -1,4 +1,4 @@ 23907 20376 -*pattern.txt* For Vim version 7.4. Last change: 2013 Jul 06 23908 +*pattern.txt* For Vim version 7.4. Last change: 2014 Feb 0820377 +*pattern.txt* For Vim version 7.4. Last change: 2014 May 13 23909 20378 23910 20379 … … 23923 20392 etc. 23924 20393 < 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 "caÌ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 23925 20425 diff -Naur vim74.orig/runtime/doc/pi_getscript.txt vim74/runtime/doc/pi_getscript.txt 23926 20426 --- vim74.orig/runtime/doc/pi_getscript.txt 2013-08-10 11:24:59.000000000 +0000 23927 +++ vim74/runtime/doc/pi_getscript.txt 2014-0 4-27 05:20:57.355083042+000020427 +++ vim74/runtime/doc/pi_getscript.txt 2014-06-01 00:42:52.197536177 +0000 23928 20428 @@ -1,4 +1,4 @@ 23929 20429 -*pi_getscript.txt* For Vim version 7.4. Last change: 2012 Apr 07 … … 23945 20445 diff -Naur vim74.orig/runtime/doc/pi_netrw.txt vim74/runtime/doc/pi_netrw.txt 23946 20446 --- vim74.orig/runtime/doc/pi_netrw.txt 2013-08-10 11:24:59.000000000 +0000 23947 +++ vim74/runtime/doc/pi_netrw.txt 2014-0 4-27 05:20:57.358416459+000020447 +++ vim74/runtime/doc/pi_netrw.txt 2014-06-01 00:42:52.234202750 +0000 23948 20448 @@ -1,4 +1,4 @@ 23949 20449 -*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 Ma r 2020450 +*pi_netrw.txt* For Vim version 7.4. Last change: 2014 May 13 23951 20451 23952 20452 ------------------------------------------------ … … 23969 20469 Browsing With A New Tab.............................|netrw-t| 23970 20470 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 23971 20489 @@ -192,21 +193,22 @@ 23972 20490 … … 24017 20535 READING *netrw-read* *netrw-nread* {{{2 24018 20536 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 @@ 24020 20634 ------------------------ 24021 20635 Option Type Setting Meaning … … 24027 20641 =1 userid set by "userid" 24028 20642 NetReadFixup function =doesn't exist no change 24029 @@ -825,17 +8 29,18 @@20643 @@ -825,17 +831,18 @@ 24030 20644 read via ftp automatically 24031 20645 transformed however they wish … … 24057 20671 < 24058 20672 *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> 24060 20712 mapping defined before netrw is autoloaded, 24061 20713 then a double clicked leftmouse button will return … … 24081 20733 :Pexplore[!] [dir] Vertical Split & Explore...............|netrw-explore| 24082 20734 :Rexplore Return to Explorer.....................|netrw-explore| 24083 @@ -1171,6 +118 0,12 @@20735 @@ -1171,6 +1182,12 @@ 24084 20736 always refresh directory listing buffers by pressing ctrl-L (see 24085 20737 |netrw-ctrl-l|). … … 24094 20746 Related topics: |netrw-o| |netrw-p| |netrw-P| |netrw-t| |netrw-v| 24095 20747 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 @@ 24097 20776 slots. 24098 20777 … … 24112 20791 24113 20792 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 @@ 24115 20827 24116 20828 … … 24168 20880 By default, these commands use the current file's directory. However, one may 24169 20881 explicitly provide a directory (path) to use. 24170 @@ -1498,12 +15 41,24@@20882 @@ -1498,12 +1550,25 @@ 24171 20883 user, is used to control the quantity of rows and/or columns new explorer 24172 20884 windows should have. … … 24185 20897 + When one edits a file, for example by pressing <cr> when the 24186 20898 + 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. 24188 20901 + 24189 20902 + Return from Explorer~ 24190 20903 + Conversely, when one is editing a directory, issuing a :Rexplore 24191 + will return to editing the last file beingedited in that20904 + will return to editing the file that was last edited in that 24192 20905 + window. 24193 20906 + … … 24199 20912 24200 20913 *netrw-star* *netrw-starpat* *netrw-starstar* *netrw-starstarpat* 24201 @@ -1547,11 +16 02,12 @@20914 @@ -1547,11 +1612,12 @@ 24202 20915 The status line will show, on the right hand side of the status line, a 24203 20916 message like "Match 3 of 20". … … 24217 20930 24218 20931 DISPLAYING INFORMATION ABOUT FILE *netrw-qf* {{{2 24219 @@ -1641,10 +1 697,10 @@20932 @@ -1641,10 +1707,10 @@ 24220 20933 24221 20934 Netrw will use the command in |g:netrw_list_cmd| to perform the directory … … 24230 20943 read. Naturally, the user may override this command with whatever is 24231 20944 preferred. The NetList function which implements remote browsing 24232 @@ -1696,9 +17 52,36 @@20945 @@ -1696,9 +1762,36 @@ 24233 20946 to toggle between hiding files which begin with a period (dot) and not hiding 24234 20947 them. … … 24268 20981 24269 20982 Especially with the remote directory browser, constantly entering the password 24270 @@ -1778,6 +18 61,15 @@20983 @@ -1778,6 +1871,15 @@ 24271 20984 http://sial.org/howto/openssh/publickey-auth/ 24272 20985 … … 24284 20997 24285 20998 Pressing "qb" (query bookmarks) will list both the bookmarked directories and 24286 @@ -1800,8 +1 892,8 @@20999 @@ -1800,8 +1902,8 @@ 24287 21000 a file or a directory) will be detected, reported on, and ignored. 24288 21001 … … 24295 21008 24296 21009 MAKING THE BROWSING DIRECTORY THE CURRENT DIRECTORY *netrw-c* {{{2 24297 @@ -1821,12 +19 13,27@@21010 @@ -1821,12 +1923,29 @@ 24298 21011 24299 21012 Associated setting variable: |g:netrw_keepdir| … … 24309 21022 + 24310 21023 + * One may mark files with the cursor atop a filename and 24311 + then pressing "mf".21024 + then pressing "mf". 24312 21025 + 24313 21026 + * With gvim, in addition one may mark files with 24314 + <s-leftmouse>.21027 + <s-leftmouse>. (see |netrw-mouse|) 24315 21028 + 24316 21029 + * One may use the :MF command, which takes a list of 24317 + files (for local directories, the list may include24318 + wildcards -- see |glob()|) >21030 + files (for local directories, the list may include 21031 + wildcards -- see |glob()|) > 24319 21032 + 24320 21033 + :MF *.c 24321 21034 +< 24322 21035 + * 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|) 24324 21039 + 24325 21040 +The following netrw maps make use of marked files: … … 24327 21042 |netrw-a| Hide marked files/directories 24328 21043 |netrw-D| Delete marked files/directories 24329 @@ -1835, 7 +1942,7@@21044 @@ -1835,13 +1954,12 @@ 24330 21045 |netrw-me| Edit marked files 24331 21046 |netrw-mF| Unmark marked files … … 24336 21051 |netrw-mt| Set target for |netrw-mm| and |netrw-mc| 24337 21052 |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 @@ 24339 21060 < 24340 21061 into $HOME/.vim/after/syntax/netrw.vim . … … 24347 21068 All marked files are entered onto the global marked file list; there is only 24348 21069 one such list. In addition, every netrw buffer also has its own local marked 24349 @@ -1868,6 +19 79,12 @@21070 @@ -1868,6 +1990,12 @@ 24350 21071 commands which operate on marked files use one or the other of the marked file 24351 21072 lists. … … 24360 21081 UNMARKING FILES *netrw-mF* {{{2 24361 21082 (also see |netrw-mf|) 24362 @@ -2025,6 +21 42,10 @@21083 @@ -2025,6 +2153,10 @@ 24363 21084 * However, if the cursor is atop a directory name, then that directory is 24364 21085 used for the copy/move-to target … … 24371 21092 script variable (see |s:var|) and is shared between all netrw windows (in an 24372 21093 instance of vim). 24373 @@ -2055,9 +21 76,9 @@21094 @@ -2055,9 +2187,9 @@ 24374 21095 in my <.vimrc>. 24375 21096 … … 24383 21104 uses one of the go to tag actions (|tags|), the url will be used by netrw to 24384 21105 edit the desired file and go to the tag. 24385 @@ -2066,34 +21 87,38 @@21106 @@ -2066,34 +2198,38 @@ 24386 21107 24387 21108 MARKED FILES: TARGET DIRECTORY USING BOOKMARKS *netrw-Tb* {{{2 … … 24424 21145 24425 21146 MARKED FILES: UNMARKING *netrw-mu* {{{2 24426 @@ -2114,7 +22 39,15 @@21147 @@ -2114,7 +2250,15 @@ 24427 21148 --- ----------- 24428 21149 Var Explanation … … 24441 21162 default: =&sb (see |'sb'|) 24442 21163 24443 @@ -2142,6 +22 75,10 @@21164 @@ -2142,6 +2286,10 @@ 24444 21165 to get vertical splitting instead of 24445 21166 horizontal splitting. … … 24452 21173 "kfmclient exec" 24453 21174 "gnome-open" 24454 @@ -2205,6 +23 42,7 @@21175 @@ -2205,6 +2353,7 @@ 24455 21176 *g:netrw_dynamic_maxfilenamelen* =32: enables dynamic determination of 24456 21177 |g:netrw_maxfilenamelen|, which affects … … 24460 21181 this are permitted to be displayed 24461 21182 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 @@ 24463 21205 stamp information and file size) 24464 21206 = 2: wide listing (multiple files in columns) … … 24482 21224 *g:netrw_localcopycmd* ="cp" Linux/Unix/MacOS/Cygwin 24483 21225 ="copy" Windows 24484 @@ -2348,7 +2 495,7 @@21226 @@ -2348,7 +2511,7 @@ 24485 21227 evaluation will be suppressed 24486 21228 (see |'ballooneval'|) … … 24491 21233 default: "mkdir" 24492 21234 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 @@ 24494 21253 24495 21254 *g:netrw_sort_sequence* when sorting by name, first sort by the … … 24500 21259 default: '[\/]$,*,\.bak$,\.o$,\.h$, 24501 21260 \.info$,\.swp$,\.obj$' 24502 @@ -2412,7 +25 59,7 @@21261 @@ -2412,7 +2575,7 @@ 24503 21262 netrwMakefile: [mM]akefile *.mak 24504 21263 netrwObj : *.o *.obj … … 24509 21268 24510 21269 These syntax highlighting groups are linked 24511 @@ -2421,8 +25 68,27 @@21270 @@ -2421,8 +2584,27 @@ 24512 21271 one may put lines like > 24513 21272 hi link netrwCompress Visual … … 24539 21298 messages, banners, and whatnot that one doesn't 24540 21299 want masquerading as "directories" and "files". 24541 @@ -2457,6 +26 23,7 @@21300 @@ -2457,6 +2639,7 @@ 24542 21301 ml_get errors, try putting 24543 21302 let g:netrw_use_noswf= 0 … … 24547 21306 *g:netrw_winsize* specify initial size of new windows made with 24548 21307 "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 @@ 24550 21319 options to something that's compatible with netrw's needs, and then restoring 24551 21320 them. However, the autochdir option: > … … 24556 21325 autochdir sets the current directory to that containing the "file" (even if 24557 21326 that "file" is itself a directory). 24558 @@ -2547,9 +27 14,11 @@21327 @@ -2547,9 +2733,11 @@ 24559 21328 *netrw-createfile* 24560 21329 OPEN A NEW FILE IN NETRW'S CURRENT DIRECTORY *netrw-%* … … 24571 21340 24572 21341 PREVIEW WINDOW *netrw-p* *netrw-preview* {{{2 24573 @@ -2573,6 +27 42,9 @@21342 @@ -2573,6 +2761,9 @@ 24574 21343 will use only 30% of the columns available; the rest of the window 24575 21344 is used for the preview window. … … 24581 21350 24582 21351 To edit a file or directory in the previously used (last accessed) window (see 24583 @@ -2592,6 +27 64,8 @@21352 @@ -2592,6 +2783,8 @@ 24584 21353 |g:netrw_preview| control horizontal vs vertical splitting 24585 21354 |g:netrw_winsize| control initial sizing … … 24590 21359 REFRESHING THE LISTING *netrw-ctrl-l* *netrw-ctrl_l* {{{2 24591 21360 24592 @@ -2629,6 +28 03,7 @@21361 @@ -2629,6 +2822,7 @@ 24593 21362 Note that moving files is a dangerous operation; copies are safer. That's 24594 21363 because a "move" for remote files is actually a copy + delete -- and if … … 24598 21367 The g:netrw_rename_cmd variable is used to implement renaming. By default its 24599 21368 value is: 24600 @@ -2655,7 +28 30,7@@21369 @@ -2655,7 +2849,16 @@ 24601 21370 g:netrw_chgwin to the selected window number. Subsequent selection of a file 24602 21371 to edit (|netrw-cr|) will use that window. 24603 21372 24604 21373 -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 + 24605 21383 +Related topics: |netrw-cr| |g:netrw_browse_split| 24606 21384 Associated setting variables: |g:netrw_chgwin| 24607 21385 24608 21386 24609 @@ -2742,7 +29 17,7 @@21387 @@ -2742,7 +2945,7 @@ 24610 21388 24611 21389 (taken from an answer provided by Wu Yongwei on the vim … … 24616 21394 current code page, as are many other applications that do not 24617 21395 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 @@ 24619 21413 > 24620 21414 /usr/local/share/vim/vim7x/plugin/netrwPlugin.vim … … 24626 21420 which is loaded automatically at startup (assuming :set nocp). 24627 21421 24628 @@ -2962,9 +31 34,7 @@21422 @@ -2962,9 +3171,7 @@ 24629 21423 or 24630 21424 http://vim.sourceforge.net/scripts/script.php?script_id=120 … … 24637 21431 2. Edit the <netrw.vim> file by typing: > 24638 21432 24639 @@ -2988,15 +31 58,127@@21433 @@ -2988,15 +3195,153 @@ 24640 21434 read/write your file over the network in a separate tab. 24641 21435 … … 24661 21455 12. History *netrw-history* {{{1 24662 21456 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. 24663 21483 + v151: Jan 22, 2014 * extended :Rexplore to return to buffer 24664 21484 + prior to Explore or editing a directory … … 24766 21586 w and b to move to next/previous file 24767 21587 Apr 26, 2013 * one may now copy files in the same 24768 @@ -3009,7 +3 291,8 @@21588 @@ -3009,7 +3354,8 @@ 24769 21589 May 01, 2013 * :Explore ftp://... wasn't working. Fixed. 24770 21590 May 02, 2013 * introduced |g:netrw_bannerbackslash| as … … 24778 21598 diff -Naur vim74.orig/runtime/doc/pi_vimball.txt vim74/runtime/doc/pi_vimball.txt 24779 21599 --- vim74.orig/runtime/doc/pi_vimball.txt 2013-08-10 11:25:00.000000000 +0000 24780 +++ vim74/runtime/doc/pi_vimball.txt 2014-0 4-27 05:20:57.361749875+000021600 +++ vim74/runtime/doc/pi_vimball.txt 2014-06-01 00:42:52.307535896 +0000 24781 21601 @@ -188,7 +188,7 @@ 24782 21602 * Changed silent! to sil! (shorter) … … 24790 21610 diff -Naur vim74.orig/runtime/doc/quickfix.txt vim74/runtime/doc/quickfix.txt 24791 21611 --- vim74.orig/runtime/doc/quickfix.txt 2013-08-10 11:25:00.000000000 +0000 24792 +++ vim74/runtime/doc/quickfix.txt 2014-0 4-27 05:20:57.361749875+000021612 +++ vim74/runtime/doc/quickfix.txt 2014-06-01 00:42:52.350869119 +0000 24793 21613 @@ -1,4 +1,4 @@ 24794 21614 -*quickfix.txt* For Vim version 7.4. Last change: 2013 Aug 03 … … 24872 21692 diff -Naur vim74.orig/runtime/doc/recover.txt vim74/runtime/doc/recover.txt 24873 21693 --- vim74.orig/runtime/doc/recover.txt 2013-08-10 11:25:00.000000000 +0000 24874 +++ vim74/runtime/doc/recover.txt 2014-0 4-27 05:20:57.365083291+000021694 +++ vim74/runtime/doc/recover.txt 2014-06-01 00:42:52.410868967 +0000 24875 21695 @@ -1,4 +1,4 @@ 24876 21696 -*recover.txt* For Vim version 7.4. Last change: 2010 Jul 20 … … 24897 21717 diff -Naur vim74.orig/runtime/doc/repeat.txt vim74/runtime/doc/repeat.txt 24898 21718 --- vim74.orig/runtime/doc/repeat.txt 2013-08-10 11:25:00.000000000 +0000 24899 +++ vim74/runtime/doc/repeat.txt 2014-0 4-27 05:20:57.368416707+000021719 +++ vim74/runtime/doc/repeat.txt 2014-06-01 00:42:52.434202241 +0000 24900 21720 @@ -1,4 +1,4 @@ 24901 21721 -*repeat.txt* For Vim version 7.4. Last change: 2013 Jul 25 … … 24951 21771 diff -Naur vim74.orig/runtime/doc/sign.txt vim74/runtime/doc/sign.txt 24952 21772 --- vim74.orig/runtime/doc/sign.txt 2013-08-10 11:25:01.000000000 +0000 24953 +++ vim74/runtime/doc/sign.txt 2014-0 4-27 05:20:57.368416707+000021773 +++ vim74/runtime/doc/sign.txt 2014-06-01 00:42:52.494202088 +0000 24954 21774 @@ -1,4 +1,4 @@ 24955 21775 -*sign.txt* For Vim version 7.4. Last change: 2012 Jul 10 24956 +*sign.txt* For Vim version 7.4. Last change: 201 3 Nov 1721776 +*sign.txt* For Vim version 7.4. Last change: 2014 May 07 24957 21777 24958 21778 24959 21779 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 @@ 24961 21789 Remove the placed sign at the cursor position. 24962 21790 … … 24969 21797 diff -Naur vim74.orig/runtime/doc/spell.txt vim74/runtime/doc/spell.txt 24970 21798 --- vim74.orig/runtime/doc/spell.txt 2013-08-10 11:25:01.000000000 +0000 24971 +++ vim74/runtime/doc/spell.txt 2014-0 4-27 05:20:57.371750123+000021799 +++ vim74/runtime/doc/spell.txt 2014-06-01 00:42:52.504202062 +0000 24972 21800 @@ -1,4 +1,4 @@ 24973 21801 -*spell.txt* For Vim version 7.4. Last change: 2013 Jul 17 … … 24992 21820 diff -Naur vim74.orig/runtime/doc/starting.txt vim74/runtime/doc/starting.txt 24993 21821 --- vim74.orig/runtime/doc/starting.txt 2013-08-10 11:25:01.000000000 +0000 24994 +++ vim74/runtime/doc/starting.txt 2014-0 4-27 05:20:57.371750123+000021822 +++ vim74/runtime/doc/starting.txt 2014-06-01 00:42:52.540868636 +0000 24995 21823 @@ -1,4 +1,4 @@ 24996 21824 -*starting.txt* For Vim version 7.4. Last change: 2013 Jul 20 … … 25014 21842 diff -Naur vim74.orig/runtime/doc/syntax.txt vim74/runtime/doc/syntax.txt 25015 21843 --- vim74.orig/runtime/doc/syntax.txt 2013-08-10 11:25:01.000000000 +0000 25016 +++ vim74/runtime/doc/syntax.txt 2014-0 4-27 05:20:57.375083540+000021844 +++ vim74/runtime/doc/syntax.txt 2014-06-01 00:42:52.604201808 +0000 25017 21845 @@ -1,4 +1,4 @@ 25018 21846 -*syntax.txt* For Vim version 7.4. Last change: 2013 Jul 05 … … 25116 21944 diff -Naur vim74.orig/runtime/doc/tags vim74/runtime/doc/tags 25117 21945 --- vim74.orig/runtime/doc/tags 2013-08-10 12:23:34.000000000 +0000 25118 +++ vim74/runtime/doc/tags 2014-0 4-27 05:20:57.378416956+000021946 +++ vim74/runtime/doc/tags 2014-06-01 00:42:52.630868407 +0000 25119 21947 @@ -12,6 +12,7 @@ 25120 21948 % motion.txt /*%* … … 25133 21961 +autocmd various.txt /*+autocmd* 25134 21962 +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 @@ 25136 21972 +writebackup various.txt /*+writebackup* 25137 21973 +xfontset various.txt /*+xfontset* … … 25141 21977 +xsmp various.txt /*+xsmp* 25142 21978 +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 @@ 25144 21988 :3match pattern.txt /*:3match* 25145 21989 ::. cmdline.txt /*::.* … … 25149 21993 ::gs cmdline.txt /*::gs* 25150 21994 ::h cmdline.txt /*::h* 25151 @@ -1825,6 +18 29,7 @@21995 @@ -1825,6 +1831,7 @@ 25152 21996 :GnatPretty ft_ada.txt /*:GnatPretty* 25153 21997 :GnatTags ft_ada.txt /*:GnatTags* … … 25157 22001 :MkVimball pi_vimball.txt /*:MkVimball* 25158 22002 :N editing.txt /*:N* 25159 @@ -1836,6 +184 1,7 @@22003 @@ -1836,6 +1843,7 @@ 25160 22004 :Nread pi_netrw.txt /*:Nread* 25161 22005 :Ns pi_netrw.txt /*:Ns* … … 25165 22009 :Nwrite pi_netrw.txt /*:Nwrite* 25166 22010 :P various.txt /*:P* 25167 @@ -1967,8 +197 3,8 @@22011 @@ -1967,8 +1975,8 @@ 25168 22012 :cabc map.txt /*:cabc* 25169 22013 :cabclear map.txt /*:cabclear* … … 25175 22019 :caddf quickfix.txt /*:caddf* 25176 22020 :caddfile quickfix.txt /*:caddfile* 25177 @@ -2212,6 +22 18,9 @@22021 @@ -2212,6 +2220,9 @@ 25178 22022 :foldopen fold.txt /*:foldopen* 25179 22023 :for eval.txt /*:for* … … 25185 22029 :function-verbose eval.txt /*:function-verbose* 25186 22030 :g repeat.txt /*:g* 25187 @@ -2298,6 +230 7,8 @@22031 @@ -2298,6 +2309,8 @@ 25188 22032 :keepj motion.txt /*:keepj* 25189 22033 :keepjumps motion.txt /*:keepjumps* … … 25194 22038 :lN quickfix.txt /*:lN* 25195 22039 :lNext quickfix.txt /*:lNext* 25196 @@ -2489,6 +250 0,7 @@22040 @@ -2489,6 +2502,7 @@ 25197 22041 :nbkey netbeans.txt /*:nbkey* 25198 22042 :nbstart netbeans.txt /*:nbstart* … … 25202 22046 :next editing.txt /*:next* 25203 22047 :next_f editing.txt /*:next_f* 25204 @@ -2518,6 +253 0,8 @@22048 @@ -2518,6 +2532,8 @@ 25205 22049 :norm various.txt /*:norm* 25206 22050 :normal various.txt /*:normal* … … 25211 22055 :number various.txt /*:number* 25212 22056 :nun map.txt /*:nun* 25213 @@ -2738,6 +275 2,7 @@22057 @@ -2738,6 +2754,7 @@ 25214 22058 :sign-jump sign.txt /*:sign-jump* 25215 22059 :sign-list sign.txt /*:sign-list* … … 25219 22063 :sign-unplace sign.txt /*:sign-unplace* 25220 22064 :sil various.txt /*:sil* 25221 @@ -4294,6 +43 09,9@@22065 @@ -4294,6 +4311,11 @@ 25222 22066 E879 syntax.txt /*E879* 25223 22067 E88 windows.txt /*E88* … … 25226 22070 +E882 eval.txt /*E882* 25227 22071 +E883 eval.txt /*E883* 22072 +E884 eval.txt /*E884* 22073 +E885 sign.txt /*E885* 25228 22074 E89 message.txt /*E89* 25229 22075 E90 message.txt /*E90* 25230 22076 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 @@ 25232 22092 byte-count editing.txt /*byte-count* 25233 22093 byte2line() eval.txt /*byte2line()* … … 25237 22097 c change.txt /*c* 25238 22098 c.vim syntax.txt /*c.vim* 25239 @@ -5350,6 +53 69,7 @@22099 @@ -5350,6 +5380,7 @@ 25240 22100 dialog gui_w32.txt /*dialog* 25241 22101 dialogs-added version5.txt /*dialogs-added* … … 25245 22105 dict-identity eval.txt /*dict-identity* 25246 22106 dict-modification eval.txt /*dict-modification* 25247 @@ -5458,6 +54 78,8 @@22107 @@ -5458,6 +5489,8 @@ 25248 22108 escape intro.txt /*escape* 25249 22109 escape() eval.txt /*escape()* … … 25254 22114 eval() eval.txt /*eval()* 25255 22115 eval-examples eval.txt /*eval-examples* 25256 @@ -5492,6 +55 14,7 @@22116 @@ -5492,6 +5525,7 @@ 25257 22117 exclusive-linewise motion.txt /*exclusive-linewise* 25258 22118 executable() eval.txt /*executable()* … … 25262 22122 exists() eval.txt /*exists()* 25263 22123 exp() eval.txt /*exp()* 25264 @@ -5708,6 +57 31,7 @@22124 @@ -5708,6 +5742,7 @@ 25265 22125 ft-changelog-syntax syntax.txt /*ft-changelog-syntax* 25266 22126 ft-chill-syntax syntax.txt /*ft-chill-syntax* … … 25270 22130 ft-coldfusion-syntax syntax.txt /*ft-coldfusion-syntax* 25271 22131 ft-cpp-syntax syntax.txt /*ft-cpp-syntax* 25272 @@ -5724,6 +57 48,7 @@22132 @@ -5724,6 +5759,7 @@ 25273 22133 ft-dtd-syntax syntax.txt /*ft-dtd-syntax* 25274 22134 ft-eiffel-syntax syntax.txt /*ft-eiffel-syntax* … … 25278 22138 ft-form-syntax syntax.txt /*ft-form-syntax* 25279 22139 ft-fortran-indent indent.txt /*ft-fortran-indent* 25280 @@ -5876,6 +59 01,8 @@22140 @@ -5876,6 +5912,8 @@ 25281 22141 g:ada_with_gnat_project_files ft_ada.txt /*g:ada_with_gnat_project_files* 25282 22142 g:ada_withuse_ordinary ft_ada.txt /*g:ada_withuse_ordinary* … … 25287 22147 g:clojure_fuzzy_indent_blacklist indent.txt /*g:clojure_fuzzy_indent_blacklist* 25288 22148 g:clojure_fuzzy_indent_patterns indent.txt /*g:clojure_fuzzy_indent_patterns* 25289 @@ -5924,6 +59 51,7 @@22149 @@ -5924,6 +5962,7 @@ 25290 22150 g:html_use_encoding syntax.txt /*g:html_use_encoding* 25291 22151 g:html_use_xhtml syntax.txt /*g:html_use_xhtml* … … 25295 22155 g:netrw_altv pi_netrw.txt /*g:netrw_altv* 25296 22156 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 @@ 25298 22166 g:netrw_hide pi_netrw.txt /*g:netrw_hide* 25299 22167 g:netrw_home pi_netrw.txt /*g:netrw_home* … … 25303 22171 g:netrw_ignorenetrc pi_netrw.txt /*g:netrw_ignorenetrc* 25304 22172 g:netrw_keepdir pi_netrw.txt /*g:netrw_keepdir* 25305 @@ -6358,6 +63 87,7 @@22173 @@ -6358,6 +6399,7 @@ 25306 22174 hl-WildMenu syntax.txt /*hl-WildMenu* 25307 22175 hlID() eval.txt /*hlID()* … … 25311 22179 home intro.txt /*home* 25312 22180 home-replace editing.txt /*home-replace* 25313 @@ -6669,6 +6 699,7 @@22181 @@ -6669,6 +6711,7 @@ 25314 22182 linewise-visual visual.txt /*linewise-visual* 25315 22183 lisp.vim syntax.txt /*lisp.vim* … … 25319 22187 list-identity eval.txt /*list-identity* 25320 22188 list-index eval.txt /*list-index* 25321 @@ -6921,6 +69 52,15 @@22189 @@ -6921,6 +6964,15 @@ 25322 22190 netrw pi_netrw.txt /*netrw* 25323 22191 netrw-% pi_netrw.txt /*netrw-%* … … 25335 22203 netrw-D pi_netrw.txt /*netrw-D* 25336 22204 netrw-O pi_netrw.txt /*netrw-O* 25337 @@ -6978,6 +70 18,7 @@22205 @@ -6978,6 +7030,7 @@ 25338 22206 netrw-getftype pi_netrw.txt /*netrw-getftype* 25339 22207 netrw-gf pi_netrw.txt /*netrw-gf* … … 25343 22211 netrw-gx pi_netrw.txt /*netrw-gx* 25344 22212 netrw-handler pi_netrw.txt /*netrw-handler* 25345 @@ -6992,6 +70 33,7 @@22213 @@ -6992,6 +7045,7 @@ 25346 22214 netrw-internal-variables pi_netrw.txt /*netrw-internal-variables* 25347 22215 netrw-intro-browse pi_netrw.txt /*netrw-intro-browse* … … 25351 22219 netrw-listbookmark pi_netrw.txt /*netrw-listbookmark* 25352 22220 netrw-listhack pi_netrw.txt /*netrw-listhack* 25353 @@ -7022,6 +70 64,7 @@22221 @@ -7022,6 +7076,7 @@ 25354 22222 netrw-nexplore pi_netrw.txt /*netrw-nexplore* 25355 22223 netrw-noload pi_netrw.txt /*netrw-noload* … … 25359 22227 netrw-o pi_netrw.txt /*netrw-o* 25360 22228 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 @@ 25362 22238 profiling repeat.txt /*profiling* 25363 22239 profiling-variable eval.txt /*profiling-variable* … … 25367 22243 pronounce intro.txt /*pronounce* 25368 22244 psql ft_sql.txt /*psql* 25369 @@ -7577,6 +76 21,7 @@22245 @@ -7577,6 +7634,7 @@ 25370 22246 s/\3 change.txt /*s\/\\3* 25371 22247 s/\9 change.txt /*s\/\\9* … … 25375 22251 s/\L change.txt /*s\/\\L* 25376 22252 s/\U change.txt /*s\/\\U* 25377 @@ -7787,6 +78 32,7 @@22253 @@ -7787,6 +7845,7 @@ 25378 22254 spell-affix-mbyte spell.txt /*spell-affix-mbyte* 25379 22255 spell-affix-not-supported spell.txt /*spell-affix-not-supported* … … 25383 22259 spell-dic-format spell.txt /*spell-dic-format* 25384 22260 spell-double-scoring spell.txt /*spell-double-scoring* 25385 @@ -7872,6 +79 18,7 @@22261 @@ -7872,6 +7931,7 @@ 25386 22262 strdisplaywidth() eval.txt /*strdisplaywidth()* 25387 22263 strftime() eval.txt /*strftime()* … … 25391 22267 string-functions usr_41.txt /*string-functions* 25392 22268 string-match eval.txt /*string-match* 25393 @@ -7936,6 +79 83,7 @@22269 @@ -7936,6 +7996,7 @@ 25394 22270 system() eval.txt /*system()* 25395 22271 system-functions usr_41.txt /*system-functions* … … 25399 22275 t motion.txt /*t* 25400 22276 t: eval.txt /*t:* 25401 @@ -8280,6 +83 28,7 @@22277 @@ -8280,6 +8341,7 @@ 25402 22278 undofile() eval.txt /*undofile()* 25403 22279 undotree() eval.txt /*undotree()* … … 25407 22283 unlisted-buffer windows.txt /*unlisted-buffer* 25408 22284 up-down-motions motion.txt /*up-down-motions* 25409 @@ -8364,6 +84 13,7 @@22285 @@ -8364,6 +8426,7 @@ 25410 22286 v:foldend eval.txt /*v:foldend* 25411 22287 v:foldlevel eval.txt /*v:foldlevel* … … 25415 22291 v:key eval.txt /*v:key* 25416 22292 v:lang eval.txt /*v:lang* 25417 @@ -8377,6 +84 27,7 @@22293 @@ -8377,6 +8440,7 @@ 25418 22294 v:prevcount eval.txt /*v:prevcount* 25419 22295 v:profiling eval.txt /*v:profiling* … … 25425 22301 diff -Naur vim74.orig/runtime/doc/tagsrch.txt vim74/runtime/doc/tagsrch.txt 25426 22302 --- vim74.orig/runtime/doc/tagsrch.txt 2013-08-10 11:25:02.000000000 +0000 25427 +++ vim74/runtime/doc/tagsrch.txt 2014-0 4-27 05:20:57.381750371+000022303 +++ vim74/runtime/doc/tagsrch.txt 2014-06-01 00:42:52.637535056 +0000 25428 22304 @@ -1,4 +1,4 @@ 25429 22305 -*tagsrch.txt* For Vim version 7.4. Last change: 2013 Jul 28 … … 25447 22323 *[_CTRL-D* 25448 22324 [ CTRL-D Jump to the first macro definition that contains the 22325 diff -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 25449 22345 diff -Naur vim74.orig/runtime/doc/todo.txt vim74/runtime/doc/todo.txt 25450 22346 --- vim74.orig/runtime/doc/todo.txt 2013-08-10 11:25:02.000000000 +0000 25451 +++ vim74/runtime/doc/todo.txt 2014-0 4-27 05:20:57.388417204+000022347 +++ vim74/runtime/doc/todo.txt 2014-06-01 00:42:52.700868228 +0000 25452 22348 @@ -1,4 +1,4 @@ 25453 22349 -*todo.txt* For Vim version 7.4. Last change: 2013 Aug 10 25454 +*todo.txt* For Vim version 7.4. Last change: 2014 Apr 0522350 +*todo.txt* For Vim version 7.4. Last change: 2014 May 22 25455 22351 25456 22352 25457 22353 VIM REFERENCE MANUAL by Bram Moolenaar 25458 @@ -34,38 +34,2 32 @@22354 @@ -34,38 +34,242 @@ 25459 22355 *known-bugs* 25460 22356 -------------------- Known bugs and current work ----------------------- 25461 22357 25462 22358 +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) 25472 22361 +- Issue 164: freeze on regexp search. 25473 +- NFA problem with non-greedy match and branches. (Ingo Karkat, 2013 Nov 29)25474 22362 +- Ignorecase not handled properly for multi-byte characters. (Axel Bender, 25475 22363 + 2013 Dec 11) 25476 22364 +- Using \@> and \?. (Brett Stahlman, 2013 Dec 21) Remark from Marcin Szamotulski 25477 22365 + Remark from Brett 2014 Jan 6 and 7. 25478 +- Bug with back references. (Lech Lorens, 2014 Feb 3)25479 22366 +- 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 25480 22370 + 25481 22371 +Problem that a previous silent ":throw" causes a following try/catch not to … … 25485 22375 +directory exists. (Sergio Gallelli, 2013 Dec 29) 25486 22376 + 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 error25490 +when an option is set?25491 +25492 +":lunmap" cannot be abbrevated to ":lu". (ZyX)25493 +25494 22377 +Problem using ":try" inside ":execute". (ZyX, 2013 Sep 15) 25495 22378 + 22379 +Setting 'ttymouse' empty causes Dec mouse to be detected. (Elijah Griffin, 22380 +2014 May 13) 22381 + 25496 22382 Python: ":py raw_input('prompt')" doesn't work. (Manu Hack) 25497 22383 25498 22384 -Patch to add "acl" and "xpm" as a feature. (Ken Takata, 2013 Jul 8) 25499 +Crash in setqflist(). (Benoit Mortgat, 2010 Nov 18)25500 +25501 22385 +MS-Windows: Crash opening very long file name starting with "\\". 25502 22386 +(Christian Brock, 2012 Jun 29) 25503 22387 + 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 +25515 22388 +Syntax highlighting slow (hangs) in SASS file. (Niek Bosch, 2013 Aug 21) 25516 22389 + … … 25529 22402 + 25530 22403 +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. 25531 22409 + 25532 22410 +Win32: use different args for SearchPath()? (Yasuhiro Matsumoto, 2009 Jan 30) … … 25534 22412 +Update from Ken Takata, 2014 Jan 10. Newer 2014 Apr 3. 25535 22413 + 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 + 25536 22421 +Can we make ":unlet $VAR" use unsetenv() to delete the env var? 25537 22422 +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. 25538 22428 + 25539 22429 +This does not give an error: (Andre Sihera, 2014 Mar 21) … … 25545 22435 +Change 'viewdir' to "$HOME/vimfiles/view" and use 'viewdiralt' to also read 25546 22436 +from? 22437 + 22438 +Patch to add arglistid(), get the ID of the currently used argument list. 22439 +(Marcin Szamotulski, 2014 Apr 27) 25547 22440 + 25548 22441 +Include a plugin manager with Vim? Neobundle seems to be the best currently. … … 25583 22476 +normal spell file. (Enno Nagel, 2014 Mar 29) 25584 22477 + 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 + 25585 22491 +Editing an ascii file as ucs-2 or ucs-4 causes display errors. 25586 22492 +(ZyX, 2014 Mar 30) … … 25591 22497 +VMS: Select() doesn't work properly, typing ESC may hang Vim. Use sys$qiow 25592 22498 +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) 25594 22502 +Patch for XDG base directory support. (Jean François Bignolles, 2014 Mar 4) 25595 22503 + … … 25600 22508 + 25601 22509 +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 + 25605 22511 +Patch to define macros for hardcoded values. (Elias Diem, 2013 Dec 14) 25606 22512 + … … 25623 22529 + 25624 22530 +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) 25626 22534 +Updated spec ftplugin. (MatÄj Cepl, 2013 Oct 16) 25627 22535 + … … 25630 22538 + 25631 22539 +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 + 25635 22541 +Patch to handle integer overflow. (Aaron Burrow, 2013 Dec 12) 25636 22542 + … … 25661 22567 +Patch to add funcref to Lua. (Luis Carvalho, 2013 Sep 4) 25662 22568 +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) 25664 22572 +Patch to fix that on suckless Terminal mousewheel up does not work. 25665 22573 +(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 + 25669 22575 +Discussion about canonicalization of Hebrew. (Ron Aaron, 2011 April 10) 25670 22576 … … 25698 22604 25699 22605 The BufUnload event is triggered when re-using the empty buffer. 25700 @@ -76,6 +2 70,10 @@22606 @@ -76,6 +280,10 @@ 25701 22607 - The word that was selected (empty if abandoned complete) 25702 22608 - Type of completion: tag, omnifunc, user func. … … 25709 22615 That is, calling a dictionary function on an autoloaded dict. 25710 22616 Works OK for echo, just not for ":call" and ":call call()". (Ted, 2011 Mar 25711 @@ -83,10 +2 81,6 @@22617 @@ -83,10 +291,6 @@ 25712 22618 Patch by Christian Brabandt, 2013 Mar 23. 25713 22619 Not 100% sure this is the right solution. … … 25720 22626 Yasuhiro Matsumoto, 2013 May 31. 25721 22627 Or should we add a more general mechanism, like lambda functions? 25722 @@ -94,6 +2 88,19 @@22628 @@ -94,6 +298,19 @@ 25723 22629 Problem caused by patch 7.3.638: window->open does not update window 25724 22630 correctly. Issue 91. … … 25740 22646 2013 Mar 19, later message) 25741 22647 25742 @@ -108,6 +3 15,8 @@22648 @@ -108,6 +325,8 @@ 25743 22649 Bug with 'cursorline' in diff mode. Line being scrolled into view gets 25744 22650 highlighted as the cursor line. (Alessandro Ivaldi, 2013 Jun 4) … … 25749 22655 May 17: with winlist() and tabpagelist(). 25750 22656 May 19: with local variables. 25751 @@ -119,6 +3 28,8 @@22657 @@ -119,6 +338,8 @@ 25752 22658 Patch from Christian Brabandt to make the "buffer" argument for ":sign place" 25753 22659 optional. (2013 Jul 12) … … 25758 22664 functions. (Christian Brabandt, 2013 May 8, update May 21) 25759 22665 Patch to add getlocstack() / setlocstack(). (Christian Brabandt, 2013 May 14) 25760 @@ -149,11 +3 60,19 @@22666 @@ -149,11 +370,19 @@ 25761 22667 process that is running. It might actually be some other program, e.g. after 25762 22668 a reboot. … … 25780 22686 not correctly updated. (Paul Harris, 2012 Feb 27) 25781 22687 25782 @@ -167,8 +3 86,17 @@22688 @@ -167,8 +396,17 @@ 25783 22689 25784 22690 Patch to add functions for signs. (Christian Brabandt, 2013 Jan 27) … … 25798 22704 Patch to add 'completeselect' option. Specifies how to select a candidate in 25799 22705 insert completion. (Shougo, 2013 May 29) 25800 @@ -182,9 +4 10,6 @@22706 @@ -182,9 +420,6 @@ 25801 22707 Win32: The Python interface only works with one version of Python, selected at 25802 22708 compile time. Can this be made to work with version 2.1 and 2.2 dynamically? … … 25808 22714 Vim script. Requires converting the arguments and return value, like with 25809 22715 vim.bindeval(). 25810 @@ -205,9 +4 30,6 @@22716 @@ -205,9 +440,6 @@ 25811 22717 Add a check for b:no_match_paren in Highlight_matching_Pair() (Marcin 25812 22718 Szamotulski, 2012 Nov 8) … … 25818 22724 25819 22725 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 @@ 25821 22738 Patch to support user name completion on MS-Windows. (Yasuhiro Matsumoto, 2012 25822 22739 Aug 16) … … 25829 22746 is confusing. Should say "the argument list is empty". 25830 22747 25831 @@ -272, 8 +490,13 @@22748 @@ -272,27 +496,23 @@ 25832 22749 25833 22750 Patch to list user digraphs. (Christian Brabandt, 2012 Apr 14) … … 25843 22760 Apr 18) 25844 22761 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 - 25851 22772 ":cd" doesn't work when current directory path contains "**". 25852 22773 finddir() has the same problem. (Yukihiro Nakadaira, 2012 Jan 10) … … 25858 22779 25859 22780 Update for vim2html.pl. (Tyru, 2013 Feb 22) 25860 @@ -374,8 +59 6,6 @@22781 @@ -374,8 +594,6 @@ 25861 22782 Setting $HOME on MS-Windows is not very well documented. Suggestion by Ben 25862 22783 Fritz (2011 Oct 27). … … 25867 22788 doing ":g/test/d". Putting every delete on the clipboard? (Robert Chan, 2011 25868 22789 Jun 17) 25869 @@ -396, 7 +616,7@@22790 @@ -396,10 +614,10 @@ 25870 22791 Changes to manpage plugin. (Elias Toivanen, 2011 Jul 25) 25871 22792 … … 25875 22796 Would also need to do this for spellbadword() and spellsuggest(). 25876 22797 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 @@ 25879 22804 When setqflist() uses a filename that triggers a BufReadCmd autocommand Vim 25880 22805 doesn't jump to the correct line with :cfirst. (ZyX, 2011 Sep 18) … … 25885 22810 Patch from Christian Brabandt, 2011 Aug 19. 25886 22811 25887 @@ -456,6 +67 8,9 @@22812 @@ -456,6 +676,9 @@ 25888 22813 number, but it is in the sign column. Doesn't look right. (ZyX 2011 Jun 5) 25889 22814 Patch by Christian Brabandt, 2011 Jun 5. Introduces new problems. … … 25895 22820 Patch by Christian Brabandt, uses ]e [e ]t and [t. 2011 Aug 9. 25896 22821 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 @@ 25898 22833 the system encoding (usually utf-8). 25899 22834 … … 25904 22839 Problem producing tags file when hebrew.frx is present. It has a BOM. 25905 22840 Results in E670. (Tony Mechelynck, 2010 May 2) 25906 @@ -573,8 +79 8,7 @@22841 @@ -573,8 +793,7 @@ 25907 22842 25908 22843 getpos()/setpos() don't include curswant. getpos() could return a fifth … … 25914 22849 With "tw=55 fo+=a" typing space before ) doesn't work well. (Scott Mcdermott, 25915 22850 2010 Oct 24) 25916 @@ -595,9 +81 9,6 @@22851 @@ -595,9 +814,6 @@ 25917 22852 checked to be in a comment. Implement FM_SKIPCOMM flag of findmatchlimit(). 25918 22853 Issue 46. … … 25924 22859 25925 22860 Using CompilerSet doesn't record where an option was set from. E.g., in the 25926 @@ -620,8 +8 41,6 @@22861 @@ -620,8 +836,6 @@ 25927 22862 When 'lines' is 25 and 'scrolloff' is 12, "j" scrolls zero or two lines 25928 22863 instead of one. (Constantin Pan, 2010 Sep 10) … … 25933 22868 Winckler, 2011 May 11) 25934 22869 Requires a map mode for Insert mode started from blockwise Visual mode. 25935 @@ -629,10 +84 8,6 @@22870 @@ -629,10 +843,6 @@ 25936 22871 Writing nested List and Dict in viminfo gives error message and can't be read 25937 22872 back. (Yukihiro Nakadaira, 2010 Nov 13) … … 25944 22879 Additional info by Dominique Pelle. (also on 2010 Apr 10) 25945 22880 25946 @@ -759,6 +9 74,7 @@22881 @@ -759,6 +969,7 @@ 25947 22882 25948 22883 Patch to add farsi handling to arabic.c (Ali Gholami Rudi, 2009 May 2) … … 25952 22887 Patch to add "focusonly" to 'scrollopt', so that scrollbind also applies in 25953 22888 window that doesn't have focus. (Jonathon Mah, 2009 Jan 12) 25954 @@ -838,8 +10 54,6 @@22889 @@ -838,8 +1049,6 @@ 25955 22890 Win32 GUI: last message from startup doesn't show up when there is an echoerr 25956 22891 command. (Cyril Slobin, 2009 Mar 13) … … 25961 22896 does not work. (Nieko Maatjes, 2009 Jan 8, Ingo Karkat, 2009 Jan 22) 25962 22897 25963 @@ -856,7 +10 70,7@@22898 @@ -856,7 +1065,12 @@ 25964 22899 Using ~ works OK on 'a' with composing char, but not on 0x0418 with composing 25965 22900 char 0x0301. (Tony Mechelynck, 2009 Mar 4) 25966 22901 25967 22902 -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 + 25968 22908 +A function on a dictionary is not profiled. (ZyX, 2010 Dec 25) 25969 22909 … … 25997 22937 Document that default font in Athena can be set with resources: 25998 22938 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 @@ 26000 22966 Depends on 'shellslash', 'shellquote' and 'shellxquote', but shellescape() 26001 22967 only takes 'shellslash' into account. … … 26019 22985 2007 Jun 21) 26020 22986 26021 @@ -1459,6 +167 4,9 @@22987 @@ -1459,6 +1673,9 @@ 26022 22988 tree stops unexpectedly when using ":cd " and entering a directory that 26023 22989 doesn't contain other directories. … … 26029 22995 highlight Normal ctermbg=DarkGray 26030 22996 set background=dark 26031 @@ -1685,7 +190 3,7 @@22997 @@ -1685,7 +1902,7 @@ 26032 22998 - testdir/Make_dos_sh.mak for running tests with MingW. (Bill Mccarthy, 2008 26033 22999 Sep 13) … … 26038 23004 Vissale Neang. (Martin Stubenschrott) Asked Vissale to make the scripts 26039 23005 more friendly for the Vim distribution. 26040 @@ -1715,7 +193 3,7 @@23006 @@ -1715,7 +1932,7 @@ 26041 23007 How does this work? Missing comments. 26042 23008 8 Add a few more command names to the menus. Patch from Jiri Brezina … … 26047 23013 - Include flipcase patch: ~/vim/patches/wall.flipcase2 ? Make it work 26048 23014 for multi-byte characters. 26049 @@ -1864,8 +208 2,6 @@23015 @@ -1864,8 +2081,6 @@ 26050 23016 Win32 GUI known bugs: 26051 23017 - Win32: tearoff menu window should have a scrollbar when it's taller than … … 26056 23022 file names. Can we load unicows.dll dynamically? 26057 23023 8 The -P argument doesn't work very well with many MDI applications. 26058 @@ -1873,9 +208 9,6 @@23024 @@ -1873,9 +2088,6 @@ 26059 23025 Tutorial: http://win32assembly.online.fr/tut32.html 26060 23026 8 In eval.c, io.h is included when MSWIN32 is defined. Shouldn't this be … … 26066 23032 of ":only" is highlighted like the cursor. (Lipelis) 26067 23033 8 When 'encoding' is "utf-8", should use 'guifont' for both normal and wide 26068 @@ -1887,9 +2 100,6 @@23034 @@ -1887,9 +2099,6 @@ 26069 23035 8 Use another default for 'termencoding': the active codepage. Means that 26070 23036 when 'encoding' is changed typing characters still works properly. … … 26076 23042 2004 May 9) 26077 23043 8 Win32: When clicking on the gvim title bar, which gives it focus, produces 26078 @@ -2272,8 +248 2,6 @@23044 @@ -2272,8 +2481,6 @@ 26079 23045 character. (Yasuhiro Matsumoto) It should return 1 when used on a tail 26080 23046 byte, like for utf-8. Store second byte of double-byte in ScreenLines2[] … … 26085 23051 ":insert" command, causing the following "endfunction" not to be found. 26086 23052 Add skipping this perl construction inside function definitions. 26087 @@ -2566,8 +277 4,6 @@23053 @@ -2566,8 +2773,6 @@ 26088 23054 input method called from GDK code. Without Perl it doesn't crash. 26089 23055 - VMS: Vimdiff doesn't work with the VMS diff, because the output looks … … 26094 23060 in Vim as if the rightmost scrollbar was used. 26095 23061 - GTK with Gnome: Produces an error message when starting up: 26096 @@ -2736,10 +294 2,6 @@23062 @@ -2736,10 +2941,6 @@ 26097 23063 26098 23064 … … 26105 23071 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=219777 26106 23072 - 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 @@ 26108 23087 Built-in script language: 26109 23088 8 Make the filename and line number available to script functions, so that … … 26113 23092 restore option values. Especially useful for new options. Problem: how 26114 23093 to avoid a performance penalty (esp. for string options)? 26115 @@ -4035,8 +423 8,7 @@23094 @@ -4035,8 +4233,7 @@ 26116 23095 7 Use Tabs for the indent of starting lines, pad with spaces for 26117 23096 continuation lines. Allows changing 'tabstop' without messing up the … … 26123 23102 26124 23103 Java: 26125 @@ -4655,7 +485 7,7 @@23104 @@ -4655,7 +4852,7 @@ 26126 23105 26127 23106 Digraphs: … … 26132 23111 characters? 26133 23112 8 Add command to remove one or more (all) digraphs. (Brown) 26134 @@ -4852,6 +50 54,7 @@23113 @@ -4852,6 +5049,7 @@ 26135 23114 6 Add ":timer" command, to set a command to be executed at a certain 26136 23115 interval, or once after some time has elapsed. (Aaron) … … 26142 23121 diff -Naur vim74.orig/runtime/doc/undo.txt vim74/runtime/doc/undo.txt 26143 23122 --- vim74.orig/runtime/doc/undo.txt 2013-08-10 11:25:02.000000000 +0000 26144 +++ vim74/runtime/doc/undo.txt 2014-0 4-27 05:20:57.391750620+000023123 +++ vim74/runtime/doc/undo.txt 2014-06-01 00:42:52.734201477 +0000 26145 23124 @@ -1,4 +1,4 @@ 26146 23125 -*undo.txt* For Vim version 7.4. Last change: 2012 Mar 04 … … 26172 23151 diff -Naur vim74.orig/runtime/doc/usr_25.txt vim74/runtime/doc/usr_25.txt 26173 23152 --- vim74.orig/runtime/doc/usr_25.txt 2013-08-10 11:25:05.000000000 +0000 26174 +++ vim74/runtime/doc/usr_25.txt 2014-0 4-27 05:20:57.401750869+000023153 +++ vim74/runtime/doc/usr_25.txt 2014-06-01 00:42:52.944200942 +0000 26175 23154 @@ -86,7 +86,7 @@ 26176 23155 … … 26184 23163 diff -Naur vim74.orig/runtime/doc/usr_30.txt vim74/runtime/doc/usr_30.txt 26185 23164 --- vim74.orig/runtime/doc/usr_30.txt 2013-08-10 11:25:05.000000000 +0000 26186 +++ vim74/runtime/doc/usr_30.txt 2014-0 4-27 05:20:57.405084285+000023165 +++ vim74/runtime/doc/usr_30.txt 2014-06-01 00:42:53.064200637 +0000 26187 23166 @@ -128,7 +128,7 @@ 26188 23167 You can include special Vim keywords in the command specification. The % … … 26205 23184 diff -Naur vim74.orig/runtime/doc/usr_40.txt vim74/runtime/doc/usr_40.txt 26206 23185 --- vim74.orig/runtime/doc/usr_40.txt 2013-08-10 11:25:05.000000000 +0000 26207 +++ vim74/runtime/doc/usr_40.txt 2014-0 4-27 05:20:57.408417700 +000023186 +++ vim74/runtime/doc/usr_40.txt 2014-06-01 00:42:53.100867210 +0000 26208 23187 @@ -209,7 +209,7 @@ 26209 23188 separates the two commands. This also means that a | character can't be used … … 26217 23196 diff -Naur vim74.orig/runtime/doc/usr_41.txt vim74/runtime/doc/usr_41.txt 26218 23197 --- vim74.orig/runtime/doc/usr_41.txt 2013-08-10 11:25:05.000000000 +0000 26219 +++ vim74/runtime/doc/usr_41.txt 2014-0 4-27 05:20:57.408417700+000023198 +++ vim74/runtime/doc/usr_41.txt 2014-06-01 00:42:53.110867184 +0000 26220 23199 @@ -1,4 +1,4 @@ 26221 23200 -*usr_41.txt* For Vim version 7.4. Last change: 2013 Feb 20 … … 26303 23282 readfile() read a file into a List of lines 26304 23283 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 @@ 26306 23293 libcall() call a function in an external library 26307 23294 libcallnr() idem, returning a number … … 26328 23315 diff -Naur vim74.orig/runtime/doc/usr_42.txt vim74/runtime/doc/usr_42.txt 26329 23316 --- vim74.orig/runtime/doc/usr_42.txt 2013-08-10 11:25:05.000000000 +0000 26330 +++ vim74/runtime/doc/usr_42.txt 2014-0 4-27 05:20:57.408417700+000023317 +++ vim74/runtime/doc/usr_42.txt 2014-06-01 00:42:53.120867159 +0000 26331 23318 @@ -311,7 +311,7 @@ 26332 23319 item with a bitmap. For example, define a new toolbar item with: > … … 26340 23327 diff -Naur vim74.orig/runtime/doc/usr_45.txt vim74/runtime/doc/usr_45.txt 26341 23328 --- vim74.orig/runtime/doc/usr_45.txt 2013-08-10 11:25:06.000000000 +0000 26342 +++ vim74/runtime/doc/usr_45.txt 2014-0 4-27 05:20:57.411751116+000023329 +++ vim74/runtime/doc/usr_45.txt 2014-06-01 00:42:53.167533707 +0000 26343 23330 @@ -328,8 +328,8 @@ 26344 23331 *45.5* Entering language text … … 26354 23341 diff -Naur vim74.orig/runtime/doc/various.txt vim74/runtime/doc/various.txt 26355 23342 --- vim74.orig/runtime/doc/various.txt 2013-08-10 11:25:06.000000000 +0000 26356 +++ vim74/runtime/doc/various.txt 2014-0 4-27 05:20:57.411751116+000023343 +++ vim74/runtime/doc/various.txt 2014-06-01 00:42:53.190866981 +0000 26357 23344 @@ -1,4 +1,4 @@ 26358 23345 -*various.txt* For Vim version 7.4. Last change: 2013 May 18 26359 +*various.txt* For Vim version 7.4. Last change: 2014 Apr 0123346 +*various.txt* For Vim version 7.4. Last change: 2014 May 22 26360 23347 26361 23348 … … 26399 23386 For Win32 also see |:!start|. 26400 23387 + 26401 + After the command has been executed, the timestamp of26402 + 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|. 26403 23390 + 26404 23391 Vim redraws the screen after the command is finished, … … 26413 23400 B *+arabic* |Arabic| language support 26414 23401 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 @@ 26416 23411 N *+viminfo* |'viminfo'| 26417 23412 N *+vertsplit* Vertically split windows |:vsplit| … … 26422 23417 N *+vreplace* |gR| and |gr| 26423 23418 N *+wildignore* |'wildignore'| 26424 @@ -426,6 +44 3,7 @@23419 @@ -426,6 +444,7 @@ 26425 23420 m *+writebackup* |'writebackup'| is default on 26426 23421 m *+xim* X input method |xim| … … 26432 23427 diff -Naur vim74.orig/runtime/doc/version5.txt vim74/runtime/doc/version5.txt 26433 23428 --- vim74.orig/runtime/doc/version5.txt 2013-08-10 11:25:07.000000000 +0000 26434 +++ vim74/runtime/doc/version5.txt 2014-0 4-27 05:20:57.415084533+000023429 +++ vim74/runtime/doc/version5.txt 2014-06-01 00:42:53.237533529 +0000 26435 23430 @@ -2020,7 +2020,7 @@ 26436 23431 … … 26444 23439 diff -Naur vim74.orig/runtime/doc/version7.txt vim74/runtime/doc/version7.txt 26445 23440 --- vim74.orig/runtime/doc/version7.txt 2013-08-10 12:23:06.000000000 +0000 26446 +++ vim74/runtime/doc/version7.txt 2014-0 4-27 05:20:57.428418198+000023441 +++ vim74/runtime/doc/version7.txt 2014-06-01 00:42:53.430866370 +0000 26447 23442 @@ -1,4 +1,4 @@ 26448 23443 -*version7.txt* For Vim version 7.4. Last change: 2013 Aug 10 … … 26488 23483 diff -Naur vim74.orig/runtime/doc/vi_diff.txt vim74/runtime/doc/vi_diff.txt 26489 23484 --- vim74.orig/runtime/doc/vi_diff.txt 2013-08-10 11:25:07.000000000 +0000 26490 +++ vim74/runtime/doc/vi_diff.txt 2014-0 4-27 05:20:57.428418198+000023485 +++ vim74/runtime/doc/vi_diff.txt 2014-06-01 00:42:53.477532917 +0000 26491 23486 @@ -1,4 +1,4 @@ 26492 23487 -*vi_diff.txt* For Vim version 7.4. Last change: 2012 Aug 08 … … 26515 23510 diff -Naur vim74.orig/runtime/doc/visual.txt vim74/runtime/doc/visual.txt 26516 23511 --- vim74.orig/runtime/doc/visual.txt 2013-08-10 11:25:08.000000000 +0000 26517 +++ vim74/runtime/doc/visual.txt 2014-0 4-27 05:20:57.448418693+000023512 +++ vim74/runtime/doc/visual.txt 2014-06-01 00:42:53.920865122 +0000 26518 23513 @@ -1,4 +1,4 @@ 26519 23514 -*visual.txt* For Vim version 7.4. Last change: 2012 Aug 15 … … 26546 23541 diff -Naur vim74.orig/runtime/doc/windows.txt vim74/runtime/doc/windows.txt 26547 23542 --- vim74.orig/runtime/doc/windows.txt 2013-08-10 11:25:08.000000000 +0000 26548 +++ vim74/runtime/doc/windows.txt 2014-0 4-27 05:20:57.448418693+000023543 +++ vim74/runtime/doc/windows.txt 2014-06-01 00:42:53.937531746 +0000 26549 23544 @@ -1,4 +1,4 @@ 26550 23545 -*windows.txt* For Vim version 7.4. Last change: 2012 Nov 15 … … 26582 23577 diff -Naur vim74.orig/runtime/filetype.vim vim74/runtime/filetype.vim 26583 23578 --- vim74.orig/runtime/filetype.vim 2013-08-03 15:50:05.000000000 +0000 26584 +++ vim74/runtime/filetype.vim 2014-0 4-27 05:20:57.455085527 +000023579 +++ vim74/runtime/filetype.vim 2014-06-01 00:42:54.130864587 +0000 26585 23580 @@ -1,7 +1,7 @@ 26586 23581 " Vim support file to detect file types … … 26764 23759 diff -Naur vim74.orig/runtime/ftplugin/changelog.vim vim74/runtime/ftplugin/changelog.vim 26765 23760 --- vim74.orig/runtime/ftplugin/changelog.vim 2012-08-23 20:47:22.000000000 +0000 26766 +++ vim74/runtime/ftplugin/changelog.vim 2014-0 4-27 05:20:57.465085774+000023761 +++ vim74/runtime/ftplugin/changelog.vim 2014-06-01 00:42:54.380863951 +0000 26767 23762 @@ -1,7 +1,7 @@ 26768 23763 " Vim filetype plugin file … … 26879 23874 diff -Naur vim74.orig/runtime/ftplugin/clojure.vim vim74/runtime/ftplugin/clojure.vim 26880 23875 --- vim74.orig/runtime/ftplugin/clojure.vim 2013-02-06 14:35:23.000000000 +0000 26881 +++ vim74/runtime/ftplugin/clojure.vim 2014-0 4-27 05:20:57.465085774+000023876 +++ vim74/runtime/ftplugin/clojure.vim 2014-06-01 00:42:54.384197276 +0000 26882 23877 @@ -1,44 +1,60 @@ 26883 23878 " Vim filetype plugin file … … 27011 24006 diff -Naur vim74.orig/runtime/ftplugin/cobol.vim vim74/runtime/ftplugin/cobol.vim 27012 24007 --- vim74.orig/runtime/ftplugin/cobol.vim 2010-05-15 11:04:03.000000000 +0000 27013 +++ vim74/runtime/ftplugin/cobol.vim 2014-0 4-27 05:20:57.465085774+000024008 +++ vim74/runtime/ftplugin/cobol.vim 2014-06-01 00:42:54.400863900 +0000 27014 24009 @@ -1,7 +1,7 @@ 27015 24010 " Vim filetype plugin file … … 27060 24055 diff -Naur vim74.orig/runtime/ftplugin/debchangelog.vim vim74/runtime/ftplugin/debchangelog.vim 27061 24056 --- vim74.orig/runtime/ftplugin/debchangelog.vim 2012-02-04 19:59:23.000000000 +0000 27062 +++ vim74/runtime/ftplugin/debchangelog.vim 2014-0 4-27 05:20:57.471752607+000024057 +++ vim74/runtime/ftplugin/debchangelog.vim 2014-06-01 00:42:54.534196894 +0000 27063 24058 @@ -3,7 +3,7 @@ 27064 24059 " Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org> … … 27081 24076 diff -Naur vim74.orig/runtime/ftplugin/fortran.vim vim74/runtime/ftplugin/fortran.vim 27082 24077 --- vim74.orig/runtime/ftplugin/fortran.vim 2012-04-18 07:32:40.000000000 +0000 27083 +++ vim74/runtime/ftplugin/fortran.vim 2014-0 4-27 05:20:57.478419439 +000024078 +++ vim74/runtime/ftplugin/fortran.vim 2014-06-01 00:42:54.750863009 +0000 27084 24079 @@ -1,12 +1,12 @@ 27085 24080 " Vim settings file … … 27133 24128 diff -Naur vim74.orig/runtime/ftplugin/j.vim vim74/runtime/ftplugin/j.vim 27134 24129 --- vim74.orig/runtime/ftplugin/j.vim 1970-01-01 00:00:00.000000000 +0000 27135 +++ vim74/runtime/ftplugin/j.vim 2014-0 4-27 05:20:57.485086272 +000024130 +++ vim74/runtime/ftplugin/j.vim 2014-06-01 00:42:55.014195672 +0000 27136 24131 @@ -0,0 +1,75 @@ 27137 24132 +" Vim filetype plugin … … 27212 24207 diff -Naur vim74.orig/runtime/ftplugin/jproperties.vim vim74/runtime/ftplugin/jproperties.vim 27213 24208 --- vim74.orig/runtime/ftplugin/jproperties.vim 1970-01-01 00:00:00.000000000 +0000 27214 +++ vim74/runtime/ftplugin/jproperties.vim 2014-0 4-27 05:20:57.488419688+000024209 +++ vim74/runtime/ftplugin/jproperties.vim 2014-06-01 00:42:55.057528895 +0000 27215 24210 @@ -0,0 +1,15 @@ 27216 24211 +" Vim filetype plugin … … 27231 24226 diff -Naur vim74.orig/runtime/ftplugin/lisp.vim vim74/runtime/ftplugin/lisp.vim 27232 24227 --- vim74.orig/runtime/ftplugin/lisp.vim 2013-02-13 11:35:55.000000000 +0000 27233 +++ vim74/runtime/ftplugin/lisp.vim 2014-0 4-27 05:20:57.491753103+000024228 +++ vim74/runtime/ftplugin/lisp.vim 2014-06-01 00:42:55.154195315 +0000 27234 24229 @@ -4,7 +4,7 @@ 27235 24230 " URL: http://sites.google.com/site/khorser/opensource/vim … … 27253 24248 diff -Naur vim74.orig/runtime/ftplugin/python.vim vim74/runtime/ftplugin/python.vim 27254 24249 --- vim74.orig/runtime/ftplugin/python.vim 2012-04-30 11:49:26.000000000 +0000 27255 +++ vim74/runtime/ftplugin/python.vim 2014-0 4-27 05:20:57.508420184+000024250 +++ vim74/runtime/ftplugin/python.vim 2014-06-01 00:42:55.670860666 +0000 27256 24251 @@ -1,7 +1,8 @@ 27257 24252 " Vim filetype plugin file … … 27336 24331 diff -Naur vim74.orig/runtime/ftplugin/registry.vim vim74/runtime/ftplugin/registry.vim 27337 24332 --- vim74.orig/runtime/ftplugin/registry.vim 1970-01-01 00:00:00.000000000 +0000 27338 +++ vim74/runtime/ftplugin/registry.vim 2014-0 4-27 05:20:57.511753600+000024333 +++ vim74/runtime/ftplugin/registry.vim 2014-06-01 00:42:55.717527214 +0000 27339 24334 @@ -0,0 +1,36 @@ 27340 24335 +" Vim filetype plugin file … … 27376 24371 diff -Naur vim74.orig/runtime/ftplugin/scheme.vim vim74/runtime/ftplugin/scheme.vim 27377 24372 --- vim74.orig/runtime/ftplugin/scheme.vim 2013-02-13 11:35:55.000000000 +0000 27378 +++ vim74/runtime/ftplugin/scheme.vim 2014-0 4-27 05:20:57.515087016 +000024373 +++ vim74/runtime/ftplugin/scheme.vim 2014-06-01 00:42:55.780860386 +0000 27379 24374 @@ -4,7 +4,7 @@ 27380 24375 " URL: http://sites.google.com/site/khorser/opensource/vim … … 27399 24394 diff -Naur vim74.orig/runtime/ftplugin/spec.vim vim74/runtime/ftplugin/spec.vim 27400 24395 --- vim74.orig/runtime/ftplugin/spec.vim 2012-03-07 12:16:03.000000000 +0000 27401 +++ vim74/runtime/ftplugin/spec.vim 2014-0 4-27 05:20:57.518420433+000024396 +++ vim74/runtime/ftplugin/spec.vim 2014-06-01 00:42:55.910860055 +0000 27402 24397 @@ -1,7 +1,8 @@ 27403 24398 " Plugin to update the %changelog section of RPM spec files … … 27424 24419 diff -Naur vim74.orig/runtime/ftplugin/systemverilog.vim vim74/runtime/ftplugin/systemverilog.vim 27425 24420 --- vim74.orig/runtime/ftplugin/systemverilog.vim 1970-01-01 00:00:00.000000000 +0000 27426 +++ vim74/runtime/ftplugin/systemverilog.vim 2014-0 4-27 05:20:57.521753849+000024421 +++ vim74/runtime/ftplugin/systemverilog.vim 2014-06-01 00:42:55.994193176 +0000 27427 24422 @@ -0,0 +1,11 @@ 27428 24423 +" Vim filetype plugin file … … 27439 24434 diff -Naur vim74.orig/runtime/indent/clojure.vim vim74/runtime/indent/clojure.vim 27440 24435 --- vim74.orig/runtime/indent/clojure.vim 2013-02-06 14:35:23.000000000 +0000 27441 +++ vim74/runtime/indent/clojure.vim 2014-0 4-27 05:20:57.541754345+000024436 +++ vim74/runtime/indent/clojure.vim 2014-06-01 00:42:56.610858273 +0000 27442 24437 @@ -1,23 +1,27 @@ 27443 24438 " Vim indent file … … 28132 25127 diff -Naur vim74.orig/runtime/indent/j.vim vim74/runtime/indent/j.vim 28133 25128 --- vim74.orig/runtime/indent/j.vim 1970-01-01 00:00:00.000000000 +0000 28134 +++ vim74/runtime/indent/j.vim 2014-0 4-27 05:20:57.555088009+000025129 +++ vim74/runtime/indent/j.vim 2014-06-01 00:42:56.970857356 +0000 28135 25130 @@ -0,0 +1,50 @@ 28136 25131 +" Vim indent file … … 28186 25181 diff -Naur vim74.orig/runtime/indent/php.vim vim74/runtime/indent/php.vim 28187 25182 --- vim74.orig/runtime/indent/php.vim 2013-08-07 09:36:56.000000000 +0000 28188 +++ vim74/runtime/indent/php.vim 2014-0 4-27 05:20:57.565088257+000028189 @@ -3, 7 +3,7@@25183 +++ vim74/runtime/indent/php.vim 2014-06-01 00:42:57.737522071 +0000 25184 @@ -3,8 +3,8 @@ 28190 25185 " Author: John Wellesz <John.wellesz (AT) teaser (DOT) fr> 28191 25186 " URL: http://www.2072productions.com/vim/indent/php.vim 28192 25187 " Home: https://github.com/2072/PHP-Indenting-for-VIm 28193 25188 -" 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 28196 25192 " 28197 25193 " 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 28200 25433 28201 25434 call cursor(last_line_num, 1) 28202 25435 - call search('}\|;\s*}'.endline, 'W') 28203 + call search('}\|;\s*}'.endline, 'cW') 25436 + if previous_line !~ '^}' 25437 + call search('}\|;\s*}'.endline, 'W') 25438 + end 28204 25439 let oldLastLine = last_line_num 28205 25440 let last_line_num = searchpair('{', '', '}', 'bW', 'Skippmatch()') 28206 25441 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) 28207 25481 diff -Naur vim74.orig/runtime/indent/sh.vim vim74/runtime/indent/sh.vim 28208 25482 --- vim74.orig/runtime/indent/sh.vim 2010-05-15 11:03:29.000000000 +0000 28209 +++ vim74/runtime/indent/sh.vim 2014-0 4-27 05:20:57.571755091+000025483 +++ vim74/runtime/indent/sh.vim 2014-06-01 00:42:57.920854937 +0000 28210 25484 @@ -1,7 +1,8 @@ 28211 25485 " Vim indent file … … 28244 25518 diff -Naur vim74.orig/runtime/indent/systemverilog.vim vim74/runtime/indent/systemverilog.vim 28245 25519 --- vim74.orig/runtime/indent/systemverilog.vim 1970-01-01 00:00:00.000000000 +0000 28246 +++ vim74/runtime/indent/systemverilog.vim 2014-0 4-27 05:20:57.571755091+000025520 +++ vim74/runtime/indent/systemverilog.vim 2014-06-01 00:42:57.954188186 +0000 28247 25521 @@ -0,0 +1,230 @@ 28248 25522 +" Vim indent file … … 28476 25750 + 28477 25751 +" vim:sw=2 25752 diff -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 28478 25839 diff -Naur vim74.orig/runtime/optwin.vim vim74/runtime/optwin.vim 28479 25840 --- vim74.orig/runtime/optwin.vim 2013-06-29 12:32:06.000000000 +0000 28480 +++ vim74/runtime/optwin.vim 2014-0 4-27 05:20:57.678424406+000025841 +++ vim74/runtime/optwin.vim 2014-06-01 00:43:00.977513821 +0000 28481 25842 @@ -1,7 +1,7 @@ 28482 25843 " These commands create the option window. … … 28499 25860 diff -Naur vim74.orig/runtime/plugin/getscriptPlugin.vim vim74/runtime/plugin/getscriptPlugin.vim 28500 25861 --- vim74.orig/runtime/plugin/getscriptPlugin.vim 2013-04-17 13:40:44.000000000 +0000 28501 +++ vim74/runtime/plugin/getscriptPlugin.vim 2014-0 4-27 05:20:57.678424406+000025862 +++ vim74/runtime/plugin/getscriptPlugin.vim 2014-06-01 00:43:01.010847069 +0000 28502 25863 @@ -1,7 +1,7 @@ 28503 25864 " --------------------------------------------------------------------- … … 28530 25891 diff -Naur vim74.orig/runtime/plugin/netrwPlugin.vim vim74/runtime/plugin/netrwPlugin.vim 28531 25892 --- vim74.orig/runtime/plugin/netrwPlugin.vim 2013-05-19 03:28:33.000000000 +0000 28532 +++ vim74/runtime/plugin/netrwPlugin.vim 2014-0 4-27 05:20:57.681757821+000025893 +++ vim74/runtime/plugin/netrwPlugin.vim 2014-06-01 00:43:01.040846993 +0000 28533 25894 @@ -1,9 +1,9 @@ 28534 25895 " netrwPlugin.vim: Handles file transfer and remote directory listing across a network … … 28549 25910 -"DechoTabOn 28550 25911 -let g:loaded_netrwPlugin = "v149" 28551 +let g:loaded_netrwPlugin = "v15 1"25912 +let g:loaded_netrwPlugin = "v152" 28552 25913 if v:version < 702 28553 25914 - echohl WarningMsg | echo "***netrw*** you need vim version 7.2 for this version of netrw" | echohl None … … 28714 26075 diff -Naur vim74.orig/runtime/syntax/a65.vim vim74/runtime/syntax/a65.vim 28715 26076 --- vim74.orig/runtime/syntax/a65.vim 2010-05-15 11:03:57.000000000 +0000 28716 +++ vim74/runtime/syntax/a65.vim 2014-0 4-27 05:20:57.818427882+000026077 +++ vim74/runtime/syntax/a65.vim 2014-06-01 00:43:04.117505825 +0000 28717 26078 @@ -1,7 +1,7 @@ 28718 26079 " Vim syntax file … … 28727 26088 diff -Naur vim74.orig/runtime/syntax/apache.vim vim74/runtime/syntax/apache.vim 28728 26089 --- vim74.orig/runtime/syntax/apache.vim 2010-05-15 11:03:57.000000000 +0000 28729 +++ vim74/runtime/syntax/apache.vim 2014-0 4-27 05:20:57.825094716+000026090 +++ vim74/runtime/syntax/apache.vim 2014-06-01 00:43:04.257505469 +0000 28730 26091 @@ -1,11 +1,9 @@ 28731 26092 " Vim syntax file … … 28765 26126 diff -Naur vim74.orig/runtime/syntax/arduino.vim vim74/runtime/syntax/arduino.vim 28766 26127 --- vim74.orig/runtime/syntax/arduino.vim 1970-01-01 00:00:00.000000000 +0000 28767 +++ vim74/runtime/syntax/arduino.vim 2014-0 4-27 05:20:57.825094716+000026128 +++ vim74/runtime/syntax/arduino.vim 2014-06-01 00:43:04.297505367 +0000 28768 26129 @@ -0,0 +1,61 @@ 28769 26130 +" Vim syntax file … … 28830 26191 diff -Naur vim74.orig/runtime/syntax/asm.vim vim74/runtime/syntax/asm.vim 28831 26192 --- vim74.orig/runtime/syntax/asm.vim 2012-04-09 19:37:34.000000000 +0000 28832 +++ vim74/runtime/syntax/asm.vim 2014-0 4-27 05:20:57.825094716+000026193 +++ vim74/runtime/syntax/asm.vim 2014-06-01 00:43:04.327505291 +0000 28833 26194 @@ -3,7 +3,7 @@ 28834 26195 " Maintainer: Erik Wognsen <erik.wognsen@gmail.com> … … 28855 26216 diff -Naur vim74.orig/runtime/syntax/bib.vim vim74/runtime/syntax/bib.vim 28856 26217 --- vim74.orig/runtime/syntax/bib.vim 2011-12-30 11:30:00.000000000 +0000 28857 +++ vim74/runtime/syntax/bib.vim 2014-0 4-27 05:20:57.835094963+000026218 +++ vim74/runtime/syntax/bib.vim 2014-06-01 00:43:04.514171482 +0000 28858 26219 @@ -2,7 +2,7 @@ 28859 26220 " Language: BibTeX (bibliographic database format for (La)TeX) … … 28876 26237 diff -Naur vim74.orig/runtime/syntax/clean.vim vim74/runtime/syntax/clean.vim 28877 26238 --- vim74.orig/runtime/syntax/clean.vim 2013-06-19 19:34:33.000000000 +0000 28878 +++ vim74/runtime/syntax/clean.vim 2014-0 4-27 05:20:57.841761796+000026239 +++ vim74/runtime/syntax/clean.vim 2014-06-01 00:43:04.847503967 +0000 28879 26240 @@ -2,7 +2,7 @@ 28880 26241 " Language: Clean … … 28938 26299 diff -Naur vim74.orig/runtime/syntax/clojure.vim vim74/runtime/syntax/clojure.vim 28939 26300 --- vim74.orig/runtime/syntax/clojure.vim 2013-02-06 14:35:23.000000000 +0000 28940 +++ vim74/runtime/syntax/clojure.vim 2014-0 4-27 05:20:57.845095211+000026301 +++ vim74/runtime/syntax/clojure.vim 2014-06-01 00:43:04.904170489 +0000 28941 26302 @@ -1,34 +1,37 @@ 28942 26303 " Vim syntax file … … 29204 26565 -" vim:sts=4 sw=4 et: 29205 26566 +" vim:sts=8:sw=8:ts=8:noet:smc=0 26567 diff -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 29206 26596 diff -Naur vim74.orig/runtime/syntax/css.vim vim74/runtime/syntax/css.vim 29207 26597 --- vim74.orig/runtime/syntax/css.vim 2013-07-23 19:08:29.000000000 +0000 29208 +++ vim74/runtime/syntax/css.vim 2014-0 4-27 05:20:57.851762044+000026598 +++ vim74/runtime/syntax/css.vim 2014-06-01 00:43:05.110836629 +0000 29209 26599 @@ -6,7 +6,7 @@ 29210 26600 " Nikolai Weibull (Add CSS2 support) … … 29959 27349 diff -Naur vim74.orig/runtime/syntax/d.vim vim74/runtime/syntax/d.vim 29960 27350 --- vim74.orig/runtime/syntax/d.vim 2013-05-23 20:52:24.000000000 +0000 29961 +++ vim74/runtime/syntax/d.vim 2014-0 4-27 05:20:57.855095460+000027351 +++ vim74/runtime/syntax/d.vim 2014-06-01 00:43:05.267502897 +0000 29962 27352 @@ -2,8 +2,8 @@ 29963 27353 " … … 30052 27442 diff -Naur vim74.orig/runtime/syntax/datascript.vim vim74/runtime/syntax/datascript.vim 30053 27443 --- vim74.orig/runtime/syntax/datascript.vim 2012-04-30 10:59:58.000000000 +0000 30054 +++ vim74/runtime/syntax/datascript.vim 2014-0 4-27 05:20:57.855095460+000027444 +++ vim74/runtime/syntax/datascript.vim 2014-06-01 00:43:05.270836222 +0000 30055 27445 @@ -1,7 +1,7 @@ 30056 27446 " Vim syntax file … … 30101 27491 diff -Naur vim74.orig/runtime/syntax/debchangelog.vim vim74/runtime/syntax/debchangelog.vim 30102 27492 --- vim74.orig/runtime/syntax/debchangelog.vim 2013-05-17 15:25:15.000000000 +0000 30103 +++ vim74/runtime/syntax/debchangelog.vim 2014-0 4-27 05:20:57.855095460+000027493 +++ vim74/runtime/syntax/debchangelog.vim 2014-06-01 00:43:05.340836044 +0000 30104 27494 @@ -3,7 +3,7 @@ 30105 27495 " Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org> … … 30122 27512 diff -Naur vim74.orig/runtime/syntax/debcontrol.vim vim74/runtime/syntax/debcontrol.vim 30123 27513 --- vim74.orig/runtime/syntax/debcontrol.vim 2013-05-21 10:54:11.000000000 +0000 30124 +++ vim74/runtime/syntax/debcontrol.vim 2014-0 4-27 05:20:57.858428875+000027514 +++ vim74/runtime/syntax/debcontrol.vim 2014-06-01 00:43:05.344169369 +0000 30125 27515 @@ -3,7 +3,7 @@ 30126 27516 " Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org> … … 30143 27533 diff -Naur vim74.orig/runtime/syntax/debsources.vim vim74/runtime/syntax/debsources.vim 30144 27534 --- vim74.orig/runtime/syntax/debsources.vim 2013-05-17 15:25:15.000000000 +0000 30145 +++ vim74/runtime/syntax/debsources.vim 2014-0 4-27 05:20:57.858428875+000027535 +++ vim74/runtime/syntax/debsources.vim 2014-06-01 00:43:05.357502668 +0000 30146 27536 @@ -2,7 +2,7 @@ 30147 27537 " Language: Debian sources.list … … 30164 27554 diff -Naur vim74.orig/runtime/syntax/diff.vim vim74/runtime/syntax/diff.vim 30165 27555 --- vim74.orig/runtime/syntax/diff.vim 2013-07-24 09:47:50.000000000 +0000 30166 +++ vim74/runtime/syntax/diff.vim 2014-0 4-27 05:20:57.858428875+000027556 +++ vim74/runtime/syntax/diff.vim 2014-06-01 00:43:05.440835789 +0000 30167 27557 @@ -2,7 +2,7 @@ 30168 27558 " Language: Diff (context or unified) … … 30185 27575 diff -Naur vim74.orig/runtime/syntax/dircolors.vim vim74/runtime/syntax/dircolors.vim 30186 27576 --- vim74.orig/runtime/syntax/dircolors.vim 2012-04-25 09:42:39.000000000 +0000 30187 +++ vim74/runtime/syntax/dircolors.vim 2014-0 4-27 05:20:57.861762292+000027577 +++ vim74/runtime/syntax/dircolors.vim 2014-06-01 00:43:05.454169089 +0000 30188 27578 @@ -1,751 +1,213 @@ 30189 27579 " Vim syntax file … … 31132 28522 diff -Naur vim74.orig/runtime/syntax/dnsmasq.vim vim74/runtime/syntax/dnsmasq.vim 31133 28523 --- vim74.orig/runtime/syntax/dnsmasq.vim 2012-05-19 12:57:09.000000000 +0000 31134 +++ vim74/runtime/syntax/dnsmasq.vim 2014-0 4-27 05:20:57.861762292+000028524 +++ vim74/runtime/syntax/dnsmasq.vim 2014-06-01 00:43:05.514168936 +0000 31135 28525 @@ -1,26 +1,19 @@ 31136 28526 " Vim syntax file … … 31145 28535 -" Version: 2.61-1 31146 28536 -" Last Change: 2012 May 19 31147 +" Version: 2. 6731148 +" Last Change: 201 3 Nov 0328537 +" Version: 2.70 28538 +" Last Change: 2014 Apr 30 31149 28539 " Modeline: vim: ts=8:sw=2:sts=2: 31150 28540 " … … 31213 28603 syn match DnsmasqKeyword "^\s*dhcp-script\>" 31214 28604 syn match DnsmasqKeyword "^\s*dhcp-scriptuser\>" 31215 @@ -135,6 +131, 7@@28605 @@ -135,6 +131,10 @@ 31216 28606 syn match DnsmasqKeyword "^\s*dhcp-subscrid\>" 31217 28607 syn match DnsmasqKeyword "^\s*dhcp-userclass\>" 31218 28608 syn match DnsmasqKeyword "^\s*dhcp-vendorclass\>" 31219 28609 +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\>" 31220 28613 syn match DnsmasqKeyword "^\s*dns-forward-max\>" 31221 28614 syn match DnsmasqKeyword "^\s*domain\>" 31222 28615 syn match DnsmasqKeyword "^\s*domain-needed\>" 31223 @@ -149, 6 +146,7@@28616 @@ -149,18 +149,21 @@ 31224 28617 syn match DnsmasqKeyword "^\s*host-record\>" 31225 28618 syn match DnsmasqKeyword "^\s*interface\>" … … 31229 28622 syn match DnsmasqKeyword "^\s*leasefile-ro\>" 31230 28623 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\>" 31232 28631 syn match DnsmasqKeyword "^\s*log-facility\>" 31233 28632 syn match DnsmasqKeyword "^\s*log-queries\>" … … 31237 28636 syn match DnsmasqKeyword "^\s*mx-host\>" 31238 28637 syn match DnsmasqKeyword "^\s*mx-target\>" 31239 @@ -180, 6 +179,10@@28638 @@ -180,15 +183,22 @@ 31240 28639 syn match DnsmasqKeyword "^\s*pxe-prompt\>" 31241 28640 syn match DnsmasqKeyword "^\s*pxe-service\>" … … 31248 28647 syn match DnsmasqKeyword "^\s*rebind-domain-ok\>" 31249 28648 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\>" 31251 28654 syn match DnsmasqKeyword "^\s*srv-host\>" 31252 28655 syn match DnsmasqKeyword "^\s*stop-dns-rebind\>" … … 31258 28661 diff -Naur vim74.orig/runtime/syntax/dts.vim vim74/runtime/syntax/dts.vim 31259 28662 --- vim74.orig/runtime/syntax/dts.vim 2013-04-05 14:25:40.000000000 +0000 31260 +++ vim74/runtime/syntax/dts.vim 2014-0 4-27 05:20:57.868429125+000028663 +++ vim74/runtime/syntax/dts.vim 2014-06-01 00:43:05.680835178 +0000 31261 28664 @@ -1,7 +1,7 @@ 31262 28665 " Vim syntax file … … 31289 28692 diff -Naur vim74.orig/runtime/syntax/euphoria3.vim vim74/runtime/syntax/euphoria3.vim 31290 28693 --- vim74.orig/runtime/syntax/euphoria3.vim 1970-01-01 00:00:00.000000000 +0000 31291 +++ vim74/runtime/syntax/euphoria3.vim 2014-0 4-27 05:20:57.875095957+000028694 +++ vim74/runtime/syntax/euphoria3.vim 2014-06-01 00:43:05.907501268 +0000 31292 28695 @@ -0,0 +1,135 @@ 31293 28696 +" Vim syntax file … … 31428 28831 diff -Naur vim74.orig/runtime/syntax/euphoria4.vim vim74/runtime/syntax/euphoria4.vim 31429 28832 --- vim74.orig/runtime/syntax/euphoria4.vim 1970-01-01 00:00:00.000000000 +0000 31430 +++ vim74/runtime/syntax/euphoria4.vim 2014-0 4-27 05:20:57.875095957 +000028833 +++ vim74/runtime/syntax/euphoria4.vim 2014-06-01 00:43:05.914167917 +0000 31431 28834 @@ -0,0 +1,247 @@ 31432 28835 +" Vim syntax file … … 31679 29082 diff -Naur vim74.orig/runtime/syntax/help.vim vim74/runtime/syntax/help.vim 31680 29083 --- vim74.orig/runtime/syntax/help.vim 2013-07-07 11:27:18.000000000 +0000 31681 +++ vim74/runtime/syntax/help.vim 2014-0 4-27 05:20:57.895096453+000029084 +++ vim74/runtime/syntax/help.vim 2014-06-01 00:43:06.510833065 +0000 31682 29085 @@ -1,7 +1,7 @@ 31683 29086 " Vim syntax file … … 31722 29125 diff -Naur vim74.orig/runtime/syntax/j.vim vim74/runtime/syntax/j.vim 31723 29126 --- vim74.orig/runtime/syntax/j.vim 1970-01-01 00:00:00.000000000 +0000 31724 +++ vim74/runtime/syntax/j.vim 2014-0 4-27 05:20:57.905096702+000029127 +++ vim74/runtime/syntax/j.vim 2014-06-01 00:43:06.840832224 +0000 31725 29128 @@ -0,0 +1,134 @@ 31726 29129 +" Vim syntax file … … 31860 29263 diff -Naur vim74.orig/runtime/syntax/mail.vim vim74/runtime/syntax/mail.vim 31861 29264 --- vim74.orig/runtime/syntax/mail.vim 2013-07-15 21:28:26.000000000 +0000 31862 +++ vim74/runtime/syntax/mail.vim 2014-0 4-27 05:20:57.925097198+000029265 +++ vim74/runtime/syntax/mail.vim 2014-06-01 00:43:07.424164072 +0000 31863 29266 @@ -2,7 +2,7 @@ 31864 29267 " Language: Mail file … … 31881 29284 diff -Naur vim74.orig/runtime/syntax/masm.vim vim74/runtime/syntax/masm.vim 31882 29285 --- vim74.orig/runtime/syntax/masm.vim 2012-02-04 19:24:10.000000000 +0000 31883 +++ vim74/runtime/syntax/masm.vim 2014-0 4-27 05:20:57.928430615+000029286 +++ vim74/runtime/syntax/masm.vim 2014-06-01 00:43:07.554163741 +0000 31884 29287 @@ -2,14 +2,11 @@ 31885 29288 " Language: Microsoft Macro Assembler (80x86) … … 32020 29423 diff -Naur vim74.orig/runtime/syntax/mix.vim vim74/runtime/syntax/mix.vim 32021 29424 --- vim74.orig/runtime/syntax/mix.vim 1970-01-01 00:00:00.000000000 +0000 32022 +++ vim74/runtime/syntax/mix.vim 2014-0 4-27 05:20:57.931764031+000029425 +++ vim74/runtime/syntax/mix.vim 2014-06-01 00:43:07.694163385 +0000 32023 29426 @@ -0,0 +1,83 @@ 32024 29427 +" Vim syntax file … … 32107 29510 diff -Naur vim74.orig/runtime/syntax/netrw.vim vim74/runtime/syntax/netrw.vim 32108 29511 --- vim74.orig/runtime/syntax/netrw.vim 2013-02-25 17:23:59.000000000 +0000 32109 +++ vim74/runtime/syntax/netrw.vim 2014-0 4-27 05:20:57.945097695+000029512 +++ vim74/runtime/syntax/netrw.vim 2014-06-01 00:43:08.124162290 +0000 32110 29513 @@ -1,7 +1,7 @@ 32111 29514 " Language : Netrw Remote-Directory Listing Syntax … … 32155 29558 diff -Naur vim74.orig/runtime/syntax/php.vim vim74/runtime/syntax/php.vim 32156 29559 --- vim74.orig/runtime/syntax/php.vim 2012-12-11 20:15:31.000000000 +0000 32157 +++ vim74/runtime/syntax/php.vim 2014-0 4-27 05:20:57.955097944 +000029560 +++ vim74/runtime/syntax/php.vim 2014-06-01 00:43:08.470828074 +0000 32158 29561 @@ -1,7 +1,7 @@ 32159 29562 " Vim syntax file … … 32196 29599 diff -Naur vim74.orig/runtime/syntax/rst.vim vim74/runtime/syntax/rst.vim 32197 29600 --- vim74.orig/runtime/syntax/rst.vim 2013-06-04 14:41:25.000000000 +0000 32198 +++ vim74/runtime/syntax/rst.vim 2014-0 4-27 05:20:57.975098441+000029601 +++ vim74/runtime/syntax/rst.vim 2014-06-01 00:43:09.164159642 +0000 32199 29602 @@ -1,7 +1,7 @@ 32200 29603 " Vim syntax file … … 32217 29620 diff -Naur vim74.orig/runtime/syntax/sh.vim vim74/runtime/syntax/sh.vim 32218 29621 --- vim74.orig/runtime/syntax/sh.vim 2013-07-05 16:35:45.000000000 +0000 32219 +++ vim74/runtime/syntax/sh.vim 2014-0 4-27 05:20:57.981765272+000029622 +++ vim74/runtime/syntax/sh.vim 2014-06-01 00:43:09.417492330 +0000 32220 29623 @@ -2,10 +2,10 @@ 32221 29624 " Language: shell (sh) Korn shell (ksh) bash (sh) … … 32335 29738 diff -Naur vim74.orig/runtime/syntax/spec.vim vim74/runtime/syntax/spec.vim 32336 29739 --- vim74.orig/runtime/syntax/spec.vim 2010-05-15 11:03:57.000000000 +0000 32337 +++ vim74/runtime/syntax/spec.vim 2014-0 4-27 05:20:57.991765521+000029740 +++ vim74/runtime/syntax/spec.vim 2014-06-01 00:43:09.717491566 +0000 32338 29741 @@ -1,8 +1,9 @@ 32339 29742 " Filename: spec.vim … … 32370 29773 diff -Naur vim74.orig/runtime/syntax/svn.vim vim74/runtime/syntax/svn.vim 32371 29774 --- vim74.orig/runtime/syntax/svn.vim 2012-07-25 13:08:55.000000000 +0000 32372 +++ vim74/runtime/syntax/svn.vim 2014-0 4-27 05:20:57.998432353 +000029775 +++ vim74/runtime/syntax/svn.vim 2014-06-01 00:43:09.984157553 +0000 32373 29776 @@ -2,15 +2,18 @@ 32374 29777 " Language: Subversion (svn) commit file … … 32435 29838 diff -Naur vim74.orig/runtime/syntax/systemverilog.vim vim74/runtime/syntax/systemverilog.vim 32436 29839 --- vim74.orig/runtime/syntax/systemverilog.vim 1970-01-01 00:00:00.000000000 +0000 32437 +++ vim74/runtime/syntax/systemverilog.vim 2014-0 4-27 05:20:58.001765768+000029840 +++ vim74/runtime/syntax/systemverilog.vim 2014-06-01 00:43:10.054157375 +0000 32438 29841 @@ -0,0 +1,101 @@ 32439 29842 +" Vim syntax file … … 32540 29943 diff -Naur vim74.orig/runtime/syntax/tcl.vim vim74/runtime/syntax/tcl.vim 32541 29944 --- vim74.orig/runtime/syntax/tcl.vim 2010-05-15 11:03:56.000000000 +0000 32542 +++ vim74/runtime/syntax/tcl.vim 2014-0 4-27 05:20:58.005099185 +000029945 +++ vim74/runtime/syntax/tcl.vim 2014-06-01 00:43:10.170823745 +0000 32543 29946 @@ -6,11 +6,9 @@ 32544 29947 " (previously Matt Neumann <mattneu@purpleturtle.com>) … … 32675 30078 diff -Naur vim74.orig/runtime/syntax/tex.vim vim74/runtime/syntax/tex.vim 32676 30079 --- vim74.orig/runtime/syntax/tex.vim 2013-07-05 16:35:45.000000000 +0000 32677 +++ vim74/runtime/syntax/tex.vim 2014-0 4-27 05:20:58.005099185+000030080 +++ vim74/runtime/syntax/tex.vim 2014-06-01 00:43:10.227490267 +0000 32678 30081 @@ -1,8 +1,8 @@ 32679 30082 " Vim syntax file … … 32818 30221 diff -Naur vim74.orig/runtime/syntax/upstreamlog.vim vim74/runtime/syntax/upstreamlog.vim 32819 30222 --- vim74.orig/runtime/syntax/upstreamlog.vim 2013-08-03 15:47:26.000000000 +0000 32820 +++ vim74/runtime/syntax/upstreamlog.vim 2014-0 4-27 05:20:58.011766018+000030223 +++ vim74/runtime/syntax/upstreamlog.vim 2014-06-01 00:43:10.500822905 +0000 32821 30224 @@ -1,7 +1,7 @@ 32822 30225 " Vim syntax file … … 32847 30250 diff -Naur vim74.orig/runtime/syntax/usserverlog.vim vim74/runtime/syntax/usserverlog.vim 32848 30251 --- vim74.orig/runtime/syntax/usserverlog.vim 2013-08-03 15:47:26.000000000 +0000 32849 +++ vim74/runtime/syntax/usserverlog.vim 2014-0 4-27 05:20:58.015099434+000030252 +++ vim74/runtime/syntax/usserverlog.vim 2014-06-01 00:43:10.510822879 +0000 32850 30253 @@ -1,7 +1,7 @@ 32851 30254 " Vim syntax file … … 32876 30279 diff -Naur vim74.orig/runtime/syntax/usw2kagtlog.vim vim74/runtime/syntax/usw2kagtlog.vim 32877 30280 --- vim74.orig/runtime/syntax/usw2kagtlog.vim 2013-08-03 15:47:26.000000000 +0000 32878 +++ vim74/runtime/syntax/usw2kagtlog.vim 2014-0 4-27 05:20:58.015099434+000030281 +++ vim74/runtime/syntax/usw2kagtlog.vim 2014-06-01 00:43:10.510822879 +0000 32879 30282 @@ -1,7 +1,7 @@ 32880 30283 " Vim syntax file … … 32905 30308 diff -Naur vim74.orig/runtime/syntax/vhdl.vim vim74/runtime/syntax/vhdl.vim 32906 30309 --- vim74.orig/runtime/syntax/vhdl.vim 2012-06-01 16:05:47.000000000 +0000 32907 +++ vim74/runtime/syntax/vhdl.vim 2014-0 4-27 05:20:58.015099434+000030310 +++ vim74/runtime/syntax/vhdl.vim 2014-06-01 00:43:10.607489300 +0000 32908 30311 @@ -1,12 +1,12 @@ 32909 30312 " Vim syntax file … … 33059 30462 diff -Naur vim74.orig/runtime/syntax/vim.vim vim74/runtime/syntax/vim.vim 33060 30463 --- vim74.orig/runtime/syntax/vim.vim 2013-07-05 16:35:45.000000000 +0000 33061 +++ vim74/runtime/syntax/vim.vim 2014-0 4-27 05:20:58.018432850+000030464 +++ vim74/runtime/syntax/vim.vim 2014-06-01 00:43:10.670822472 +0000 33062 30465 @@ -1,8 +1,8 @@ 33063 30466 " Vim syntax file … … 33164 30567 diff -Naur vim74.orig/runtime/syntax/yacc.vim vim74/runtime/syntax/yacc.vim 33165 30568 --- vim74.orig/runtime/syntax/yacc.vim 2012-11-15 01:25:58.000000000 +0000 33166 +++ vim74/runtime/syntax/yacc.vim 2014-0 4-27 05:20:58.031766515+000030569 +++ vim74/runtime/syntax/yacc.vim 2014-06-01 00:43:11.070821453 +0000 33167 30570 @@ -1,8 +1,8 @@ 33168 30571 " Vim syntax file … … 33187 30590 diff -Naur vim74.orig/runtime/syntax/yaml.vim vim74/runtime/syntax/yaml.vim 33188 30591 --- vim74.orig/runtime/syntax/yaml.vim 2010-10-08 13:33:39.000000000 +0000 33189 +++ vim74/runtime/syntax/yaml.vim 2014-0 4-27 05:20:58.031766515+000030592 +++ vim74/runtime/syntax/yaml.vim 2014-06-01 00:43:11.080821428 +0000 33190 30593 @@ -108,9 +108,10 @@ 33191 30594 syn match yamlFlowMappingMerge /<<\ze\s*:/ contained nextgroup=yamlKeyValueDelimiter … … 33203 30606 diff -Naur vim74.orig/runtime/tutor/tutor vim74/runtime/tutor/tutor 33204 30607 --- vim74.orig/runtime/tutor/tutor 2012-10-03 13:29:40.000000000 +0000 33205 +++ vim74/runtime/tutor/tutor 2014-0 4-27 05:20:58.041766762+000030608 +++ vim74/runtime/tutor/tutor 2014-06-01 00:43:11.947485887 +0000 33206 30609 @@ -55,8 +55,8 @@ 33207 30610 2. Type: :q! <ENTER>. … … 33217 30620 diff -Naur vim74.orig/runtime/tutor/tutor.es vim74/runtime/tutor/tutor.es 33218 30621 --- vim74.orig/runtime/tutor/tutor.es 2010-05-15 11:04:02.000000000 +0000 33219 +++ vim74/runtime/tutor/tutor.es 2014-0 4-27 05:20:58.048433595+000030622 +++ vim74/runtime/tutor/tutor.es 2014-06-01 00:43:12.157485353 +0000 33220 30623 @@ -121,7 +121,7 @@ 33221 30624 h (izquierda) j (abajo) k (arriba) l (derecha) … … 33229 30632 diff -Naur vim74.orig/runtime/tutor/tutor.it vim74/runtime/tutor/tutor.it 33230 30633 --- vim74.orig/runtime/tutor/tutor.it 2010-05-23 09:00:00.000000000 +0000 33231 +++ vim74/runtime/tutor/tutor.it 2014-0 4-27 05:20:58.055100426+000030634 +++ vim74/runtime/tutor/tutor.it 2014-06-01 00:43:12.324151595 +0000 33232 30635 @@ -638,7 +638,7 @@ 33233 30636 NOTA: Se esci da Vim e riesegui Vim battendo vim TEST , il file aperto … … 33241 30644 diff -Naur vim74.orig/runtime/tutor/tutor.it.utf-8 vim74/runtime/tutor/tutor.it.utf-8 33242 30645 --- 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-0 4-27 05:20:58.055100426+000030646 +++ vim74/runtime/tutor/tutor.it.utf-8 2014-06-01 00:43:12.337484894 +0000 33244 30647 @@ -638,7 +638,7 @@ 33245 30648 NOTA: Se esci da Vim e riesegui Vim battendo vim TEST , il file aperto … … 33253 30656 diff -Naur vim74.orig/runtime/tutor/tutor.pt vim74/runtime/tutor/tutor.pt 33254 30657 --- vim74.orig/runtime/tutor/tutor.pt 2010-08-11 20:54:33.000000000 +0000 33255 +++ vim74/runtime/tutor/tutor.pt 2014-0 4-27 05:20:58.065100676+000030658 +++ vim74/runtime/tutor/tutor.pt 2014-06-01 00:43:12.544151035 +0000 33256 30659 @@ -58,11 +58,11 @@ 33257 30660 Isso sai do editor SEM salvar qualquer mudança que tenha sido feita. … … 33280 30683 diff -Naur vim74.orig/runtime/tutor/tutor.pt.utf-8 vim74/runtime/tutor/tutor.pt.utf-8 33281 30684 --- 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-0 4-27 05:20:58.065100676+000030685 +++ vim74/runtime/tutor/tutor.pt.utf-8 2014-06-01 00:43:12.567484309 +0000 33283 30686 @@ -58,11 +58,11 @@ 33284 30687 Isso sai do editor SEM salvar qualquer mudança que tenha sido feita. … … 33307 30710 diff -Naur vim74.orig/runtime/vimlogo.eps vim74/runtime/vimlogo.eps 33308 30711 --- vim74.orig/runtime/vimlogo.eps 2010-05-15 11:03:57.000000000 +0000 33309 +++ vim74/runtime/vimlogo.eps 2014-0 4-27 05:20:58.078434340+000030712 +++ vim74/runtime/vimlogo.eps 2014-06-01 00:43:12.880816844 +0000 33310 30713 @@ -1,791 +1,803 @@ 33311 30714 -%!PS-Adobe-3.0 EPSF-3.0 … … 34904 32307 diff -Naur vim74.orig/runtime/vimrc_example.vim vim74/runtime/vimrc_example.vim 34905 32308 --- vim74.orig/runtime/vimrc_example.vim 2011-04-15 18:58:36.000000000 +0000 34906 +++ vim74/runtime/vimrc_example.vim 2014-0 4-27 05:20:58.078434340+000032309 +++ vim74/runtime/vimrc_example.vim 2014-06-01 00:43:12.944150016 +0000 34907 32310 @@ -1,7 +1,7 @@ 34908 32311 " An example for a vimrc file. … … 34926 32329 diff -Naur vim74.orig/src/GvimExt/Make_cyg.mak vim74/src/GvimExt/Make_cyg.mak 34927 32330 --- vim74.orig/src/GvimExt/Make_cyg.mak 2011-09-30 14:45:49.000000000 +0000 34928 +++ vim74/src/GvimExt/Make_cyg.mak 2014-0 4-27 05:20:58.078434340+000032331 +++ vim74/src/GvimExt/Make_cyg.mak 2014-06-01 00:43:13.007483188 +0000 34929 32332 @@ -31,12 +31,12 @@ 34930 32333 ifeq ($(CROSS),yes) … … 34945 32348 diff -Naur vim74.orig/src/Make_bc5.mak vim74/src/Make_bc5.mak 34946 32349 --- vim74.orig/src/Make_bc5.mak 2013-06-03 18:09:58.000000000 +0000 34947 +++ vim74/src/Make_bc5.mak 2014-0 4-27 05:20:58.085101172+000032350 +++ vim74/src/Make_bc5.mak 2014-06-01 00:43:13.324149048 +0000 34948 32351 @@ -419,7 +419,7 @@ 34949 32352 ALIGNARG = -a$(ALIGN) … … 34957 32360 diff -Naur vim74.orig/src/Make_cyg.mak vim74/src/Make_cyg.mak 34958 32361 --- vim74.orig/src/Make_cyg.mak 2013-07-06 11:32:11.000000000 +0000 34959 +++ vim74/src/Make_cyg.mak 2014-0 4-27 05:20:58.085101172+000032362 +++ vim74/src/Make_cyg.mak 2014-06-01 00:43:13.337482348 +0000 34960 32363 @@ -1,6 +1,6 @@ 34961 32364 # … … 34995 32398 diff -Naur vim74.orig/src/Make_ming.mak vim74/src/Make_ming.mak 34996 32399 --- vim74.orig/src/Make_ming.mak 2013-07-06 11:32:11.000000000 +0000 34997 +++ vim74/src/Make_ming.mak 2014-0 4-27 05:20:58.088434588+000032400 +++ vim74/src/Make_ming.mak 2014-06-01 00:43:13.407482170 +0000 34998 32401 @@ -359,6 +359,7 @@ 34999 32402 … … 35036 32439 diff -Naur vim74.orig/src/Make_mvc.mak vim74/src/Make_mvc.mak 35037 32440 --- vim74.orig/src/Make_mvc.mak 2013-07-09 11:13:12.000000000 +0000 35038 +++ vim74/src/Make_mvc.mak 2014-0 4-27 05:20:58.088434588+000032441 +++ vim74/src/Make_mvc.mak 2014-06-01 00:43:13.444148743 +0000 35039 32442 @@ -424,6 +424,12 @@ 35040 32443 !if "$(_NMAKE_VER)" == "11.00.60610.1" … … 35099 32502 LINKARGS1 = $(LINKARGS1) /LTCG:STATUS 35100 32503 !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 35101 32512 diff -Naur vim74.orig/src/Make_vms.mms vim74/src/Make_vms.mms 35102 32513 --- vim74.orig/src/Make_vms.mms 2013-05-06 02:06:04.000000000 +0000 35103 +++ vim74/src/Make_vms.mms 2014-0 4-27 05:20:58.091768003+000032514 +++ vim74/src/Make_vms.mms 2014-06-01 00:43:13.494148616 +0000 35104 32515 @@ -2,7 +2,7 @@ 35105 32516 # Makefile for Vim on OpenVMS … … 35217 32628 diff -Naur vim74.orig/src/Makefile vim74/src/Makefile 35218 32629 --- vim74.orig/src/Makefile 2013-08-10 12:21:15.000000000 +0000 35219 +++ vim74/src/Makefile 2014-0 4-27 05:20:58.095101420+000032630 +++ vim74/src/Makefile 2014-06-01 00:43:13.524148539 +0000 35220 32631 @@ -546,6 +546,7 @@ 35221 32632 # again. … … 35236 32647 #PURIFY = purify 35237 32648 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 35242 32662 - 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 \ 35244 32668 + GUI_INC_LOC="$(GUI_INC_LOC)" GUI_LIB_LOC="$(GUI_LIB_LOC)" \ 35245 32669 CC="$(CC)" CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" \ 35246 32670 LDFLAGS="$(LDFLAGS)" $(CONF_SHELL) srcdir="$(srcdir)" \ 35247 32671 ./configure $(CONF_OPT_GUI) $(CONF_OPT_X) $(CONF_OPT_XSMP) \ 35248 @@ -1679,7 +168 4,8 @@32672 @@ -1679,7 +1686,8 @@ 35249 32673 $(CONF_OPT_COMPBY) $(CONF_OPT_ACL) $(CONF_OPT_NETBEANS) \ 35250 32674 $(CONF_ARGS) $(CONF_OPT_MZSCHEME) $(CONF_OPT_PLTHOME) \ … … 35256 32680 # Use "make reconfig" to rerun configure without cached values. 35257 32681 # When config.h changes, most things will be recompiled automatically. 35258 @@ -1710,7 +171 6,7 @@32682 @@ -1710,7 +1718,7 @@ 35259 32683 # - Uses ">config.log" instead of "./config.log". 35260 32684 autoconf: … … 35265 32689 chmod 755 auto/configure 35266 32690 mv -f configure.save configure 35267 @@ -1861,7 +186 7,7 @@32691 @@ -1861,7 +1869,7 @@ 35268 32692 -if test $(VIMTARGET) != vim -a ! -r vim; then \ 35269 32693 ln -s $(VIMTARGET) vim; \ … … 35274 32698 35275 32699 unittesttargets: 35276 @@ -1874,6 +188 0,8@@32700 @@ -1874,6 +1882,9 @@ 35277 32701 35278 32702 # Run individual test, assuming that Vim was already compiled. 35279 32703 test1 test2 test3 test4 test5 test6 test7 test8 test9 \ 32704 + test_autoformat_join \ 35280 32705 + test_eval \ 35281 32706 + test_options \ … … 35283 32708 test20 test21 test22 test23 test24 test25 test26 test27 test28 test29 \ 35284 32709 test30 test31 test32 test33 test34 test35 test36 test37 test38 test39 \ 35285 @@ -1882,8 +189 0,9 @@32710 @@ -1882,8 +1893,9 @@ 35286 32711 test60 test61 test62 test63 test64 test65 test66 test67 test68 test69 \ 35287 32712 test70 test71 test72 test73 test74 test75 test76 test77 test78 test79 \ … … 35295 32720 testclean: 35296 32721 cd testdir; $(MAKE) -f Makefile clean 35297 @@ -2380,6 +23 89,7 @@32722 @@ -2380,6 +2392,7 @@ 35298 32723 ../../testdir/*.in \ 35299 32724 ../../testdir/*.vim \ … … 35314 32739 diff -Naur vim74.orig/src/auto/configure vim74/src/auto/configure 35315 32740 --- vim74.orig/src/auto/configure 2013-08-04 18:01:06.000000000 +0000 35316 +++ vim74/src/auto/configure 2014-0 4-27 05:20:58.111768501 +000032741 +++ vim74/src/auto/configure 2014-06-01 00:43:13.910814221 +0000 35317 32742 @@ -1,11 +1,9 @@ 35318 32743 #! /bin/sh … … 37072 34497 else 37073 34498 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 @@ 37075 34523 fi 37076 34524 … … 37081 34529 fi 37082 34530 37083 @@ -5792,7 +60 32,7 @@34531 @@ -5792,7 +6041,7 @@ 37084 34532 set dummy $ac_prog; ac_word=$2 37085 34533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 … … 37090 34538 else 37091 34539 case $vi_cv_path_python3 in 37092 @@ -5806,7 +60 46,7 @@34540 @@ -5806,7 +6055,7 @@ 37093 34541 IFS=$as_save_IFS 37094 34542 test -z "$as_dir" && as_dir=. … … 37099 34547 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 37100 34548 break 2 37101 @@ -5835,7 +60 75,7 @@34549 @@ -5835,7 +6084,7 @@ 37102 34550 37103 34551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python version" >&5 … … 37108 34556 else 37109 34557 vi_cv_var_python3_version=` 37110 @@ -5855,7 +6 095,7 @@34558 @@ -5855,7 +6104,7 @@ 37111 34559 37112 34560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's abiflags" >&5 … … 37117 34565 else 37118 34566 37119 @@ -5872,7 +61 12,7 @@34567 @@ -5872,7 +6121,7 @@ 37120 34568 37121 34569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's install prefix" >&5 … … 37126 34574 else 37127 34575 vi_cv_path_python3_pfx=` 37128 @@ -5884,7 +61 24,7 @@34576 @@ -5884,7 +6133,7 @@ 37129 34577 37130 34578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's execution prefix" >&5 … … 37135 34583 else 37136 34584 vi_cv_path_python3_epfx=` 37137 @@ -5895,7 +61 35,7 @@34585 @@ -5895,7 +6144,7 @@ 37138 34586 $as_echo "$vi_cv_path_python3_epfx" >&6; } 37139 34587 … … 37144 34592 else 37145 34593 vi_cv_path_python3path=` 37146 @@ -5915,7 +61 55,7 @@34594 @@ -5915,7 +6164,7 @@ 37147 34595 37148 34596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's configuration directory" >&5 … … 37153 34601 else 37154 34602 37155 @@ -5946,7 +61 86,7 @@34603 @@ -5946,7 +6195,7 @@ 37156 34604 $as_echo "can't find it!" >&6; } 37157 34605 else … … 37162 34610 else 37163 34611 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 @@ 37165 34650 fi 37166 34651 fi … … 37171 34656 fi 37172 34657 37173 @@ -6097,8 +63 37,8 @@34658 @@ -6097,8 +6355,8 @@ 37174 34659 if test "$cross_compiling" = yes; then : 37175 34660 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 … … 37182 34667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 37183 34668 /* 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 @@ 37185 34679 if test "$cross_compiling" = yes; then : 37186 34680 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 … … 37193 34687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 37194 34688 /* 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 @@ 37196 34730 set dummy $tclsh_name; ac_word=$2 37197 34731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 … … 37202 34736 else 37203 34737 case $vi_cv_path_tcl in 37204 @@ -6351,7 +6 591,7 @@34738 @@ -6351,7 +6609,7 @@ 37205 34739 IFS=$as_save_IFS 37206 34740 test -z "$as_dir" && as_dir=. … … 37211 34745 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 37212 34746 break 2 37213 @@ -6381,7 +66 21,7 @@34747 @@ -6381,7 +6639,7 @@ 37214 34748 set dummy $tclsh_name; ac_word=$2 37215 34749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 … … 37220 34754 else 37221 34755 case $vi_cv_path_tcl in 37222 @@ -6395,7 +66 35,7 @@34756 @@ -6395,7 +6653,7 @@ 37223 34757 IFS=$as_save_IFS 37224 34758 test -z "$as_dir" && as_dir=. … … 37229 34763 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 37230 34764 break 2 37231 @@ -6424,7 +66 64,7 @@34765 @@ -6424,7 +6682,7 @@ 37232 34766 set dummy $tclsh_name; ac_word=$2 37233 34767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 … … 37238 34772 else 37239 34773 case $vi_cv_path_tcl in 37240 @@ -6438,7 +66 78,7 @@34774 @@ -6438,7 +6696,7 @@ 37241 34775 IFS=$as_save_IFS 37242 34776 test -z "$as_dir" && as_dir=. … … 37247 34781 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 37248 34782 break 2 37249 @@ -6467,7 +67 07,7 @@34783 @@ -6467,7 +6725,7 @@ 37250 34784 set dummy $tclsh_name; ac_word=$2 37251 34785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 … … 37256 34790 else 37257 34791 case $vi_cv_path_tcl in 37258 @@ -6481,7 +67 21,7 @@34792 @@ -6481,7 +6739,7 @@ 37259 34793 IFS=$as_save_IFS 37260 34794 test -z "$as_dir" && as_dir=. … … 37265 34799 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 37266 34800 break 2 37267 @@ -6510,7 +67 50,7 @@34801 @@ -6510,7 +6768,7 @@ 37268 34802 set dummy $tclsh_name; ac_word=$2 37269 34803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 … … 37274 34808 else 37275 34809 case $vi_cv_path_tcl in 37276 @@ -6524,7 +67 64,7 @@34810 @@ -6524,7 +6782,7 @@ 37277 34811 IFS=$as_save_IFS 37278 34812 test -z "$as_dir" && as_dir=. … … 37283 34817 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 37284 34818 break 2 37285 @@ -6641,7 +68 81,7 @@34819 @@ -6641,7 +6899,7 @@ 37286 34820 fi 37287 34821 fi … … 37292 34826 fi 37293 34827 37294 @@ -6679,7 +69 19,7 @@34828 @@ -6679,7 +6937,7 @@ 37295 34829 set dummy $RUBY_CMD; ac_word=$2 37296 34830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 … … 37301 34835 else 37302 34836 case $vi_cv_path_ruby in 37303 @@ -6693,7 +69 33,7 @@34837 @@ -6693,7 +6951,7 @@ 37304 34838 IFS=$as_save_IFS 37305 34839 test -z "$as_dir" && as_dir=. … … 37310 34844 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 37311 34845 break 2 37312 @@ -6736,9 +69 76,9 @@34846 @@ -6736,9 +6994,9 @@ 37313 34847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rubyhdrdir" >&5 37314 34848 $as_echo "$rubyhdrdir" >&6; } … … 37323 34857 rubyversion=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['ruby_version'].gsub(/\./, '')[0,2]"` 37324 34858 if test "X$rubyversion" = "X"; then 37325 @@ -6767,7 +70 07,7 @@34859 @@ -6767,7 +7025,7 @@ 37326 34860 if test "X$rubyldflags" != "X"; then 37327 34861 rubyldflags=`echo "$rubyldflags" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'` … … 37332 34866 fi 37333 34867 fi 37334 @@ -6795,7 +70 35,7 @@34868 @@ -6795,7 +7053,7 @@ 37335 34869 fi 37336 34870 … … 37341 34875 fi 37342 34876 37343 @@ -6857,7 +7 097,7 @@34877 @@ -6857,7 +7115,7 @@ 37344 34878 $as_echo "no" >&6; } 37345 34879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 … … 37350 34884 else 37351 34885 ac_check_lib_save_LIBS=$LIBS 37352 @@ -6891,7 +71 31,7 @@34886 @@ -6891,7 +7149,7 @@ 37353 34887 fi 37354 34888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 … … 37359 34893 #define HAVE_LIBSOCKET 1 37360 34894 _ACEOF 37361 @@ -6902,7 +71 42,7 @@34895 @@ -6902,7 +7160,7 @@ 37362 34896 37363 34897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 … … 37368 34902 else 37369 34903 ac_check_lib_save_LIBS=$LIBS 37370 @@ -6936,7 +71 76,7 @@34904 @@ -6936,7 +7194,7 @@ 37371 34905 fi 37372 34906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 … … 37377 34911 #define HAVE_LIBNSL 1 37378 34912 _ACEOF 37379 @@ -7086,7 +73 26,7 @@34913 @@ -7086,7 +7344,7 @@ 37380 34914 set dummy xmkmf; ac_word=$2 37381 34915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 … … 37386 34920 else 37387 34921 case $xmkmfpath in 37388 @@ -7100,7 +73 40,7 @@34922 @@ -7100,7 +7358,7 @@ 37389 34923 IFS=$as_save_IFS 37390 34924 test -z "$as_dir" && as_dir=. … … 37395 34929 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 37396 34930 break 2 37397 @@ -7138,8 +73 78,8 @@34931 @@ -7138,8 +7396,8 @@ 37398 34932 have_x=disabled 37399 34933 else … … 37406 34940 else 37407 34941 # One or both of the vars are not set, and there is no cached value. 37408 @@ -7156,7 +7 396,7 @@34942 @@ -7156,7 +7414,7 @@ 37409 34943 @echo libdir='${LIBDIR}' 37410 34944 _ACEOF … … 37415 34949 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" 37416 34950 done 37417 @@ -7242,7 +7 482,7 @@34951 @@ -7242,7 +7500,7 @@ 37418 34952 fi 37419 34953 done … … 37424 34958 37425 34959 if test "$ac_x_libraries" = no; then 37426 @@ -7416,7 +76 56,7 @@34960 @@ -7416,7 +7674,7 @@ 37427 34961 else 37428 34962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 … … 37433 34967 else 37434 34968 ac_check_lib_save_LIBS=$LIBS 37435 @@ -7450,14 +7 690,14 @@34969 @@ -7450,14 +7708,14 @@ 37436 34970 fi 37437 34971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 … … 37450 34984 else 37451 34985 ac_check_lib_save_LIBS=$LIBS 37452 @@ -7491,7 +77 31,7 @@34986 @@ -7491,7 +7749,7 @@ 37453 34987 fi 37454 34988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 … … 37459 34993 fi 37460 34994 37461 @@ -7510,14 +77 50,14 @@34995 @@ -7510,14 +7768,14 @@ 37462 34996 # The functions gethostbyname, getservbyname, and inet_addr are 37463 34997 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. … … 37476 35010 else 37477 35011 ac_check_lib_save_LIBS=$LIBS 37478 @@ -7551,14 +7 791,14 @@35012 @@ -7551,14 +7809,14 @@ 37479 35013 fi 37480 35014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 … … 37493 35027 else 37494 35028 ac_check_lib_save_LIBS=$LIBS 37495 @@ -7592,7 +78 32,7 @@35029 @@ -7592,7 +7850,7 @@ 37496 35030 fi 37497 35031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5 … … 37502 35036 fi 37503 35037 37504 @@ -7607,14 +78 47,14 @@35038 @@ -7607,14 +7865,14 @@ 37505 35039 # must be given before -lnsl if both are needed. We assume that 37506 35040 # if connect needs -lnsl, so does gethostbyname. … … 37519 35053 else 37520 35054 ac_check_lib_save_LIBS=$LIBS 37521 @@ -7648,7 +7 888,7 @@35055 @@ -7648,7 +7906,7 @@ 37522 35056 fi 37523 35057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5 … … 37528 35062 fi 37529 35063 37530 @@ -7656,14 +7 896,14 @@35064 @@ -7656,14 +7914,14 @@ 37531 35065 37532 35066 # Guillermo Gomez says -lposix is necessary on A/UX. … … 37545 35079 else 37546 35080 ac_check_lib_save_LIBS=$LIBS 37547 @@ -7697,7 +79 37,7 @@35081 @@ -7697,7 +7955,7 @@ 37548 35082 fi 37549 35083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5 … … 37554 35088 fi 37555 35089 37556 @@ -7705,14 +79 45,14 @@35090 @@ -7705,14 +7963,14 @@ 37557 35091 37558 35092 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. … … 37571 35105 else 37572 35106 ac_check_lib_save_LIBS=$LIBS 37573 @@ -7746,7 + 7986,7 @@35107 @@ -7746,7 +8004,7 @@ 37574 35108 fi 37575 35109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5 … … 37580 35114 fi 37581 35115 37582 @@ -7764,7 +80 04,7 @@35116 @@ -7764,7 +8022,7 @@ 37583 35117 # John Interrante, Karl Berry 37584 35118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5 … … 37589 35123 else 37590 35124 ac_check_lib_save_LIBS=$LIBS 37591 @@ -7798,7 +80 38,7 @@35125 @@ -7798,7 +8056,7 @@ 37592 35126 fi 37593 35127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 … … 37598 35132 fi 37599 35133 37600 @@ -7876,7 +81 16,7 @@35134 @@ -7876,7 +8134,7 @@ 37601 35135 37602 35136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _XdmcpAuthDoIt in -lXdmcp" >&5 … … 37607 35141 else 37608 35142 ac_check_lib_save_LIBS=$LIBS 37609 @@ -7910,14 +81 50,14 @@35143 @@ -7910,14 +8168,14 @@ 37610 35144 fi 37611 35145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xdmcp__XdmcpAuthDoIt" >&5 … … 37624 35158 else 37625 35159 ac_check_lib_save_LIBS=$LIBS 37626 @@ -7951,7 +8 191,7 @@35160 @@ -7951,7 +8209,7 @@ 37627 35161 fi 37628 35162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceOpenConnection" >&5 … … 37633 35167 fi 37634 35168 37635 @@ -7959,7 +8 199,7 @@35169 @@ -7959,7 +8217,7 @@ 37636 35170 LDFLAGS="$X_LIBS $ac_save_LDFLAGS" 37637 35171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmCreatePixmapFromData in -lXpm" >&5 … … 37642 35176 else 37643 35177 ac_check_lib_save_LIBS=$LIBS 37644 @@ -7993,7 +82 33,7 @@35178 @@ -7993,7 +8251,7 @@ 37645 35179 fi 37646 35180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&5 … … 37651 35185 fi 37652 35186 37653 @@ -8051,11 +8 291,11 @@35187 @@ -8051,11 +8309,11 @@ 37654 35188 37655 35189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t is 2 bytes" >&5 … … 37665 35199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 37666 35200 /* end confdefs.h. */ 37667 @@ -8354,7 +8 594,7 @@35201 @@ -8354,7 +8612,7 @@ 37668 35202 set dummy pkg-config; ac_word=$2 37669 35203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 … … 37674 35208 else 37675 35209 case $PKG_CONFIG in 37676 @@ -8368,7 +86 08,7 @@35210 @@ -8368,7 +8626,7 @@ 37677 35211 IFS=$as_save_IFS 37678 35212 test -z "$as_dir" && as_dir=. … … 37683 35217 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 37684 35218 break 2 37685 @@ -8593,7 +88 33,7 @@35219 @@ -8593,7 +8851,7 @@ 37686 35220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 37687 35221 $as_echo "not found" >&6; } … … 37692 35226 fi 37693 35227 } 37694 @@ -8786,7 +90 26,7 @@35228 @@ -8786,7 +9044,7 @@ 37695 35229 LDFLAGS="$X_LIBS $LDFLAGS" 37696 35230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5 … … 37701 35235 else 37702 35236 ac_check_lib_save_LIBS=$LIBS 37703 @@ -8820,13 +90 60,13 @@35237 @@ -8820,13 +9078,13 @@ 37704 35238 fi 37705 35239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5 … … 37717 35251 else 37718 35252 ac_check_lib_save_LIBS=$LIBS 37719 @@ -8860,13 +91 00,13 @@35253 @@ -8860,13 +9118,13 @@ 37720 35254 fi 37721 35255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wslen" >&5 … … 37733 35267 else 37734 35268 ac_check_lib_save_LIBS=$LIBS 37735 @@ -8900,13 +91 40,13 @@35269 @@ -8900,13 +9158,13 @@ 37736 35270 fi 37737 35271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlsym" >&5 … … 37749 35283 else 37750 35284 ac_check_lib_save_LIBS=$LIBS 37751 @@ -8940,14 +91 80,14 @@35285 @@ -8940,14 +9198,14 @@ 37752 35286 fi 37753 35287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuCreateStippledPixmap" >&5 … … 37766 35300 else 37767 35301 ac_check_lib_save_LIBS=$LIBS 37768 @@ -8981,7 +92 21,7 @@35302 @@ -8981,7 +9239,7 @@ 37769 35303 fi 37770 35304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpEndJob" >&5 … … 37775 35309 fi 37776 35310 37777 @@ -9020,7 +92 60,7 @@35311 @@ -9020,7 +9278,7 @@ 37778 35312 for ac_header in X11/SM/SMlib.h 37779 35313 do : … … 37784 35318 #define HAVE_X11_SM_SMLIB_H 1 37785 35319 _ACEOF 37786 @@ -9040,8 +92 80,7 @@35320 @@ -9040,8 +9298,7 @@ 37787 35321 do : 37788 35322 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` … … 37794 35328 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 37795 35329 _ACEOF 37796 @@ -9064,7 +93 03,7 @@35330 @@ -9064,7 +9321,7 @@ 37797 35331 $as_echo "yes" >&6; } 37798 35332 else … … 37803 35337 rm -f conftest* 37804 35338 37805 @@ -9123,8 +93 62,7 @@35339 @@ -9123,8 +9380,7 @@ 37806 35340 do : 37807 35341 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` … … 37813 35347 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 37814 35348 _ACEOF 37815 @@ -9192,7 +94 30,7 @@35349 @@ -9192,7 +9448,7 @@ 37816 35350 37817 35351 … … 37822 35356 37823 35357 if test "$enable_xim" = "yes"; then 37824 @@ -9246,13 +9 484,13 @@35358 @@ -9246,13 +9502,13 @@ 37825 35359 37826 35360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether toupper is broken" >&5 … … 37838 35372 else 37839 35373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 37840 @@ -9336,7 +95 74,7 @@35374 @@ -9336,7 +9592,7 @@ 37841 35375 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 37842 35376 … … 37847 35381 fi 37848 35382 37849 @@ -9344,7 +9 582,7 @@35383 @@ -9344,7 +9600,7 @@ 37850 35384 if test "$HAS_ELF" = 1; then 37851 35385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lelf" >&5 … … 37856 35390 else 37857 35391 ac_check_lib_save_LIBS=$LIBS 37858 @@ -9372,7 +96 10,7 @@35392 @@ -9372,7 +9628,7 @@ 37859 35393 fi 37860 35394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_main" >&5 … … 37865 35399 #define HAVE_LIBELF 1 37866 35400 _ACEOF 37867 @@ -9388,7 +96 26,7 @@35401 @@ -9388,7 +9644,7 @@ 37868 35402 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` 37869 35403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 … … 37874 35408 else 37875 35409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 37876 @@ -9415,8 +96 53,7 @@35410 @@ -9415,8 +9671,7 @@ 37877 35411 eval ac_res=\$$as_ac_Header 37878 35412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 … … 37884 35418 #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 37885 35419 _ACEOF 37886 @@ -9429,7 +96 66,7 @@35420 @@ -9429,7 +9684,7 @@ 37887 35421 if test $ac_header_dirent = dirent.h; then 37888 35422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 … … 37893 35427 else 37894 35428 ac_func_search_save_LIBS=$LIBS 37895 @@ -9463,11 +97 00,11 @@35429 @@ -9463,11 +9718,11 @@ 37896 35430 fi 37897 35431 rm -f core conftest.err conftest.$ac_objext \ … … 37907 35441 else 37908 35442 ac_cv_search_opendir=no 37909 @@ -9486,7 +97 23,7 @@35443 @@ -9486,7 +9741,7 @@ 37910 35444 else 37911 35445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 … … 37916 35450 else 37917 35451 ac_func_search_save_LIBS=$LIBS 37918 @@ -9520,11 +97 57,11 @@35452 @@ -9520,11 +9775,11 @@ 37919 35453 fi 37920 35454 rm -f core conftest.err conftest.$ac_objext \ … … 37930 35464 else 37931 35465 ac_cv_search_opendir=no 37932 @@ -9584,8 +98 21,7 @@35466 @@ -9584,8 +9839,7 @@ 37933 35467 do : 37934 35468 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` … … 37940 35474 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 37941 35475 _ACEOF 37942 @@ -9601,7 +98 37,7 @@35476 @@ -9601,7 +9855,7 @@ 37943 35477 # include <sys/stream.h> 37944 35478 #endif … … 37949 35483 #define HAVE_SYS_PTEM_H 1 37950 35484 _ACEOF 37951 @@ -9617,7 +98 53,7 @@35485 @@ -9617,7 +9871,7 @@ 37952 35486 # include <sys/param.h> 37953 35487 #endif … … 37958 35492 #define HAVE_SYS_SYSCTL_H 1 37959 35493 _ACEOF 37960 @@ -9657,7 +9 893,7 @@35494 @@ -9657,7 +9911,7 @@ 37961 35495 for ac_header in strings.h 37962 35496 do : … … 37967 35501 #define HAVE_STRINGS_H 1 37968 35502 _ACEOF 37969 @@ -9716,7 +99 52,7 @@35503 @@ -9716,7 +9970,7 @@ 37970 35504 if test $ac_cv_c_compiler_gnu = yes; then 37971 35505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5 … … 37976 35510 else 37977 35511 ac_pattern="Autoconf.*'x'" 37978 @@ -9757,7 + 9993,7 @@35512 @@ -9757,7 +10011,7 @@ 37979 35513 37980 35514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 … … 37985 35519 else 37986 35520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 37987 @@ -9766,11 +100 02,11 @@35521 @@ -9766,11 +10020,11 @@ 37988 35522 int 37989 35523 main () … … 38000 35534 char const *const *pcpcc; 38001 35535 char **ppc; 38002 @@ -9787,8 +100 23,9 @@35536 @@ -9787,8 +10041,9 @@ 38003 35537 ++pcpcc; 38004 35538 ppc = (char**) pcpcc; … … 38012 35546 38013 35547 *t++ = 0; 38014 @@ -9804,10 +100 41,10 @@35548 @@ -9804,10 +10059,10 @@ 38015 35549 iptr p = 0; 38016 35550 ++p; … … 38026 35560 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ 38027 35561 const int foo = 10; 38028 @@ -9837,7 +100 74,7 @@35562 @@ -9837,7 +10092,7 @@ 38029 35563 38030 35564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5 … … 38035 35569 else 38036 35570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 38037 @@ -9870,7 +101 07,7 @@35571 @@ -9870,7 +10125,7 @@ 38038 35572 fi 38039 35573 … … 38044 35578 else 38045 35579 38046 @@ -9881,7 +101 18,7 @@35580 @@ -9881,7 +10136,7 @@ 38047 35581 fi 38048 35582 … … 38053 35587 else 38054 35588 38055 @@ -9892,7 +101 29,7 @@35589 @@ -9892,7 +10147,7 @@ 38056 35590 fi 38057 35591 … … 38062 35596 else 38063 35597 38064 @@ -9903,7 +101 40,7 @@35598 @@ -9903,7 +10158,7 @@ 38065 35599 fi 38066 35600 … … 38071 35605 else 38072 35606 38073 @@ -9915,7 +101 52,7 @@35607 @@ -9915,7 +10170,7 @@ 38074 35608 38075 35609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 … … 38080 35614 else 38081 35615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 38082 @@ -9960,7 +10 197,7 @@35616 @@ -9960,7 +10215,7 @@ 38083 35617 38084 35618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 … … 38089 35623 else 38090 35624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 38091 @@ -9994,7 +102 31,7 @@35625 @@ -9994,7 +10249,7 @@ 38092 35626 fi 38093 35627 … … 38098 35632 else 38099 35633 38100 @@ -10005,7 +102 42,7 @@35634 @@ -10005,7 +10260,7 @@ 38101 35635 fi 38102 35636 … … 38107 35641 else 38108 35642 38109 @@ -10017,7 +102 54,7 @@35643 @@ -10017,7 +10272,7 @@ 38110 35644 38111 35645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 … … 38116 35650 else 38117 35651 ac_cv_c_bigendian=unknown 38118 @@ -10235,7 +104 72,7 @@35652 @@ -10235,7 +10490,7 @@ 38119 35653 38120 35654 ;; #( … … 38125 35659 esac 38126 35660 38127 @@ -10371,7 +106 08,7 @@35661 @@ -10371,7 +10626,7 @@ 38128 35662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5 38129 35663 $as_echo "OK" >&6; } … … 38134 35668 rm -f core conftest.err conftest.$ac_objext \ 38135 35669 conftest$ac_exeext conftest.$ac_ext 38136 @@ -10387,7 +106 24,7 @@35670 @@ -10387,7 +10642,7 @@ 38137 35671 as_ac_Lib=`$as_echo "ac_cv_lib_${libname}''_tgetent" | $as_tr_sh` 38138 35672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -l${libname}" >&5 … … 38143 35677 else 38144 35678 ac_check_lib_save_LIBS=$LIBS 38145 @@ -10422,8 +106 59,7 @@35679 @@ -10422,8 +10677,7 @@ 38146 35680 eval ac_res=\$$as_ac_Lib 38147 35681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 … … 38153 35687 #define `$as_echo "HAVE_LIB${libname}" | $as_tr_cpp` 1 38154 35688 _ACEOF 38155 @@ -10489,7 +107 25,7 @@35689 @@ -10489,7 +10743,7 @@ 38156 35690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 38157 35691 $as_echo "yes" >&6; } … … 38162 35696 Or specify the name of the library with --with-tlib." "$LINENO" 5 38163 35697 fi 38164 @@ -10499,13 +107 35,13 @@35698 @@ -10499,13 +10753,13 @@ 38165 35699 38166 35700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we talk terminfo" >&5 … … 38178 35712 else 38179 35713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 38180 @@ -10552,13 +10 788,13 @@35714 @@ -10552,13 +10806,13 @@ 38181 35715 if test "x$olibs" != "x$LIBS"; then 38182 35716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what tgetent() returns for an unknown terminal" >&5 … … 38194 35728 else 38195 35729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 38196 @@ -10853,13 +11 089,13 @@35730 @@ -10853,13 +11107,13 @@ 38197 35731 rm -f conftest_grp 38198 35732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking default tty permissions/group" >&5 … … 38210 35744 else 38211 35745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 38212 @@ -10940,7 +111 76,7 @@35746 @@ -10940,7 +11194,7 @@ 38213 35747 _ACEOF 38214 35748 … … 38219 35753 $as_echo "#define PTYMODE 0620" >>confdefs.h 38220 35754 38221 @@ -10950,7 +11 186,7 @@35755 @@ -10950,7 +11204,7 @@ 38222 35756 38223 35757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 … … 38228 35762 else 38229 35763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 38230 @@ -11023,13 +112 59,13 @@35764 @@ -11023,13 +11277,13 @@ 38231 35765 38232 35766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getcwd implementation is broken" >&5 … … 38244 35778 else 38245 35779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 38246 @@ -11082,8 +113 18,7 @@35780 @@ -11082,8 +11336,7 @@ 38247 35781 do : 38248 35782 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` … … 38254 35788 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 38255 35789 _ACEOF 38256 @@ -11093,7 +113 28,7 @@35790 @@ -11093,7 +11346,7 @@ 38257 35791 38258 35792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 … … 38263 35797 else 38264 35798 while :; do 38265 @@ -11169,7 +114 04,7 @@35799 @@ -11169,7 +11422,7 @@ 38266 35800 38267 35801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 … … 38272 35806 else 38273 35807 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 @@ 38275 35818 38276 35819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 … … 38281 35824 else 38282 35825 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 @@ 38284 35845 if test $ac_cv_sys_file_offset_bits = unknown; then 38285 35846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 … … 38290 35851 else 38291 35852 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 @@ 38293 35872 esac 38294 35873 rm -rf conftest* … … 38299 35878 38300 35879 38301 @@ -11389,13 +116 26,13 @@35880 @@ -11389,13 +11644,13 @@ 38302 35881 38303 35882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat() ignores a trailing slash" >&5 … … 38315 35894 else 38316 35895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 38317 @@ -11519,7 +117 56,7 @@35896 @@ -11519,7 +11774,7 @@ 38318 35897 38319 35898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strtod in -lm" >&5 … … 38324 35903 else 38325 35904 ac_check_lib_save_LIBS=$LIBS 38326 @@ -11553,7 +11 790,7 @@35905 @@ -11553,7 +11808,7 @@ 38327 35906 fi 38328 35907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_strtod" >&5 … … 38333 35912 #define HAVE_LIBM 1 38334 35913 _ACEOF 38335 @@ -11619,7 +118 56,7 @@35914 @@ -11619,7 +11874,7 @@ 38336 35915 $as_echo "no" >&6; } 38337 35916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acl_get_file in -lposix1e" >&5 … … 38342 35921 else 38343 35922 ac_check_lib_save_LIBS=$LIBS 38344 @@ -11653,12 +11 890,12 @@35923 @@ -11653,12 +11908,12 @@ 38345 35924 fi 38346 35925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix1e_acl_get_file" >&5 … … 38357 35936 else 38358 35937 ac_check_lib_save_LIBS=$LIBS 38359 @@ -11692,11 +119 29,11 @@35938 @@ -11692,11 +11947,11 @@ 38360 35939 fi 38361 35940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_acl_acl_get_file" >&5 … … 38371 35950 else 38372 35951 ac_check_lib_save_LIBS=$LIBS 38373 @@ -11730,7 +119 67,7 @@35952 @@ -11730,7 +11985,7 @@ 38374 35953 fi 38375 35954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_fgetxattr" >&5 … … 38380 35959 fi 38381 35960 38382 @@ -11772,7 +120 09,7 @@35961 @@ -11772,7 +12027,7 @@ 38383 35962 38384 35963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acl_get in -lsec" >&5 … … 38389 35968 else 38390 35969 ac_check_lib_save_LIBS=$LIBS 38391 @@ -11806,7 +120 43,7 @@35970 @@ -11806,7 +12061,7 @@ 38392 35971 fi 38393 35972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sec_acl_get" >&5 … … 38398 35977 38399 35978 else 38400 @@ -11902,7 +121 39,7 @@35979 @@ -11902,7 +12157,7 @@ 38401 35980 $as_echo "no" >&6; } 38402 35981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gpm" >&5 … … 38407 35986 else 38408 35987 olibs="$LIBS" ; LIBS="-lgpm" 38409 @@ -11955,7 +12 192,7 @@35988 @@ -11955,7 +12210,7 @@ 38410 35989 $as_echo "no" >&6; } 38411 35990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysmouse" >&5 … … 38416 35995 else 38417 35996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 38418 @@ -12161,7 +12 398,7 @@35997 @@ -12161,7 +12416,7 @@ 38419 35998 # This bug is HP SR number 8606223364. 38420 35999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 … … 38425 36004 else 38426 36005 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : 38427 @@ -12170,9 +124 07,8 @@36006 @@ -12170,9 +12425,8 @@ 38428 36007 if test "$ac_cv_type_int" = yes; then 38429 36008 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 … … 38437 36016 ac_cv_sizeof_int=0 38438 36017 fi 38439 @@ -12195,7 +124 31,7 @@36018 @@ -12195,7 +12449,7 @@ 38440 36019 # This bug is HP SR number 8606223364. 38441 36020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 … … 38446 36025 else 38447 36026 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : 38448 @@ -12204,9 +124 40,8 @@36027 @@ -12204,9 +12458,8 @@ 38449 36028 if test "$ac_cv_type_long" = yes; then 38450 36029 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 … … 38458 36037 ac_cv_sizeof_long=0 38459 36038 fi 38460 @@ -12229,7 +124 64,7 @@36039 @@ -12229,7 +12482,7 @@ 38461 36040 # This bug is HP SR number 8606223364. 38462 36041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5 … … 38467 36046 else 38468 36047 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "$ac_includes_default"; then : 38469 @@ -12238,9 +124 73,8 @@36048 @@ -12238,9 +12491,8 @@ 38470 36049 if test "$ac_cv_type_time_t" = yes; then 38471 36050 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 … … 38479 36058 ac_cv_sizeof_time_t=0 38480 36059 fi 38481 @@ -12263,7 +12 497,7 @@36060 @@ -12263,7 +12515,7 @@ 38482 36061 # This bug is HP SR number 8606223364. 38483 36062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5 … … 38488 36067 else 38489 36068 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then : 38490 @@ -12272,9 +125 06,8 @@36069 @@ -12272,9 +12524,8 @@ 38491 36070 if test "$ac_cv_type_off_t" = yes; then 38492 36071 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 … … 38500 36079 ac_cv_sizeof_off_t=0 38501 36080 fi 38502 @@ -12292,6 +125 25,15 @@36081 @@ -12292,6 +12543,15 @@ 38503 36082 38504 36083 … … 38516 36095 $as_echo_n "checking uint32_t is 32 bits... " >&6; } 38517 36096 if test "$cross_compiling" = yes; then : 38518 @@ -12318,7 +125 60,7 @@36097 @@ -12318,7 +12578,7 @@ 38519 36098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 38520 36099 $as_echo "ok" >&6; } … … 38525 36104 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 38526 36105 conftest.$ac_objext conftest.beam conftest.$ac_ext 38527 @@ -12350,13 +12 592,13 @@36106 @@ -12350,13 +12610,13 @@ 38528 36107 38529 36108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmove handles overlaps" >&5 … … 38541 36120 else 38542 36121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 38543 @@ -12387,13 +126 29,13 @@36122 @@ -12387,13 +12647,13 @@ 38544 36123 else 38545 36124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bcopy handles overlaps" >&5 … … 38557 36136 else 38558 36137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 38559 @@ -12424,13 +126 66,13 @@36138 @@ -12424,13 +12684,13 @@ 38560 36139 else 38561 36140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memcpy handles overlaps" >&5 … … 38573 36152 else 38574 36153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 38575 @@ -12525,7 +127 67,7 @@36154 @@ -12525,7 +12785,7 @@ 38576 36155 38577 36156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _xpg4_setrunelocale in -lxpg4" >&5 … … 38582 36161 else 38583 36162 ac_check_lib_save_LIBS=$LIBS 38584 @@ -12559,7 +128 01,7 @@36163 @@ -12559,7 +12819,7 @@ 38585 36164 fi 38586 36165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xpg4__xpg4_setrunelocale" >&5 … … 38591 36170 fi 38592 36171 38593 @@ -12621,7 +128 63,7 @@36172 @@ -12621,7 +12881,7 @@ 38594 36173 set dummy msgfmt; ac_word=$2 38595 36174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 … … 38600 36179 else 38601 36180 if test -n "$MSGFMT"; then 38602 @@ -12633,7 +128 75,7 @@36181 @@ -12633,7 +12893,7 @@ 38603 36182 IFS=$as_save_IFS 38604 36183 test -z "$as_dir" && as_dir=. … … 38609 36188 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 38610 36189 break 2 38611 @@ -12659,6 +129 01,8 @@36190 @@ -12659,6 +12919,8 @@ 38612 36191 if test -f po/Makefile; then 38613 36192 have_gettext="no" … … 38618 36197 /* end confdefs.h. */ 38619 36198 #include <libintl.h> 38620 @@ -12672,10 +129 16,9 @@36199 @@ -12672,10 +12934,9 @@ 38621 36200 _ACEOF 38622 36201 if ac_fn_c_try_link "$LINENO"; then : … … 38631 36210 /* end confdefs.h. */ 38632 36211 #include <libintl.h> 38633 @@ -12689,7 +129 32,8 @@36212 @@ -12689,7 +12950,8 @@ 38634 36213 _ACEOF 38635 36214 if ac_fn_c_try_link "$LINENO"; then : … … 38641 36220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: gettext() doesn't work" >&5 38642 36221 $as_echo "gettext() doesn't work" >&6; }; 38643 @@ -12712,7 +129 56,7 @@36222 @@ -12712,7 +12974,7 @@ 38644 36223 for ac_func in bind_textdomain_codeset 38645 36224 do : … … 38650 36229 #define HAVE_BIND_TEXTDOMAIN_CODESET 1 38651 36230 _ACEOF 38652 @@ -12755,11 +1 2999,11 @@36231 @@ -12755,11 +13017,11 @@ 38653 36232 fi 38654 36233 … … 38664 36243 fi 38665 36244 38666 @@ -12956,7 +132 00,7 @@36245 @@ -12956,7 +13218,7 @@ 38667 36246 for ac_header in setjmp.h 38668 36247 do : … … 38673 36252 #define HAVE_SETJMP_H 1 38674 36253 _ACEOF 38675 @@ -13107,10 +133 51,21 @@36254 @@ -13107,10 +13369,21 @@ 38676 36255 :end' >>confcache 38677 36256 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else … … 38697 36276 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 38698 36277 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} 38699 @@ -13126,6 +133 81,7 @@36278 @@ -13126,6 +13399,7 @@ 38700 36279 38701 36280 ac_libobjs= … … 38705 36284 # 1. Remove the extension, and $U if already installed. 38706 36285 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' 38707 @@ -13142,7 +13 398,7 @@36286 @@ -13142,7 +13416,7 @@ 38708 36287 38709 36288 … … 38714 36293 ac_clean_files_save=$ac_clean_files 38715 36294 ac_clean_files="$ac_clean_files $CONFIG_STATUS" 38716 @@ -13243,6 +13 499,7 @@36295 @@ -13243,6 +13517,7 @@ 38717 36296 IFS=" "" $as_nl" 38718 36297 … … 38722 36301 *[\\/]* ) as_myself=$0 ;; 38723 36302 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 38724 @@ -13288,19 +135 45,19 @@36303 @@ -13288,19 +13563,19 @@ 38725 36304 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH 38726 36305 … … 38750 36329 } # as_fn_error 38751 36330 38752 @@ -13438,16 +13 695,16 @@36331 @@ -13438,16 +13713,16 @@ 38753 36332 # ... but there are two gotchas: 38754 36333 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. … … 38771 36350 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file 38772 36351 rmdir conf$$.dir 2>/dev/null 38773 @@ -13496,7 +137 53,7 @@36352 @@ -13496,7 +13771,7 @@ 38774 36353 test -d "$as_dir" && break 38775 36354 done … … 38780 36359 38781 36360 } # as_fn_mkdir_p 38782 @@ -13507,28 +137 64,16 @@36361 @@ -13507,28 +13782,16 @@ 38783 36362 as_mkdir_p=false 38784 36363 fi … … 38819 36398 # Sed expression to map a string onto a valid CPP name. 38820 36399 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" 38821 @@ -13550,7 +13 795,7 @@36400 @@ -13550,7 +13813,7 @@ 38822 36401 # values after options handling. 38823 36402 ac_log=" … … 38828 36407 CONFIG_FILES = $CONFIG_FILES 38829 36408 CONFIG_HEADERS = $CONFIG_HEADERS 38830 @@ -13612,10 +138 57,10 @@36409 @@ -13612,10 +13875,10 @@ 38831 36410 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" 38832 36411 ac_cs_version="\\ … … 38841 36420 gives unlimited permission to copy, distribute and modify it." 38842 36421 38843 @@ -13631,11 +138 76,16 @@36422 @@ -13631,11 +13894,16 @@ 38844 36423 while test $# != 0 38845 36424 do … … 38859 36438 ac_option=$1 38860 36439 ac_optarg=$2 38861 @@ -13657,6 +139 07,7 @@36440 @@ -13657,6 +13925,7 @@ 38862 36441 $ac_shift 38863 36442 case $ac_optarg in … … 38867 36446 as_fn_append CONFIG_FILES " '$ac_optarg'" 38868 36447 ac_need_defaults=false;; 38869 @@ -13669,7 +139 20,7 @@36448 @@ -13669,7 +13938,7 @@ 38870 36449 ac_need_defaults=false;; 38871 36450 --he | --h) … … 38876 36455 --help | --hel | -h ) 38877 36456 $as_echo "$ac_cs_usage"; exit ;; 38878 @@ -13678,7 +139 29,7 @@36457 @@ -13678,7 +13947,7 @@ 38879 36458 ac_cs_silent=: ;; 38880 36459 … … 38885 36464 38886 36465 *) as_fn_append ac_config_targets " $1" 38887 @@ -13698,7 +139 49,7 @@36466 @@ -13698,7 +13967,7 @@ 38888 36467 _ACEOF 38889 36468 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 … … 38894 36473 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 38895 36474 CONFIG_SHELL='$SHELL' 38896 @@ -13730,7 +139 81,7 @@36475 @@ -13730,7 +13999,7 @@ 38897 36476 "auto/config.h") CONFIG_HEADERS="$CONFIG_HEADERS auto/config.h:config.h.in" ;; 38898 36477 "auto/config.mk") CONFIG_FILES="$CONFIG_FILES auto/config.mk:config.mk.in" ;; … … 38903 36482 done 38904 36483 38905 @@ -13752,9 +140 03,10 @@36484 @@ -13752,9 +14021,10 @@ 38906 36485 # after its creation but before its name has been assigned to `$tmp'. 38907 36486 $debug || … … 38916 36495 trap 'as_fn_exit 1' 1 2 13 15 38917 36496 } 38918 @@ -13762,12 +140 14,13 @@36497 @@ -13762,12 +14032,13 @@ 38919 36498 38920 36499 { … … 38932 36511 # Set up the scripts for CONFIG_FILES section. 38933 36512 # No need to generate them if there are no CONFIG_FILES. 38934 @@ -13784,12 +140 37,12 @@36513 @@ -13784,12 +14055,12 @@ 38935 36514 fi 38936 36515 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` … … 38947 36526 38948 36527 38949 @@ -13798,18 +140 51,18 @@36528 @@ -13798,18 +14069,18 @@ 38950 36529 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && 38951 36530 echo "_ACEOF" … … 38970 36549 ac_delim="$ac_delim!$ac_delim _$ac_delim!! " 38971 36550 fi 38972 @@ -13817,7 +140 70,7 @@36551 @@ -13817,7 +14088,7 @@ 38973 36552 rm -f conf$$subs.sh 38974 36553 … … 38979 36558 sed -n ' 38980 36559 h 38981 @@ -13865,7 +141 18,7 @@36560 @@ -13865,7 +14136,7 @@ 38982 36561 rm -f conf$$subs.awk 38983 36562 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 … … 38988 36567 FS = "" 38989 36568 38990 @@ -13897,21 +141 50,29 @@36569 @@ -13897,21 +14168,29 @@ 38991 36570 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" 38992 36571 else … … 39027 36606 }' 39028 36607 fi 39029 @@ -13923,7 +14 184,7 @@36608 @@ -13923,7 +14202,7 @@ 39030 36609 # No need to generate them if there are no CONFIG_HEADERS. 39031 36610 # This happens for instance with `./config.status Makefile'. … … 39036 36615 _ACEOF 39037 36616 39038 @@ -13935,11 +14 196,11 @@36617 @@ -13935,11 +14214,11 @@ 39039 36618 # handling of long lines. 39040 36619 ac_delim='%!_!# ' … … 39051 36630 ac_delim="$ac_delim!$ac_delim _$ac_delim!! " 39052 36631 fi 39053 @@ -14024,7 +14 285,7 @@36632 @@ -14024,7 +14303,7 @@ 39054 36633 _ACAWK 39055 36634 _ACEOF … … 39060 36639 39061 36640 39062 @@ -14037,7 +14 298,7 @@36641 @@ -14037,7 +14316,7 @@ 39063 36642 esac 39064 36643 case $ac_mode$ac_tag in … … 39069 36648 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; 39070 36649 esac 39071 @@ -14056,7 +143 17,7 @@36650 @@ -14056,7 +14335,7 @@ 39072 36651 for ac_f 39073 36652 do … … 39078 36657 # (if the path is not absolute). The absolute path cannot be DOS-style, 39079 36658 # because $ac_f cannot contain `:'. 39080 @@ -14065,7 +143 26,7 @@36659 @@ -14065,7 +14344,7 @@ 39081 36660 [\\/$]*) false;; 39082 36661 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; … … 39087 36666 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac 39088 36667 as_fn_append ac_file_inputs " '$ac_f'" 39089 @@ -14091,8 +143 52,8 @@36668 @@ -14091,8 +14370,8 @@ 39090 36669 esac 39091 36670 … … 39098 36677 ;; 39099 36678 esac 39100 @@ -14217,23 +144 78,24 @@36679 @@ -14217,23 +14496,24 @@ 39101 36680 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t 39102 36681 $ac_datarootdir_hack … … 39133 36712 :H) 39134 36713 # 39135 @@ -14242,21 +145 04,21 @@36714 @@ -14242,21 +14522,21 @@ 39136 36715 if test x"$ac_file" != x-; then 39137 36716 { … … 39163 36742 ;; 39164 36743 39165 @@ -14271,7 +145 33,7 @@36744 @@ -14271,7 +14551,7 @@ 39166 36745 ac_clean_files=$ac_clean_files_save 39167 36746 … … 39172 36751 39173 36752 # configure is writing to config.log, and then calls config.status. 39174 @@ -14292,7 +145 54,7 @@36753 @@ -14292,7 +14572,7 @@ 39175 36754 exec 5>>auto/config.log 39176 36755 # Use ||, not &&, to avoid exiting from the if with $? = 1, which … … 39183 36762 diff -Naur vim74.orig/src/blowfish.c vim74/src/blowfish.c 39184 36763 --- vim74.orig/src/blowfish.c 2010-12-17 18:58:18.000000000 +0000 39185 +++ vim74/src/blowfish.c 2014-0 4-27 05:20:58.115101918+000036764 +++ vim74/src/blowfish.c 2014-06-01 00:43:13.954147444 +0000 39186 36765 @@ -6,7 +6,7 @@ 39187 36766 * Do ":help credits" in Vim to see a list of people who contributed. … … 39311 36890 diff -Naur vim74.orig/src/buffer.c vim74/src/buffer.c 39312 36891 --- vim74.orig/src/buffer.c 2013-07-17 14:39:00.000000000 +0000 39313 +++ vim74/src/buffer.c 2014-0 4-27 05:20:58.115101918+000036892 +++ vim74/src/buffer.c 2014-06-01 00:43:13.980814043 +0000 39314 36893 @@ -211,7 +211,12 @@ 39315 36894 … … 39529 37108 } 39530 37109 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 /* 39531 37148 diff -Naur vim74.orig/src/charset.c vim74/src/charset.c 39532 37149 --- vim74.orig/src/charset.c 2013-02-06 15:20:01.000000000 +0000 39533 +++ vim74/src/charset.c 2014-0 4-27 05:20:58.118435333+000037150 +++ vim74/src/charset.c 2014-06-01 00:43:14.000813992 +0000 39534 37151 @@ -1380,10 +1380,7 @@ 39535 37152 && (State & NORMAL) … … 39562 37179 diff -Naur vim74.orig/src/config.h.in vim74/src/config.h.in 39563 37180 --- vim74.orig/src/config.h.in 2013-02-26 13:18:19.000000000 +0000 39564 +++ vim74/src/config.h.in 2014-0 4-27 05:20:58.118435333+000037181 +++ vim74/src/config.h.in 2014-06-01 00:43:14.020813941 +0000 39565 37182 @@ -37,10 +37,10 @@ 39566 37183 #undef UNIX … … 39593 37210 diff -Naur vim74.orig/src/configure.in vim74/src/configure.in 39594 37211 --- vim74.orig/src/configure.in 2013-08-04 18:00:50.000000000 +0000 39595 +++ vim74/src/configure.in 2014-0 4-27 05:20:58.121768749+000037212 +++ vim74/src/configure.in 2014-06-01 00:43:14.080813788 +0000 39596 37213 @@ -14,6 +14,7 @@ 39597 37214 AC_PROG_CC dnl required by almost everything … … 39774 37391 fi 39775 37392 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 @@ 39777 37450 ldflags_save=$LDFLAGS 39778 37451 dnl -ldl must go first to make this work on Archlinux (Roland Puntaier) … … 39783 37456 /* If this program fails, then RTLD_GLOBAL is needed. 39784 37457 * 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}")) 39787 37464 not_needed = 1; 39788 37465 return !not_needed; … … 39792 37469 39793 37470 CFLAGS=$cflags_save 39794 @@ -1404,7 +14 73,7 @@37471 @@ -1404,7 +1483,7 @@ 39795 37472 ldflags_save=$LDFLAGS 39796 37473 dnl -ldl must go first to make this work on Archlinux (Roland Puntaier) … … 39801 37478 #include <wchar.h> 39802 37479 /* 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}")) 39805 37486 not_needed = 1; 39806 37487 return !not_needed; … … 39810 37491 39811 37492 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 @@ 39813 37524 if test "X$rubyhdrdir" != "X"; then 39814 37525 AC_MSG_RESULT($rubyhdrdir) … … 39823 37534 rubyversion=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG[['ruby_version']].gsub(/\./, '')[[0,2]]"` 39824 37535 if test "X$rubyversion" = "X"; then 39825 @@ -1689,7 +17 58,7 @@37536 @@ -1689,7 +1768,7 @@ 39826 37537 dnl configure, so strip these flags first (if present) 39827 37538 rubyldflags=`echo "$rubyldflags" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'` … … 39832 37543 fi 39833 37544 fi 39834 @@ -2574,7 +26 43,7 @@37545 @@ -2574,7 +2653,7 @@ 39835 37546 AC_MSG_CHECKING(for XIMText in X11/Xlib.h) 39836 37547 AC_EGREP_CPP(XIMText, [#include <X11/Xlib.h>], … … 39841 37552 CPPFLAGS=$cppflags_save 39842 37553 39843 @@ -2699,7 +27 68,7 @@37554 @@ -2699,7 +2778,7 @@ 39844 37555 39845 37556 AC_CACHE_CHECK([whether toupper is broken], [vim_cv_toupper_broken], … … 39850 37561 #include <ctype.h> 39851 37562 #if STDC_HEADERS 39852 @@ -2707,7 +27 76,7 @@37563 @@ -2707,7 +2786,7 @@ 39853 37564 # include <stddef.h> 39854 37565 #endif … … 39859 37570 ],[ 39860 37571 vim_cv_toupper_broken=no 39861 @@ -2955,7 +30 24,7 @@37572 @@ -2955,7 +3034,7 @@ 39862 37573 39863 37574 AC_CACHE_CHECK([whether we talk terminfo], [vim_cv_terminfo], … … 39868 37579 #ifdef HAVE_TERMCAP_H 39869 37580 # include <termcap.h> 39870 @@ -2969,7 +30 38,7 @@37581 @@ -2969,7 +3048,7 @@ 39871 37582 #endif 39872 37583 main() … … 39877 37588 ],[ 39878 37589 vim_cv_terminfo=yes 39879 @@ -2985,7 +30 54,7 @@37590 @@ -2985,7 +3064,7 @@ 39880 37591 if test "x$olibs" != "x$LIBS"; then 39881 37592 AC_CACHE_CHECK([what tgetent() returns for an unknown terminal], [vim_cv_tgent], … … 39886 37597 #ifdef HAVE_TERMCAP_H 39887 37598 # include <termcap.h> 39888 @@ -2996,7 +30 65,7 @@37599 @@ -2996,7 +3075,7 @@ 39889 37600 #endif 39890 37601 main() … … 39895 37606 ],[ 39896 37607 vim_cv_tgent=non-zero 39897 @@ -3120,7 +31 89,7 @@37608 @@ -3120,7 +3199,7 @@ 39898 37609 rm -f conftest_grp 39899 37610 AC_CACHE_CHECK([default tty permissions/group], [vim_cv_tty_group], … … 39904 37615 #include <sys/types.h> 39905 37616 #if STDC_HEADERS 39906 @@ -3156,7 +32 25,7 @@37617 @@ -3156,7 +3235,7 @@ 39907 37618 fclose(fp); 39908 37619 exit(0); … … 39913 37624 vim_cv_tty_group=`cat conftest_grp` 39914 37625 if test "x$vim_cv_tty_mode" = "x" ; then 39915 @@ -3214,7 +32 83,7 @@37626 @@ -3214,7 +3293,7 @@ 39916 37627 dnl system("sh -c pwd") 39917 37628 AC_CACHE_CHECK([getcwd implementation is broken], [vim_cv_getcwd_broken], … … 39922 37633 #ifdef HAVE_UNISTD_H 39923 37634 #include <unistd.h> 39924 @@ -3227,7 +3 296,7 @@37635 @@ -3227,7 +3306,7 @@ 39925 37636 environ = dagger; 39926 37637 return getcwd(buffer, 500) ? 0 : 1; … … 39931 37642 ],[ 39932 37643 vim_cv_getcwd_broken=yes 39933 @@ -3270,7 +33 39,7 @@37644 @@ -3270,7 +3349,7 @@ 39934 37645 39935 37646 AC_CACHE_CHECK([whether stat() ignores a trailing slash], [vim_cv_stat_ignores_slash], … … 39940 37651 #if STDC_HEADERS 39941 37652 # include <stdlib.h> 39942 @@ -3279,7 +33 48,7 @@37653 @@ -3279,7 +3358,7 @@ 39943 37654 #include <sys/types.h> 39944 37655 #include <sys/stat.h> … … 39949 37660 ],[ 39950 37661 vim_cv_stat_ignores_slash=no 39951 @@ -3543,6 +36 12,10 @@37662 @@ -3543,6 +3622,10 @@ 39952 37663 AC_CHECK_SIZEOF([time_t]) 39953 37664 AC_CHECK_SIZEOF([off_t]) … … 39960 37671 AC_MSG_CHECKING([uint32_t is 32 bits]) 39961 37672 AC_TRY_RUN([ 39962 @@ -3589,7 +36 62,7 @@37673 @@ -3589,7 +3672,7 @@ 39963 37674 39964 37675 AC_CACHE_CHECK([whether memmove handles overlaps],[vim_cv_memmove_handles_overlap], … … 39969 37680 vim_cv_memmove_handles_overlap=yes 39970 37681 ],[ 39971 @@ -3604,7 +36 77,7 @@37682 @@ -3604,7 +3687,7 @@ 39972 37683 else 39973 37684 AC_CACHE_CHECK([whether bcopy handles overlaps],[vim_cv_bcopy_handles_overlap], … … 39978 37689 vim_cv_bcopy_handles_overlap=yes 39979 37690 ],[ 39980 @@ -3619,7 +3 692,7 @@37691 @@ -3619,7 +3702,7 @@ 39981 37692 else 39982 37693 AC_CACHE_CHECK([whether memcpy handles overlaps],[vim_cv_memcpy_handles_overlap], … … 39987 37698 vim_cv_memcpy_handles_overlap=yes 39988 37699 ],[ 39989 @@ -3697,6 +37 70,9 @@37700 @@ -3697,6 +3780,9 @@ 39990 37701 fi 39991 37702 … … 39997 37708 AC_ARG_ENABLE(nls, 39998 37709 [ --disable-nls Don't support NLS (gettext()).], , 39999 @@ -3715,16 +3 791,18 @@37710 @@ -3715,16 +3801,18 @@ 40000 37711 if test -f po/Makefile; then 40001 37712 have_gettext="no" … … 40022 37733 diff -Naur vim74.orig/src/diff.c vim74/src/diff.c 40023 37734 --- 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 @@ 40026 37745 40027 37746 for (wp = firstwin; wp != NULL; wp = wp->w_next) … … 40034 37753 diff -Naur vim74.orig/src/dosinst.c vim74/src/dosinst.c 40035 37754 --- vim74.orig/src/dosinst.c 2013-05-06 02:06:04.000000000 +0000 40036 +++ vim74/src/dosinst.c 2014-0 4-27 05:20:58.125102165+000037755 +++ vim74/src/dosinst.c 2014-06-01 00:43:14.177480209 +0000 40037 37756 @@ -1192,23 +1192,29 @@ 40038 37757 fprintf(fd, " if arg3 =~ ' ' | let arg3 = '\"' . arg3 . '\"' | endif\n"); … … 40087 37806 diff -Naur vim74.orig/src/edit.c vim74/src/edit.c 40088 37807 --- vim74.orig/src/edit.c 2013-07-04 18:22:25.000000000 +0000 40089 +++ vim74/src/edit.c 2014-0 4-27 05:20:58.128435582+000037808 +++ vim74/src/edit.c 2014-06-01 00:43:14.210813457 +0000 40090 37809 @@ -199,7 +199,7 @@ 40091 37810 static void spell_back_to_badword __ARGS((void)); … … 40308 38027 /* Show the popup menu with a different set of matches. */ 40309 38028 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 @@ 40311 38040 char_u *dict = NULL; 40312 38041 int dict_f = 0; … … 40316 38045 if (!compl_started) 40317 38046 { 40318 @@ -4197,6 +420 2,7 @@38047 @@ -4197,6 +4203,7 @@ 40319 38048 for (;;) 40320 38049 { … … 40324 38053 /* For ^N/^P pick a new entry from e_cpt if compl_started is off, 40325 38054 * or if found_all says this entry is done. For ^X^L only use the 40326 @@ -4216,6 +422 2,10 @@38055 @@ -4216,6 +4223,10 @@ 40327 38056 dec(&first_match_pos); 40328 38057 last_match_pos = first_match_pos; … … 40335 38064 else if (vim_strchr((char_u *)"buwU", *e_cpt) != NULL 40336 38065 && (ins_buf = ins_compl_next_buf(ins_buf, *e_cpt)) != curbuf) 40337 @@ -4380,7 +439 0,7 @@38066 @@ -4380,7 +4391,7 @@ 40338 38067 if (ins_buf->b_p_inf) 40339 38068 p_scs = FALSE; … … 40344 38073 * buffers is a good idea, on the other hand, we always set 40345 38074 * wrapscan for curbuf to avoid missing matches -- Acevedo,Webb */ 40346 @@ -4407,12 +441 7,13 @@38075 @@ -4407,12 +4418,13 @@ 40347 38076 compl_pattern, 1L, SEARCH_KEEP + SEARCH_NFMSG, 40348 38077 RE_LAST, (linenr_T)0, NULL); … … 40359 38088 else if (first_match_pos.lnum == last_match_pos.lnum 40360 38089 && first_match_pos.col == last_match_pos.col) 40361 @@ -5184,9 +519 5,21 @@38090 @@ -5184,9 +5196,21 @@ 40362 38091 } 40363 38092 else if (ctrl_x_mode == CTRL_X_FILES) … … 40384 38113 compl_pattern = addstar(line + compl_col, compl_length, 40385 38114 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 @@ 40387 38152 if (!arrow_used) /* something has been inserted */ 40388 38153 { … … 40393 38158 } 40394 38159 #ifdef FEAT_SPELL 40395 @@ -6776,9 +6 799,10 @@38160 @@ -6776,9 +6804,10 @@ 40396 38161 * to another window/buffer. 40397 38162 */ … … 40405 38170 int cc; 40406 38171 char_u *ptr; 40407 @@ -6849,7 +687 3,7 @@38172 @@ -6849,7 +6878,7 @@ 40408 38173 * Do this when ESC was used or moving the cursor up/down. 40409 38174 * Check for the old position still being valid, just in case the text … … 40414 38179 && end_insert_pos->lnum <= curbuf->b_ml.ml_line_count) 40415 38180 { 40416 @@ -6872,7 +6 896,6 @@38181 @@ -6872,7 +6901,6 @@ 40417 38182 else if (cc != NUL) 40418 38183 ++curwin->w_cursor.col; /* put cursor back on the NUL */ … … 40422 38187 * deleted characters. */ 40423 38188 if (VIsual_active && VIsual.lnum == curwin->w_cursor.lnum) 40424 @@ -6882,12 +69 05,11 @@38189 @@ -6882,12 +6910,11 @@ 40425 38190 if (VIsual.col > len) 40426 38191 { … … 40437 38202 } 40438 38203 did_ai = FALSE; 40439 @@ -6902,6 +692 4,7 @@38204 @@ -6902,6 +6929,7 @@ 40440 38205 if (end_insert_pos != NULL) 40441 38206 { … … 40445 38210 } 40446 38211 } 40447 @@ -7845,8 +78 68,7 @@38212 @@ -7845,8 +7873,7 @@ 40448 38213 if (try_match && keytyped == ':') 40449 38214 { … … 40455 38220 /* Need to get the line again after cin_islabel(). */ 40456 38221 p = ml_get_curline(); 40457 @@ -7856,7 +78 78,7 @@38222 @@ -7856,7 +7883,7 @@ 40458 38223 { 40459 38224 p[curwin->w_cursor.col - 1] = ' '; … … 40464 38229 p[curwin->w_cursor.col - 1] = ':'; 40465 38230 if (i) 40466 @@ -8084,9 +81 06,7 @@38231 @@ -8084,9 +8111,7 @@ 40467 38232 int need_redraw = FALSE; 40468 38233 int regname; … … 40474 38239 /* 40475 38240 * If we are going to wait for a character, show a '"'. 40476 @@ -8190,11 +821 0,9 @@38241 @@ -8190,11 +8215,9 @@ 40477 38242 if (need_redraw || stuff_empty()) 40478 38243 edit_unputchar(); … … 40486 38251 40487 38252 /* 40488 @@ -8237,6 +82 55,7 @@38253 @@ -8237,6 +8260,7 @@ 40489 38254 40490 38255 /* Need to reset Insstart, esp. because a BS that joins … … 40494 38259 break; 40495 38260 40496 @@ -8366,7 +83 85,7 @@38261 @@ -8366,7 +8390,7 @@ 40497 38262 disabled_redraw = TRUE; 40498 38263 return FALSE; /* repeat the insert */ … … 40503 38268 } 40504 38269 40505 @@ -8390,11 +84 09,7 @@38270 @@ -8390,11 +8414,7 @@ 40506 38271 #endif 40507 38272 ) … … 40516 38281 && !revins_on 40517 38282 #endif 40518 @@ -8496,7 +851 1,6 @@38283 @@ -8496,7 +8516,6 @@ 40519 38284 } 40520 38285 #endif … … 40524 38289 * If 'keymodel' contains "startsel", may start selection. 40525 38290 * Returns TRUE when a CTRL-O and other keys stuffed. 40526 @@ -8552,7 +85 66,6 @@38291 @@ -8552,7 +8571,6 @@ 40527 38292 } 40528 38293 return FALSE; … … 40532 38297 /* 40533 38298 * <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 @@ 40535 38351 40536 38352 *inserted_space_p = FALSE; … … 40541 38357 ts = (int)get_sts_value(); 40542 38358 /* 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 @@ 40544 38397 * When nothing special, insert TAB like a normal character 40545 38398 */ … … 40550 38403 return TRUE; 40551 38404 40552 @@ -9651,7 +966 4,7 @@38405 @@ -9651,7 +9669,7 @@ 40553 38406 AppendToRedobuff((char_u *)"\t"); 40554 38407 … … 40561 38414 diff -Naur vim74.orig/src/eval.c vim74/src/eval.c 40562 38415 --- vim74.orig/src/eval.c 2013-07-05 16:23:42.000000000 +0000 40563 +++ vim74/src/eval.c 2014-0 4-27 05:20:58.138435829+000038416 +++ vim74/src/eval.c 2014-06-01 00:43:14.237480056 +0000 40564 38417 @@ -125,9 +125,6 @@ 40565 38418 */ … … 40613 38466 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)); 40614 38467 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 @@ 40616 38477 static void f_bufnr __ARGS((typval_T *argvars, typval_T *rettv)); 40617 38478 static void f_bufwinnr __ARGS((typval_T *argvars, typval_T *rettv)); … … 40623 38484 #ifdef FEAT_FLOAT 40624 38485 static void f_ceil __ARGS((typval_T *argvars, typval_T *rettv)); 40625 @@ -508,6 +51 4,7 @@38486 @@ -508,6 +515,7 @@ 40626 38487 static void f_eval __ARGS((typval_T *argvars, typval_T *rettv)); 40627 38488 static void f_eventhandler __ARGS((typval_T *argvars, typval_T *rettv)); … … 40631 38492 #ifdef FEAT_FLOAT 40632 38493 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 @@ 40634 38503 static void f_synstack __ARGS((typval_T *argvars, typval_T *rettv)); 40635 38504 static void f_synconcealed __ARGS((typval_T *argvars, typval_T *rettv)); … … 40639 38508 static void f_tabpagenr __ARGS((typval_T *argvars, typval_T *rettv)); 40640 38509 static void f_tabpagewinnr __ARGS((typval_T *argvars, typval_T *rettv)); 40641 @@ -739,6 +74 7,7 @@38510 @@ -739,6 +749,7 @@ 40642 38511 static void f_type __ARGS((typval_T *argvars, typval_T *rettv)); 40643 38512 static void f_undofile __ARGS((typval_T *argvars, typval_T *rettv)); … … 40647 38516 static void f_virtcol __ARGS((typval_T *argvars, typval_T *rettv)); 40648 38517 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 @@ 40650 38528 static char_u * make_expanded_name __ARGS((char_u *in_start, char_u *expr_start, char_u *expr_end, char_u *in_end)); 40651 38529 static int eval_isnamec __ARGS((int c)); … … 40656 38534 static typval_T *alloc_tv __ARGS((void)); 40657 38535 static typval_T *alloc_string_tv __ARGS((char_u *string)); 40658 @@ -778,8 +78 7,8 @@38536 @@ -778,8 +789,8 @@ 40659 38537 static char_u *get_tv_string __ARGS((typval_T *varp)); 40660 38538 static char_u *get_tv_string_buf __ARGS((typval_T *varp, char_u *buf)); … … 40667 38545 static void vars_clear_ext __ARGS((hashtab_T *ht, int free_val)); 40668 38546 static void delete_var __ARGS((hashtab_T *ht, hashitem_T *hi)); 40669 @@ -799,7 +8 08,7 @@38547 @@ -799,7 +810,7 @@ 40670 38548 static void list_func_head __ARGS((ufunc_T *fp, int indent)); 40671 38549 static ufunc_T *find_func __ARGS((char_u *name)); … … 40676 38554 static void func_do_profile __ARGS((ufunc_T *fp)); 40677 38555 static void prof_sort_list __ARGS((FILE *fd, ufunc_T **sorttab, int st_len, char *title, int prefer_self)); 40678 @@ -828,6 +83 7,8 @@38556 @@ -828,6 +839,8 @@ 40679 38557 static int searchpair_cmn __ARGS((typval_T *argvars, pos_T *match_pos)); 40680 38558 static int search_cmn __ARGS((typval_T *argvars, pos_T *match_pos, int *flagsp)); … … 40685 38563 40686 38564 #ifdef EBCDIC 40687 @@ -869,6 +88 0,7 @@38565 @@ -869,6 +882,7 @@ 40688 38566 hash_add(&compat_hashtab, p->vv_di.di_key); 40689 38567 } … … 40693 38571 40694 38572 #ifdef EBCDIC 40695 @@ -915,12 +92 7,13 @@38573 @@ -915,12 +929,13 @@ 40696 38574 /* autoloaded script names */ 40697 38575 ga_clear_strings(&ga_loaded); … … 40710 38588 40711 38589 /* unreferenced lists and dicts */ 40712 @@ -1054,7 +106 7,7 @@38590 @@ -1054,7 +1069,7 @@ 40713 38591 ga_init2(&redir_ga, (int)sizeof(char), 500); 40714 38592 … … 40719 38597 if (redir_endp == NULL || redir_lval->ll_name == NULL || *redir_endp != NUL) 40720 38598 { 40721 @@ -1145,7 +11 58,7 @@38599 @@ -1145,7 +1160,7 @@ 40722 38600 /* Call get_lval() again, if it's inside a Dict or List it may 40723 38601 * have changed. */ … … 40728 38606 set_var_lval(redir_lval, redir_endp, &tv, FALSE, (char_u *)"."); 40729 38607 clear_lval(redir_lval); 40730 @@ -1848,8 +186 1,9 @@38608 @@ -1848,8 +1863,9 @@ 40731 38609 return; 40732 38610 if (argend > arg && argend[-1] == '.') /* for var.='str' */ … … 40740 38618 /* 40741 38619 * ":let" without "=": list variables 40742 @@ -1878,12 +189 2,14 @@38620 @@ -1878,12 +1894,14 @@ 40743 38621 { 40744 38622 op[0] = '='; … … 40759 38637 if (eap->skip) 40760 38638 ++emsg_skip; 40761 @@ -2234,7 +225 0,7 @@38639 @@ -2234,7 +2252,7 @@ 40762 38640 { 40763 38641 if (tofree != NULL) … … 40768 38646 else 40769 38647 { 40770 @@ -2445,7 +246 1,7 @@38648 @@ -2445,7 +2463,7 @@ 40771 38649 p = get_tv_string_chk(tv); 40772 38650 if (p != NULL && op != NULL && *op == '.') … … 40777 38655 { 40778 38656 p = ptofree = concat_str(s, p); 40779 @@ -2469,7 +248 5,7 @@38657 @@ -2469,7 +2487,7 @@ 40780 38658 { 40781 38659 lval_T lv; … … 40786 38664 { 40787 38665 if (endchars != NULL && vim_strchr(endchars, *skipwhite(p)) == NULL) 40788 @@ -2514,18 +253 0,22 @@38666 @@ -2514,18 +2532,22 @@ 40789 38667 * "unlet" is TRUE for ":unlet": slightly different behavior when something is 40790 38668 * wrong; must end in space or cmd separator. … … 40811 38689 { 40812 38690 char_u *p; 40813 @@ -2539,6 +25 59,7 @@38691 @@ -2539,6 +2561,7 @@ 40814 38692 char_u *key = NULL; 40815 38693 int len; … … 40819 38697 /* Clear everything in "lp". */ 40820 38698 vim_memset(lp, 0, sizeof(lval_T)); 40821 @@ -2586,7 +260 7,7 @@38699 @@ -2586,7 +2609,7 @@ 40822 38700 40823 38701 cc = *p; … … 40828 38706 EMSG2(_(e_undefvar), lp->ll_name); 40829 38707 *p = cc; 40830 @@ -2899,7 +292 0,7 @@38708 @@ -2899,7 +2922,7 @@ 40831 38709 40832 38710 /* handle +=, -= and .= */ … … 40837 38715 if (tv_op(&tv, rettv, op) == OK) 40838 38716 set_var(lp->ll_name, &tv, FALSE); 40839 @@ -3420,7 +344 1,7 @@38717 @@ -3420,7 +3443,7 @@ 40840 38718 40841 38719 /* If it is the name of a variable of type VAR_FUNC use its contents. */ … … 40846 38724 /* Skip white space to allow ":call func ()". Not good, but required for 40847 38725 * backward compatibility. */ 40848 @@ -3551,7 +357 2,7 @@38726 @@ -3551,7 +3574,7 @@ 40849 38727 do 40850 38728 { … … 40855 38733 if (lv.ll_name == NULL) 40856 38734 error = TRUE; /* error but continue parsing */ 40857 @@ -3704,7 +372 5,7 @@38735 @@ -3704,7 +3727,7 @@ 40858 38736 ret = FAIL; 40859 38737 else … … 40864 38742 ret = FAIL; 40865 38743 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 @@ 40867 38754 if (evaluate) 40868 38755 { … … 40874 38761 if (**arg != NUL) 40875 38762 ++*arg; 40876 @@ -5147,7 +51 69,7 @@38763 @@ -5147,7 +5171,7 @@ 40877 38764 { 40878 38765 /* If "s" is the name of a variable of type VAR_FUNC … … 40883 38770 /* Invoke the function. */ 40884 38771 ret = get_func_tv(s, len, rettv, arg, 40885 @@ -5174,7 +519 6,7 @@38772 @@ -5174,7 +5198,7 @@ 40886 38773 } 40887 38774 } … … 40892 38779 ret = OK; 40893 38780 } 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 @@ 40895 38791 if (ni == NULL) 40896 38792 return FAIL; … … 40909 38805 /* Append new item at end of list. */ 40910 38806 list_append(l, ni); 40911 @@ -6434,7 +646 6,6 @@38807 @@ -6434,7 +6468,6 @@ 40912 38808 item->li_prev = ni; 40913 38809 ++l->lv_len; … … 40917 38813 40918 38814 /* 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 @@ 40920 38902 {"bufwinnr", 1, 1, f_bufwinnr}, 40921 38903 {"byte2line", 1, 1, f_byte2line}, … … 40925 38907 #ifdef FEAT_FLOAT 40926 38908 {"ceil", 1, 1, f_ceil}, 40927 @@ -7893,6 +79 25,7 @@38909 @@ -7893,6 +7931,7 @@ 40928 38910 {"eval", 1, 1, f_eval}, 40929 38911 {"eventhandler", 0, 0, f_eventhandler}, … … 40933 38915 #ifdef FEAT_FLOAT 40934 38916 {"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 @@ 40936 38926 {"getpid", 0, 0, f_getpid}, 40937 38927 {"getpos", 1, 1, f_getpos}, … … 40942 38932 {"gettabvar", 2, 3, f_gettabvar}, 40943 38933 {"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 @@ 40945 38944 {"log10", 1, 1, f_log10}, 40946 38945 #endif … … 40951 38950 {"map", 2, 2, f_map}, 40952 38951 {"maparg", 1, 4, f_maparg}, 40953 @@ -8100,7 +81 33,7 @@38952 @@ -8100,7 +8140,7 @@ 40954 38953 {"strridx", 2, 3, f_strridx}, 40955 38954 {"strtrans", 1, 1, f_strtrans}, … … 40960 38959 {"synID", 3, 3, f_synID}, 40961 38960 {"synIDattr", 2, 3, f_synIDattr}, 40962 @@ -8108,6 +814 1,7 @@38961 @@ -8108,6 +8148,7 @@ 40963 38962 {"synconcealed", 2, 2, f_synconcealed}, 40964 38963 {"synstack", 2, 2, f_synstack}, … … 40968 38967 {"tabpagenr", 0, 1, f_tabpagenr}, 40969 38968 {"tabpagewinnr", 1, 2, f_tabpagewinnr}, 40970 @@ -8128,6 +816 2,7 @@38969 @@ -8128,6 +8169,7 @@ 40971 38970 {"type", 1, 1, f_type}, 40972 38971 {"undofile", 1, 1, f_undofile}, … … 40976 38975 {"virtcol", 1, 1, f_virtcol}, 40977 38976 {"visualmode", 0, 1, f_visualmode}, 40978 @@ -8269,16 +83 04,17 @@38977 @@ -8269,16 +8311,17 @@ 40979 38978 * name it contains, otherwise return "name". 40980 38979 */ … … 40996 38995 if (v != NULL && v->di_tv.v_type == VAR_FUNC) 40997 38996 { 40998 @@ -8449,33 +84 85,39 @@38997 @@ -8449,33 +8492,39 @@ 40999 38998 /* execute the function if no errors detected and executing */ 41000 38999 if (evaluate && error == ERROR_NONE) … … 41042 39041 41043 39042 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 @@ 41045 39086 #endif 41046 39087 } … … 41058 39099 #ifdef FEAT_MBYTE 41059 39100 char_u *t; 41060 @@ -9202,7 +92 42,10 @@39101 @@ -9202,7 +9284,10 @@ 41061 39102 { 41062 39103 if (*t == NUL) /* EOL reached */ … … 41070 39111 rettv->vval.v_number = (varnumber_T)(t - str); 41071 39112 #else 41072 @@ -9211,6 +92 54,28 @@39113 @@ -9211,6 +9296,28 @@ 41073 39114 #endif 41074 39115 } … … 41099 39140 func_call(name, args, selfdict, rettv) 41100 39141 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 @@ 41102 39162 typval_T *argvars; 41103 39163 typval_T *rettv; … … 41123 39183 41124 39184 /* 41125 @@ -10010,8 +10 090,6 @@39185 @@ -10010,8 +10135,6 @@ 41126 39186 int n = FALSE; 41127 39187 int len = 0; … … 41132 39192 if (*p == '$') /* environment variable */ 41133 39193 { 41134 @@ -10062,7 +101 40,7 @@39194 @@ -10062,7 +10185,7 @@ 41135 39195 { 41136 39196 if (tofree != NULL) … … 41141 39201 { 41142 39202 /* handle d.key, l[idx], f(expr) */ 41143 @@ -10078,8 +10 156,6 @@39203 @@ -10078,8 +10201,6 @@ 41144 39204 } 41145 39205 … … 41150 39210 41151 39211 #ifdef FEAT_FLOAT 41152 @@ -11090,6 +11 166,8 @@39212 @@ -11090,6 +11211,8 @@ 41153 39213 { 41154 39214 char_u *p; … … 41159 39219 return; 41160 39220 41161 @@ -11102,8 +11 180,6 @@39221 @@ -11102,8 +11225,6 @@ 41162 39222 p = ml_get_buf(buf, start, FALSE); 41163 39223 else … … 41168 39228 } 41169 39229 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 @@ 41171 39305 char_u *strregname; 41172 39306 int regname; … … 41176 39310 41177 39311 if (argvars[0].v_type != VAR_UNKNOWN) 41178 @@ -11741,17 +118 18,34 @@39312 @@ -11741,17 +11891,34 @@ 41179 39313 strregname = get_tv_string_chk(&argvars[0]); 41180 39314 error = strregname == NULL; … … 41214 39348 41215 39349 /* 41216 @@ -11791,12 +11 885,10 @@39350 @@ -11791,12 +11958,10 @@ 41217 39351 { 41218 39352 case MLINE: buf[0] = 'V'; break; … … 41227 39361 rettv->v_type = VAR_STRING; 41228 39362 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 @@ 41230 39409 #ifndef CASE_INSENSITIVE_FILENAME 41231 39410 "fname_case", … … 41237 39416 "arabic", 41238 39417 #endif 41239 @@ -12507,9 +126 02,7 @@39418 @@ -12507,9 +12694,7 @@ 41240 39419 #ifdef FEAT_VIRTUALEDIT 41241 39420 "virtualedit", … … 41247 39426 "visualextra", 41248 39427 #endif 41249 @@ -12538,7 +12 631,12 @@39428 @@ -12538,7 +12723,12 @@ 41250 39429 "xfontset", 41251 39430 #endif … … 41261 39440 #ifdef USE_XSMP 41262 39441 "xsmp", 41263 @@ -12569,7 +12 667,26 @@39442 @@ -12569,7 +12759,26 @@ 41264 39443 if (n == FALSE) 41265 39444 { … … 41289 39468 n = (starting != 0); 41290 39469 #ifdef FEAT_MBYTE 41291 @@ -13045,9 +13 162,18 @@39470 @@ -13045,9 +13254,18 @@ 41292 39471 } 41293 39472 … … 41308 39487 && argvars[1].v_type != VAR_UNKNOWN 41309 39488 && argvars[2].v_type != VAR_UNKNOWN) 41310 @@ -13298,8 +13 424,8 @@39489 @@ -13298,8 +13516,8 @@ 41311 39490 dictitem_T *di; 41312 39491 … … 41319 39498 { 41320 39499 if (*end != NUL) 41321 @@ -13312,7 +13 438,7 @@39500 @@ -13312,7 +13530,7 @@ 41322 39501 rettv->vval.v_number = 1; /* always locked */ 41323 39502 else … … 41328 39507 { 41329 39508 /* Consider a variable locked when: 41330 @@ -13846,6 +1 3972,7 @@39509 @@ -13846,6 +14064,7 @@ 41331 39510 int type; 41332 39511 { … … 41336 39515 char_u *pat; 41337 39516 regmatch_T regmatch; 41338 @@ -13885,7 +14 012,10 @@39517 @@ -13885,7 +14104,10 @@ 41339 39518 li = l->lv_first; 41340 39519 } … … 41347 39526 pat = get_tv_string_buf_chk(&argvars[1], patbuf); 41348 39527 if (pat == NULL) 41349 @@ -13909,7 +14 039,7 @@39528 @@ -13909,7 +14131,7 @@ 41350 39529 { 41351 39530 if (start < 0) … … 41356 39535 /* When "count" argument is there ignore matches before "start", 41357 39536 * otherwise skip part of the string. Differs when pattern is "^" 41358 @@ -13917,7 +14 047,10 @@39537 @@ -13917,7 +14139,10 @@ 41359 39538 if (argvars[3].v_type != VAR_UNKNOWN) 41360 39539 startcol = start; … … 41367 39546 41368 39547 if (argvars[3].v_type != VAR_UNKNOWN) 41369 @@ -13967,6 +141 00,12 @@39548 @@ -13967,6 +14192,12 @@ 41370 39549 #else 41371 39550 startcol = (colnr_T)(regmatch.startp[0] + 1 - str); … … 41380 39559 } 41381 39560 41382 @@ -14095,8 +14 234,8 @@39561 @@ -14095,8 +14326,8 @@ 41383 39562 } 41384 39563 else … … 41391 39570 } 41392 39571 #endif 41393 @@ -14292,14 +14 431,23 @@39572 @@ -14292,14 +14523,23 @@ 41394 39573 return; 41395 39574 … … 41421 39600 #endif 41422 39601 41423 @@ -14316,7 +14 464,6 @@39602 @@ -14316,7 +14556,6 @@ 41424 39603 buf[1] = NUL; 41425 39604 buf[2] = NUL; … … 41429 39608 { 41430 39609 if (VIsual_select) 41431 @@ -14324,9 +14 471,7 @@39610 @@ -14324,9 +14563,7 @@ 41432 39611 else 41433 39612 buf[0] = VIsual_mode; … … 41440 39619 { 41441 39620 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 @@ 41443 39664 regname = *strregname; 41444 39665 if (regname == 0 || regname == '@') … … 41449 39670 if (argvars[2].v_type != VAR_UNKNOWN) 41450 39671 { 41451 @@ -16675,7 +16 818,6 @@39672 @@ -16675,7 +16913,6 @@ 41452 39673 case 'V': case 'l': /* line-wise selection */ 41453 39674 yank_type = MLINE; … … 41457 39678 yank_type = MBLOCK; 41458 39679 if (VIM_ISDIGIT(stropt[1])) 41459 @@ -16685,14 +16 827,62 @@39680 @@ -16685,14 +16922,62 @@ 41460 39681 --stropt; 41461 39682 } … … 41523 39744 } 41524 39745 41525 @@ -16869,7 +17 059,7 @@39746 @@ -16869,7 +17154,7 @@ 41526 39747 typval_T *rettv; 41527 39748 { … … 41532 39753 } 41533 39754 41534 @@ -16881,7 +17 071,7 @@39755 @@ -16881,7 +17166,7 @@ 41535 39756 typval_T *argvars UNUSED; 41536 39757 typval_T *rettv; … … 41541 39762 41542 39763 /* 41543 @@ -16951,10 +17 141,11 @@39764 @@ -16951,10 +17236,11 @@ 41544 39765 static char_u *item_compare_func; 41545 39766 static dict_T *item_compare_selfdict; … … 41554 39775 static int 41555 39776 #ifdef __BORLANDC__ 41556 @@ -17028,9 +17 219,10 @@39777 @@ -17028,9 +17314,10 @@ 41557 39778 * "sort({list})" function 41558 39779 */ … … 41566 39787 list_T *l; 41567 39788 listitem_T *li; 41568 @@ -17039,12 +17 231,12 @@39789 @@ -17039,12 +17326,12 @@ 41569 39790 long i; 41570 39791 … … 41581 39802 rettv->vval.v_list = l; 41582 39803 rettv->v_type = VAR_LIST; 41583 @@ -17091,29 +17 283,72 @@39804 @@ -17091,29 +17378,72 @@ 41584 39805 ptrs = (listitem_T **)alloc((int)(len * sizeof(listitem_T *))); 41585 39806 if (ptrs == NULL) … … 41670 39891 } 41671 39892 41672 @@ -17122,6 +17 357,28 @@39893 @@ -17122,6 +17452,28 @@ 41673 39894 } 41674 39895 … … 41699 39920 */ 41700 39921 static void 41701 @@ -17709,9 +1 7966,29 @@39922 @@ -17709,9 +18061,29 @@ 41702 39923 typval_T *argvars; 41703 39924 typval_T *rettv; … … 41732 39953 41733 39954 /* 41734 @@ -17979,13 +18 256,11 @@39955 @@ -17979,13 +18351,11 @@ 41735 39956 #endif 41736 39957 } … … 41748 39969 char_u *res = NULL; 41749 39970 char_u *p; 41750 @@ -17993,9 +18 268,12 @@39971 @@ -17993,9 +18363,12 @@ 41751 39972 char_u buf[NUMBUFLEN]; 41752 39973 int err = FALSE; … … 41762 39983 if (argvars[1].v_type != VAR_UNKNOWN) 41763 39984 { 41764 @@ -18006,74 +18 284,159 @@39985 @@ -18006,74 +18379,159 @@ 41765 39986 if ((infile = vim_tempname('i')) == NULL) 41766 39987 { … … 41829 40050 + if (res == NULL) 41830 40051 + goto errret; 41831 41832 - for (s = res; *s; ++s) 40052 + 41833 40053 + list = list_alloc(); 41834 40054 + if (list == NULL) 41835 40055 + goto errret; 41836 + 40056 40057 - for (s = res; *s; ++s) 41837 40058 + for (i = 0; i < len; ++i) 41838 40059 { … … 41956 40177 41957 40178 /* 41958 @@ -18688,7 +19 051,6 @@40179 @@ -18688,7 +19146,6 @@ 41959 40180 typval_T *argvars UNUSED; 41960 40181 typval_T *rettv UNUSED; … … 41964 40185 41965 40186 rettv->v_type = VAR_STRING; 41966 @@ -18699,7 +19 061,6 @@40187 @@ -18699,7 +19156,6 @@ 41967 40188 /* A non-zero number or non-empty string argument: reset mode. */ 41968 40189 if (non_zero_arg(&argvars[0])) … … 41972 40193 41973 40194 /* 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 @@ 41975 40236 } 41976 40237 … … 42022 40283 */ 42023 40284 static void 42024 @@ -18933,10 +19 337,7 @@40285 @@ -18933,10 +19442,7 @@ 42025 40286 int binary = FALSE; 42026 40287 char_u *fname; … … 42033 40294 if (check_restricted() || check_secure()) 42034 40295 return; 42035 @@ -18963,33 +19 364,8 @@40296 @@ -18963,33 +19469,8 @@ 42036 40297 } 42037 40298 else … … 42069 40330 } 42070 40331 42071 @@ -19073,14 +19 449,12 @@40332 @@ -19073,14 +19554,12 @@ 42072 40333 return NULL; 42073 40334 if (name[0] == '.') /* cursor */ … … 42084 40345 { 42085 40346 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 @@ 42087 40393 * Return OK or FAIL. 42088 40394 */ … … 42098 40404 int ret = OK; 42099 40405 typval_T *tv = NULL; 42100 @@ -19750,7 +20 125,7 @@40406 @@ -19750,7 +20234,7 @@ 42101 40407 */ 42102 40408 else … … 42107 40413 tv = &v->di_tv; 42108 40414 } 42109 @@ -19790,24 +20 165,30 @@40415 @@ -19790,24 +20274,30 @@ 42110 40416 while (ret == OK 42111 40417 && (**arg == '[' … … 42144 40450 /* Stop the expression evaluation when immediately aborting on 42145 40451 * error, or when an interrupt occurred or an exception was thrown 42146 @@ -20094,6 +20 475,9 @@40452 @@ -20094,6 +20584,9 @@ 42147 40453 return res != NULL ? res : (char_u *)""; 42148 40454 } … … 42154 40460 get_tv_string_chk(varp) 42155 40461 typval_T *varp; 42156 @@ -20146,9 +20 530,10 @@40462 @@ -20146,9 +20639,10 @@ 42157 40463 * hashtab_T used. 42158 40464 */ … … 42166 40472 char_u *varname; 42167 40473 hashtab_T *ht; 42168 @@ -20158,7 +20 543,7 @@40474 @@ -20158,7 +20652,7 @@ 42169 40475 *htp = ht; 42170 40476 if (ht == NULL) … … 42175 40481 42176 40482 /* 42177 @@ -20166,11 +20 551,11 @@40483 @@ -20166,11 +20660,11 @@ 42178 40484 * Returns NULL if not found. 42179 40485 */ … … 42189 40495 hashitem_T *hi; 42190 40496 42191 @@ -20202,7 +20 587,7 @@40497 @@ -20202,7 +20696,7 @@ 42192 40498 * worked find the variable again. Don't auto-load a script if it was 42193 40499 * loaded already, otherwise it would be loaded every time when … … 42198 40504 /* Note: script_autoload() may make "hi" invalid. It must either 42199 40505 * be obtained again or not used. */ 42200 @@ -20282,7 +20 667,7 @@40506 @@ -20282,7 +20776,7 @@ 42201 40507 { 42202 40508 dictitem_T *v; … … 42207 40513 return NULL; 42208 40514 return get_tv_string(&v->di_tv); 42209 @@ -20560,6 +2 0945,13 @@40515 @@ -20560,6 +21054,13 @@ 42210 40516 v->di_tv.vval.v_number = get_tv_number(tv); 42211 40517 if (STRCMP(varname, "searchforward") == 0) … … 42221 40527 return; 42222 40528 } 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 @@ 42224 40540 * dict.func existing dict entry that's not a Funcref 42225 40541 * "name" == NULL, "fudi.fd_dict" set, … … 42230 40546 p = eap->arg; 42231 40547 name = trans_function_name(&p, eap->skip, 0, &fudi); 42232 @@ -21361,6 +21 755,7 @@40548 @@ -21361,6 +21865,7 @@ 42233 40549 if (STRCMP(((char_u **)(newargs.ga_data))[i], arg) == 0) 42234 40550 { … … 42238 40554 } 42239 40555 42240 @@ -21604,7 +2 1999,7 @@40556 @@ -21604,7 +22109,7 @@ 42241 40557 */ 42242 40558 if (fudi.fd_dict == NULL) … … 42247 40563 { 42248 40564 emsg_funcname(N_("E707: Function name conflicts with variable: %s"), 42249 @@ -21762,8 +22 157,9 @@40565 @@ -21762,8 +22267,9 @@ 42250 40566 * Also handles a Funcref in a List or Dictionary. 42251 40567 * Returns the function name in allocated memory, or NULL for failure. … … 42259 40575 */ 42260 40576 static char_u * 42261 @@ -21801,7 +22 197,8 @@40577 @@ -21801,7 +22307,8 @@ 42262 40578 if (lead > 2) 42263 40579 start += lead; … … 42269 40585 if (end == start) 42270 40586 { 42271 @@ -21863,14 +22 260,14 @@40587 @@ -21863,14 +22370,14 @@ 42272 40588 if (lv.ll_exp_name != NULL) 42273 40589 { … … 42286 40602 name = NULL; 42287 40603 } 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 @@ 42289 40620 } 42290 40621 else … … 42296 40627 len = (int)(end - lv.ll_name); 42297 40628 } 42298 @@ -21924,11 +22 322,23 @@40629 @@ -21924,11 +22440,23 @@ 42299 40630 lead += (int)STRLEN(sid_buf); 42300 40631 } … … 42322 40653 if (name != NULL) 42323 40654 { 42324 @@ -21941,7 +22 351,7 @@40655 @@ -21941,7 +22469,7 @@ 42325 40656 STRCPY(name + 3, sid_buf); 42326 40657 } … … 42331 40662 *pp = end; 42332 40663 42333 @@ -22062,7 +22 472,7 @@40664 @@ -22062,7 +22590,7 @@ 42334 40665 translated_function_exists(name) 42335 40666 char_u *name; … … 42340 40671 return find_func(name) != NULL; 42341 40672 } 42342 @@ -22078,7 +22 488,8 @@40673 @@ -22078,7 +22606,8 @@ 42343 40674 char_u *p; 42344 40675 int n = FALSE; … … 42350 40681 42351 40682 /* Only accept "funcname", "funcname ", "funcname (..." and 42352 @@ -22109,14 +22 520,20 @@40683 @@ -22109,14 +22638,20 @@ 42353 40684 42354 40685 /* … … 42375 40706 42376 40707 #if defined(FEAT_PROFILE) || defined(PROTO) 42377 @@ -22325,10 +22 742,6 @@40708 @@ -22325,10 +22860,6 @@ 42378 40709 int ret = FALSE; 42379 40710 int i; … … 42386 40717 p = vim_strchr(name, AUTOLOAD_CHAR); 42387 40718 if (p == NULL || p == name) 42388 @@ -24260,6 +24 673,17 @@40719 @@ -24260,6 +24791,17 @@ 42389 40720 } 42390 40721 } … … 42404 40735 } 42405 40736 42406 @@ -24283,6 +24 707,7 @@40737 @@ -24283,6 +24825,7 @@ 42407 40738 garray_T ga; 42408 40739 char_u *ret; … … 42412 40743 /* Make 'cpoptions' empty, so that the 'l' flag doesn't work here */ 42413 40744 save_cpo = p_cpo; 42414 @@ -24299,6 +24 724,19 @@40745 @@ -24299,6 +24842,19 @@ 42415 40746 tail = str; 42416 40747 while (vim_regexec_nl(®match, str, (colnr_T)(tail - str))) … … 42432 40763 * Get some space for a temporary buffer to do the substitution 42433 40764 * into. It will contain: 42434 @@ -24321,20 +24 759,9 @@40765 @@ -24321,20 +24877,9 @@ 42435 40766 (void)vim_regsub(®match, sub, (char_u *)ga.ga_data 42436 40767 + ga.ga_len + i, TRUE, TRUE, FALSE); … … 42458 40789 diff -Naur vim74.orig/src/ex_cmds.c vim74/src/ex_cmds.c 42459 40790 --- vim74.orig/src/ex_cmds.c 2013-08-07 13:15:51.000000000 +0000 42460 +++ vim74/src/ex_cmds.c 2014-0 4-27 05:20:58.141769246+000040791 +++ vim74/src/ex_cmds.c 2014-06-01 00:43:14.247480031 +0000 42461 40792 @@ -1012,7 +1012,18 @@ 42462 40793 … … 42479 40810 bangredo = FALSE; 42480 40811 } 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 @@ 42482 40856 if ( ((!other_file && !(flags & ECMD_OLDBUF)) 42483 40857 || (curbuf->b_nwindows == 1 … … 42505 40879 #ifdef FEAT_AUTOCMD 42506 40880 if ((command != NULL || newlnum > (linenr_T)0) 42507 @@ -3332,6 +33 43,12 @@40881 @@ -3332,6 +3359,12 @@ 42508 40882 #endif 42509 40883 buf = buflist_new(ffname, sfname, 0L, … … 42518 40892 if (buf == NULL) 42519 40893 goto theend; 42520 @@ -4097,12 +41 14,12 @@40894 @@ -4097,12 +4130,12 @@ 42521 40895 * 'scroll' */ 42522 40896 if (eap->forceit) … … 42534 40908 bigness = 1; 42535 40909 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 @@ 42537 40920 endcolumn = (curwin->w_curswant == MAXCOL); 42538 40921 } … … 42556 40939 + eap->flags = EXFLAG_PRINT; 42557 40940 + 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); 42559 40942 + sub_nlines = sub_nsubs = eap->line2 - eap->line1 + 1; 42560 40943 + (void)do_sub_msg(FALSE); … … 42566 40949 * Find trailing options. When '&' is used, keep old options. 42567 40950 */ 42568 @@ -4740,11 +47 82,17 @@40951 @@ -4740,11 +4798,17 @@ 42569 40952 char_u *resp; 42570 40953 colnr_T sc, ec; … … 42585 40968 for (i = 0; i < (long)sc; ++i) 42586 40969 msg_putchar(' '); 42587 @@ -5928,14 +59 76,18 @@40970 @@ -5928,14 +5992,18 @@ 42588 40971 "?", ":?", "?<CR>", "g?", "g?g?", "g??", "z?", 42589 40972 "/\\?", "/\\z(\\)", "\\=", ":s\\=", … … 42601 40984 - "\\[pattern]", "\\\\bar", "/\\\\%\\$"}; 42602 40985 + "\\[pattern]", "\\\\bar", "/\\\\%\\$", 42603 + 40986 + "s/\\\\\\~", "s/\\\\U", "s/\\\\L", 42604 40987 + "s/\\\\1", "s/\\\\2", "s/\\\\3", "s/\\\\9"}; 42605 40988 int flags; 42606 40989 42607 40990 d = IObuff; /* assume IObuff is long enough! */ 42608 @@ -5974,7 +60 26,7 @@40991 @@ -5974,7 +6042,7 @@ 42609 40992 /* Replace: 42610 40993 * "[:...:]" with "\[:...:]" 42611 40994 * "[++...]" with "\[++...]" 42612 40995 - * "\{" with "\\{" 42613 + * "\{" with "\\{" 40996 + * "\{" with "\\{" -- matching "} \}" 42614 40997 */ 42615 40998 if ((arg[0] == '[' && (arg[1] == ':' 42616 40999 || (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 @@ 42618 41013 # ifdef FEAT_WINDOWS 42619 41014 ++emsg_off; … … 42626 41021 diff -Naur vim74.orig/src/ex_cmds.h vim74/src/ex_cmds.h 42627 41022 --- vim74.orig/src/ex_cmds.h 2013-06-08 13:08:20.000000000 +0000 42628 +++ vim74/src/ex_cmds.h 2014-0 4-27 05:20:58.141769246+000041023 +++ vim74/src/ex_cmds.h 2014-06-01 00:43:14.250813355 +0000 42629 41024 @@ -477,6 +477,8 @@ 42630 41025 NEEDARG|EXTRA|NOTRLCOM), … … 42664 41059 diff -Naur vim74.orig/src/ex_cmds2.c vim74/src/ex_cmds2.c 42665 41060 --- vim74.orig/src/ex_cmds2.c 2013-06-28 18:14:53.000000000 +0000 42666 +++ vim74/src/ex_cmds2.c 2014-0 4-27 05:20:58.145102663+000041061 +++ vim74/src/ex_cmds2.c 2014-06-01 00:43:14.284146604 +0000 42667 41062 @@ -1436,20 +1436,20 @@ 42668 41063 } … … 42771 41166 diff -Naur vim74.orig/src/ex_docmd.c vim74/src/ex_docmd.c 42772 41167 --- vim74.orig/src/ex_docmd.c 2013-07-24 13:09:37.000000000 +0000 42773 +++ vim74/src/ex_docmd.c 2014-0 4-27 05:20:58.148436078 +000041168 +++ vim74/src/ex_docmd.c 2014-06-01 00:43:14.294146578 +0000 42774 41169 @@ -316,7 +316,6 @@ 42775 41170 static void ex_operators __ARGS((exarg_T *eap)); … … 42934 41329 } 42935 41330 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 @@ 42937 41340 { 42938 41341 /* Set recoverymode right away to avoid the ATTENTION prompt. */ … … 42947 41350 || setfname(curbuf, eap->arg, NULL, TRUE) == OK)) 42948 41351 ml_recover(); 42949 @@ -7910,6 +792 7,8 @@41352 @@ -7910,6 +7928,8 @@ 42950 41353 ? ECMD_ONE : eap->do_ecmd_lnum, 42951 41354 (P_HID(curbuf) ? ECMD_HIDE : 0) … … 42956 41359 + (eap->cmdidx == CMD_badd ? ECMD_ADDBUF : 0 ) 42957 41360 #endif 42958 @@ -8036,6 +805 5,8 @@41361 @@ -8036,6 +8056,8 @@ 42959 41362 { 42960 41363 #ifdef FEAT_SCROLLBIND … … 42965 41368 long y; 42966 41369 linenr_T old_linenr = curwin->w_cursor.lnum; 42967 @@ -8067,13 +808 8,13 @@41370 @@ -8067,13 +8089,13 @@ 42968 41371 42969 41372 … … 42981 41384 if (y > 0) 42982 41385 scrollup(y, TRUE); 42983 @@ -8087,7 +810 8,8 @@41386 @@ -8087,7 +8109,8 @@ 42984 41387 #endif 42985 41388 } … … 42991 41394 { 42992 41395 did_syncbind = TRUE; 42993 @@ -8207,6 +82 29,7 @@41396 @@ -8207,6 +8230,7 @@ 42994 41397 int local; 42995 41398 { … … 42999 41402 { 43000 41403 /* If still in global directory, need to remember current 43001 @@ -8223,7 +824 6,6 @@41404 @@ -8223,7 +8247,6 @@ 43002 41405 * name. */ 43003 41406 vim_free(globaldir); … … 43007 41410 43008 41411 shorten_fnames(TRUE); 43009 @@ -8350,7 +837 2,7 @@41412 @@ -8350,7 +8373,7 @@ 43010 41413 { 43011 41414 n = W_WINROW(curwin) + curwin->w_wrow - msg_scrolled; … … 43016 41419 43017 41420 len = eap->line2; 43018 @@ -8556,6 +857 8,9 @@41421 @@ -8556,6 +8579,9 @@ 43019 41422 beginline(BL_SOL | BL_FIX); 43020 41423 } … … 43026 41429 { 43027 41430 case CMD_delete: 43028 @@ -8647,7 +867 2,7 @@41431 @@ -8647,7 +8673,7 @@ 43029 41432 /* 43030 41433 * Print the current line if flags were given to the Ex command. … … 43035 41438 exarg_T *eap; 43036 41439 { 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 @@ 43038 41450 RedrawingDisabled = 0; 43039 41451 p_lz = FALSE; … … 43048 41460 if (need_maketitle) 43049 41461 maketitle(); 43050 @@ -9004,11 +902 5,7 @@41462 @@ -9004,11 +9026,7 @@ 43051 41463 status_redraw_all(); 43052 41464 else … … 43061 41473 p_lz = p; 43062 41474 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 @@ 43064 41484 } 43065 41485 … … 43070 41490 return FAIL; 43071 41491 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 @@ 43073 41522 char_u *buf = NULL; 43074 41523 char_u *s; … … 43083 41532 for (i = 0; i < gap->ga_len; ++i) 43084 41533 { 43085 @@ -10948,7 +109 65,9 @@41534 @@ -10948,7 +10982,9 @@ 43086 41535 s = buf; 43087 41536 } … … 43094 41543 vim_free(buf); 43095 41544 return FAIL; 43096 @@ -10956,7 +109 75,7 @@41545 @@ -10956,7 +10992,7 @@ 43097 41546 vim_free(buf); 43098 41547 } … … 43103 41552 43104 41553 /* 43105 @@ -11389,7 +114 08,7 @@41554 @@ -11389,7 +11425,7 @@ 43106 41555 ex_nohlsearch(eap) 43107 41556 exarg_T *eap UNUSED; … … 43114 41563 diff -Naur vim74.orig/src/ex_eval.c vim74/src/ex_eval.c 43115 41564 --- vim74.orig/src/ex_eval.c 2013-06-08 13:50:28.000000000 +0000 43116 +++ vim74/src/ex_eval.c 2014-0 4-27 05:20:58.148436078+000041565 +++ vim74/src/ex_eval.c 2014-06-01 00:43:14.320813177 +0000 43117 41566 @@ -321,6 +321,17 @@ 43118 41567 } … … 43300 41749 diff -Naur vim74.orig/src/ex_getln.c vim74/src/ex_getln.c 43301 41750 --- vim74.orig/src/ex_getln.c 2013-07-05 17:44:21.000000000 +0000 43302 +++ vim74/src/ex_getln.c 2014-0 4-27 05:20:58.151769494+000041751 +++ vim74/src/ex_getln.c 2014-06-01 00:43:14.327479827 +0000 43303 41752 @@ -2280,7 +2280,7 @@ 43304 41753 … … 43340 41789 * the name into allocated memory and prepend "^". 43341 41790 */ 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 @@ 43343 41929 if (hislen == 0) /* no history */ 43344 41930 return; … … 43352 41938 diff -Naur vim74.orig/src/feature.h vim74/src/feature.h 43353 41939 --- vim74.orig/src/feature.h 2013-05-18 18:18:20.000000000 +0000 43354 +++ vim74/src/feature.h 2014-0 4-27 05:20:58.151769494+000041940 +++ vim74/src/feature.h 2014-06-01 00:43:14.384146349 +0000 43355 41941 @@ -211,18 +211,11 @@ 43356 41942 #endif … … 43419 42005 diff -Naur vim74.orig/src/fileio.c vim74/src/fileio.c 43420 42006 --- vim74.orig/src/fileio.c 2013-08-05 19:58:03.000000000 +0000 43421 +++ vim74/src/fileio.c 2014-0 4-27 05:20:58.155102910+000042007 +++ vim74/src/fileio.c 2014-06-01 00:43:14.407479623 +0000 43422 42008 @@ -428,13 +428,13 @@ 43423 42009 } … … 43585 42171 { 43586 42172 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 @@ 43588 42182 p = (char_u *)tempnam("tmp:", (char *)itmp); 43589 42183 if (p != NULL) … … 43594 42188 STRCPY(itmp, p); 43595 42189 STRCAT(itmp, ".txt"); 43596 @@ -9321,7 +933 0,9 @@42190 @@ -9321,7 +9331,9 @@ 43597 42191 */ 43598 42192 if (fname_io == NULL) … … 43605 42199 else if (buf != NULL) 43606 42200 autocmd_fname = buf->b_ffname; 43607 @@ -9374,14 +938 5,15 @@42201 @@ -9374,14 +9386,15 @@ 43608 42202 else 43609 42203 { … … 43623 42217 fname = vim_strsave(fname); 43624 42218 else 43625 @@ -9536,13 +954 8,19 @@42219 @@ -9536,13 +9549,19 @@ 43626 42220 43627 42221 /* … … 43646 42240 diff -Naur vim74.orig/src/fold.c vim74/src/fold.c 43647 42241 --- vim74.orig/src/fold.c 2013-06-15 14:57:24.000000000 +0000 43648 +++ vim74/src/fold.c 2014-0 4-27 05:20:58.158436326+000042242 +++ vim74/src/fold.c 2014-06-01 00:43:14.437479547 +0000 43649 42243 @@ -430,11 +430,9 @@ 43650 42244 } … … 43698 42292 diff -Naur vim74.orig/src/getchar.c vim74/src/getchar.c 43699 42293 --- vim74.orig/src/getchar.c 2013-06-29 11:43:27.000000000 +0000 43700 +++ vim74/src/getchar.c 2014-0 4-27 05:20:58.158436326+000042294 +++ vim74/src/getchar.c 2014-06-01 00:43:14.447479521 +0000 43701 42295 @@ -40,13 +40,13 @@ 43702 42296 … … 44100 42694 set_input_buf(tp->save_inputbuf); 44101 42695 # 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 44102 42705 @@ -1992,7 +2029,7 @@ 44103 42706 typeahead_char = 0; … … 44175 42778 diff -Naur vim74.orig/src/globals.h vim74/src/globals.h 44176 42779 --- vim74.orig/src/globals.h 2013-07-04 17:53:44.000000000 +0000 44177 +++ vim74/src/globals.h 2014-0 4-27 05:20:58.161769742+000042780 +++ vim74/src/globals.h 2014-06-01 00:43:14.474146120 +0000 44178 42781 @@ -386,6 +386,11 @@ 44179 42782 /* When deleting the current buffer, another one must be loaded. If we know … … 44188 42791 44189 42792 #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 @@ 44191 42802 /* set to TRUE when "-s" commandline argument 44192 42803 * used for ex */ … … 44196 42807 EXTERN int VIsual_active INIT(= FALSE); 44197 42808 /* whether Visual mode is active */ 44198 @@ -677,7 +68 1,6 @@42809 @@ -677,7 +682,6 @@ 44199 42810 44200 42811 EXTERN int redo_VIsual_busy INIT(= FALSE); … … 44204 42815 #ifdef FEAT_MOUSE 44205 42816 /* 44206 @@ -752,6 +75 5,12 @@42817 @@ -752,6 +756,12 @@ 44207 42818 */ 44208 42819 EXTERN pos_T Insstart; /* This is where the latest … … 44217 42828 /* 44218 42829 * Stuff for VREPLACE mode. 44219 @@ -979,11 +98 8,6 @@42830 @@ -979,11 +989,6 @@ 44220 42831 EXTERN int readonlymode INIT(= FALSE); /* Set to TRUE for "view" */ 44221 42832 EXTERN int recoverymode INIT(= FALSE); /* Set to TRUE for "-r" option */ … … 44229 42840 #ifdef DO_INIT 44230 42841 = {NULL, NULL, 0, 0, 0, 0, 0, 0, 0} 44231 @@ -1177,11 +118 1,9 @@42842 @@ -1177,11 +1182,9 @@ 44232 42843 EXTERN int fill_diff INIT(= '-'); 44233 42844 #endif … … 44241 42852 #ifdef FEAT_CMDWIN 44242 42853 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 @@ 44244 42865 EXTERN char_u e_notopen[] INIT(= N_("E484: Can't open file %s")); 44245 42866 EXTERN char_u e_notread[] INIT(= N_("E485: Can't read file %s")); … … 44251 42872 diff -Naur vim74.orig/src/gui.c vim74/src/gui.c 44252 42873 --- vim74.orig/src/gui.c 2013-06-30 15:41:48.000000000 +0000 44253 +++ vim74/src/gui.c 2014-0 4-27 05:20:58.161769742+000042874 +++ vim74/src/gui.c 2014-06-01 00:43:14.494146069 +0000 44254 42875 @@ -3132,11 +3132,9 @@ 44255 42876 */ … … 44266 42887 diff -Naur vim74.orig/src/gui_gtk_x11.c vim74/src/gui_gtk_x11.c 44267 42888 --- vim74.orig/src/gui_gtk_x11.c 2013-06-30 15:42:13.000000000 +0000 44268 +++ vim74/src/gui_gtk_x11.c 2014-0 4-27 05:20:58.171769991+000042889 +++ vim74/src/gui_gtk_x11.c 2014-06-01 00:43:14.634145713 +0000 44269 42890 @@ -732,7 +732,10 @@ 44270 42891 gui_mch_start_blink(void) … … 44278 42899 if (blink_waittime && blink_ontime && blink_offtime && gui.in_focus) 44279 42900 { 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 44280 42928 diff -Naur vim74.orig/src/gui_mac.c vim74/src/gui_mac.c 44281 42929 --- vim74.orig/src/gui_mac.c 2013-05-06 02:06:04.000000000 +0000 44282 +++ vim74/src/gui_mac.c 2014-0 4-27 05:20:58.175103406+000042930 +++ vim74/src/gui_mac.c 2014-06-01 00:43:14.654145662 +0000 44283 42931 @@ -1068,11 +1068,7 @@ 44284 42932 } … … 44313 42961 diff -Naur vim74.orig/src/gui_w48.c vim74/src/gui_w48.c 44314 42962 --- vim74.orig/src/gui_w48.c 2013-08-10 11:36:45.000000000 +0000 44315 +++ vim74/src/gui_w48.c 2014-0 4-27 05:20:58.181770239+000042963 +++ vim74/src/gui_w48.c 2014-06-01 00:43:14.767478706 +0000 44316 42964 @@ -1008,7 +1008,7 @@ 44317 42965 static LPARAM last_lParam = 0L; … … 44373 43021 fnames = (char_u **)alloc(cFiles * sizeof(char_u *)); 44374 43022 43023 diff -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 } 44375 43035 diff -Naur vim74.orig/src/if_perl.xs vim74/src/if_perl.xs 44376 43036 --- vim74.orig/src/if_perl.xs 2013-08-02 17:28:50.000000000 +0000 44377 +++ vim74/src/if_perl.xs 2014-0 4-27 05:20:58.191770487 +000043037 +++ vim74/src/if_perl.xs 2014-06-01 00:43:15.084144567 +0000 44378 43038 @@ -14,7 +14,8 @@ 44379 43039 #define IN_PERL_FILE /* don't include if_perl.pro from proto.h */ … … 44542 43202 diff -Naur vim74.orig/src/if_py_both.h vim74/src/if_py_both.h 44543 43203 --- vim74.orig/src/if_py_both.h 2013-07-24 15:09:19.000000000 +0000 44544 +++ vim74/src/if_py_both.h 2014-0 4-27 05:20:58.195103903+000043204 +++ vim74/src/if_py_both.h 2014-06-01 00:43:15.114144490 +0000 44545 43205 @@ -13,6 +13,11 @@ 44546 43206 * Common code for if_python.c and if_python3.c. … … 45020 43680 + { 45021 43681 + lis[slicelen + numreplaced] = lis[numreplaced]->li_prev; 45022 + list_remove(l, lis[numreplaced], lis[numreplaced]);43682 + vimlist_remove(l, lis[numreplaced], lis[numreplaced]); 45023 43683 + numreplaced++; 45024 43684 + } … … 45096 43756 + { 45097 43757 + li = list_find(l, (long) index); 45098 + list_remove(l, li, li);43758 + vimlist_remove(l, li, li); 45099 43759 + clear_tv(&li->li_tv); 45100 43760 + vim_free(li); … … 45378 44038 diff -Naur vim74.orig/src/if_python.c vim74/src/if_python.c 45379 44039 --- vim74.orig/src/if_python.c 2013-07-09 19:40:11.000000000 +0000 45380 +++ vim74/src/if_python.c 2014-0 4-27 05:20:58.198437320+000044040 +++ vim74/src/if_python.c 2014-06-01 00:43:15.180810987 +0000 45381 44041 @@ -196,6 +196,7 @@ 45382 44042 # define PyTuple_Size dll_PyTuple_Size … … 45480 44140 diff -Naur vim74.orig/src/if_python3.c vim74/src/if_python3.c 45481 44141 --- vim74.orig/src/if_python3.c 2013-07-09 19:53:21.000000000 +0000 45482 +++ vim74/src/if_python3.c 2014-0 4-27 05:20:58.198437320+000044142 +++ vim74/src/if_python3.c 2014-06-01 00:43:15.214144236 +0000 45483 44143 @@ -97,6 +97,19 @@ 45484 44144 #define Py_ssize_t_fmt "n" … … 45637 44297 diff -Naur vim74.orig/src/if_ruby.c vim74/src/if_ruby.c 45638 44298 --- vim74.orig/src/if_ruby.c 2013-05-20 10:47:48.000000000 +0000 45639 +++ vim74/src/if_ruby.c 2014-0 4-27 05:20:58.198437320 +000044299 +++ vim74/src/if_ruby.c 2014-06-01 00:43:15.230810860 +0000 45640 44300 @@ -88,14 +88,20 @@ 45641 44301 # define rb_int2big rb_int2big_stub … … 45744 44404 diff -Naur vim74.orig/src/if_tcl.c vim74/src/if_tcl.c 45745 44405 --- vim74.orig/src/if_tcl.c 2013-08-02 17:31:15.000000000 +0000 45746 +++ vim74/src/if_tcl.c 2014-0 4-27 05:20:58.201770736+000044406 +++ vim74/src/if_tcl.c 2014-06-01 00:43:15.274144083 +0000 45747 44407 @@ -165,6 +165,7 @@ 45748 44408 */ … … 45775 44435 stubs_initialized = TRUE; 45776 44436 } 44437 diff -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)) 45777 44449 diff -Naur vim74.orig/src/main.c vim74/src/main.c 45778 44450 --- 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 @@ 45781 44461 TIME_MSG("reading viminfo"); 45782 44462 } … … 45790 44470 #ifdef FEAT_QUICKFIX 45791 44471 /* 45792 @@ -812,7 +81 7,7 @@44472 @@ -812,7 +818,7 @@ 45793 44473 starttermcap(); /* start termcap if not done by wait_return() */ 45794 44474 TIME_MSG("start termcap"); … … 45799 44479 45800 44480 #ifdef FEAT_MOUSE 45801 @@ -1048,13 +105 3,11 @@44481 @@ -1048,13 +1054,11 @@ 45802 44482 /* Setup to catch a terminating error from the X server. Just ignore 45803 44483 * it, restore the state and continue. This might not always work … … 45814 44494 need_wait_return = FALSE; 45815 44495 global_busy = FALSE; 45816 @@ -1091,11 +109 4,7 @@44496 @@ -1091,11 +1095,7 @@ 45817 44497 check_timestamps(FALSE); 45818 44498 if (need_wait_return) /* if wait_return still needed ... */ … … 45827 44507 need_start_insertmode = FALSE; 45828 44508 stuffReadbuff((char_u *)"i"); /* start insert mode next */ 45829 @@ -1197,7 +119 6,7 @@44509 @@ -1197,7 +1197,7 @@ 45830 44510 diff_need_scrollbind = FALSE; 45831 44511 } … … 45836 44516 foldAdjustVisual(); 45837 44517 #endif 45838 @@ -1223,12 +122 2,9 @@44518 @@ -1223,12 +1223,9 @@ 45839 44519 update_topline(); 45840 44520 validate_cursor(); … … 45850 44530 else if (redraw_cmdline || clear_cmdline) 45851 44531 showmode(); 45852 @@ -1606,6 +160 2,7 @@44532 @@ -1606,6 +1603,7 @@ 45853 44533 45854 44534 #ifdef FEAT_EVAL … … 45858 44538 45859 44539 if (TOLOWER_ASC(initstr[0]) == 'r') 45860 @@ -2727,6 +272 4,7 @@44540 @@ -2727,6 +2725,7 @@ 45861 44541 int arg_idx; /* index in argument list */ 45862 44542 int i; … … 45866 44546 # ifdef FEAT_AUTOCMD 45867 44547 /* 45868 @@ -2816,24 +281 4,22 @@44548 @@ -2816,24 +2815,22 @@ 45869 44549 # ifdef FEAT_AUTOCMD 45870 44550 --autocmd_no_enter; … … 45905 44585 diff -Naur vim74.orig/src/mark.c vim74/src/mark.c 45906 44586 --- vim74.orig/src/mark.c 2013-08-02 15:22:10.000000000 +0000 45907 +++ vim74/src/mark.c 2014-0 4-27 05:20:58.208437568+000044587 +++ vim74/src/mark.c 2014-06-01 00:43:15.447476975 +0000 45908 44588 @@ -98,7 +98,6 @@ 45909 44589 return OK; … … 46021 44701 diff -Naur vim74.orig/src/mbyte.c vim74/src/mbyte.c 46022 44702 --- vim74.orig/src/mbyte.c 2013-07-05 18:07:21.000000000 +0000 46023 +++ vim74/src/mbyte.c 2014-0 4-27 05:20:58.211770985+000044703 +++ vim74/src/mbyte.c 2014-06-01 00:43:15.490810198 +0000 46024 44704 @@ -83,10 +83,18 @@ 46025 44705 # ifndef WIN32_LEAN_AND_MEAN … … 46103 44783 diff -Naur vim74.orig/src/memfile.c vim74/src/memfile.c 46104 44784 --- vim74.orig/src/memfile.c 2013-05-23 20:22:22.000000000 +0000 46105 +++ vim74/src/memfile.c 2014-0 4-27 05:20:58.211770985+000044785 +++ vim74/src/memfile.c 2014-06-01 00:43:15.514143472 +0000 46106 44786 @@ -1358,7 +1358,7 @@ 46107 44787 if (fdflags >= 0 && (fdflags & FD_CLOEXEC) == 0) … … 46115 44795 diff -Naur vim74.orig/src/memline.c vim74/src/memline.c 46116 44796 --- vim74.orig/src/memline.c 2013-05-06 02:01:02.000000000 +0000 46117 +++ vim74/src/memline.c 2014-0 4-27 05:20:58.215104401+000044797 +++ vim74/src/memline.c 2014-06-01 00:43:15.537476746 +0000 46118 44798 @@ -289,6 +289,9 @@ 46119 44799 buf->b_ml.ml_chunksize = NULL; … … 46313 44993 diff -Naur vim74.orig/src/menu.c vim74/src/menu.c 46314 44994 --- vim74.orig/src/menu.c 2011-04-11 13:17:21.000000000 +0000 46315 +++ vim74/src/menu.c 2014-0 4-27 05:20:58.215104401+000044995 +++ vim74/src/menu.c 2014-06-01 00:43:15.557476695 +0000 46316 44996 @@ -1640,7 +1640,6 @@ 46317 44997 idx = MENU_INDEX_INSERT; … … 46347 45027 diff -Naur vim74.orig/src/message.c vim74/src/message.c 46348 45028 --- vim74.orig/src/message.c 2013-08-09 18:30:45.000000000 +0000 46349 +++ vim74/src/message.c 2014-0 4-27 05:20:58.218437816+000045029 +++ vim74/src/message.c 2014-06-01 00:43:15.597476593 +0000 46350 45030 @@ -887,6 +887,8 @@ 46351 45031 int oldState; … … 46390 45070 diff -Naur vim74.orig/src/misc1.c vim74/src/misc1.c 46391 45071 --- vim74.orig/src/misc1.c 2013-08-03 15:29:33.000000000 +0000 46392 +++ vim74/src/misc1.c 2014-0 4-27 05:20:58.218437816+000045072 +++ vim74/src/misc1.c 2014-06-01 00:43:15.620809867 +0000 46393 45073 @@ -303,10 +303,18 @@ 46394 45074 ml_replace(curwin->w_cursor.lnum, newline, FALSE); … … 46419 45099 { 46420 45100 - int sw = (int)get_sw_value(); 46421 + int 45101 + int sw = (int)get_sw_value(curbuf); 46422 45102 46423 45103 if (p_sr) … … 46436 45116 * comment leader. 46437 45117 * "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 @@ 46439 45129 46440 45130 if (fname == NULL) … … 46448 45138 mb_ptr_adv(p2); 46449 45139 } 46450 @@ -4921,7 +49 29,8 @@45140 @@ -4921,7 +4932,8 @@ 46451 45141 } 46452 45142 … … 46458 45148 int 46459 45149 vim_ispathsep(c) 46460 @@ -4944,6 +495 3,20 @@45150 @@ -4944,6 +4956,20 @@ 46461 45151 #endif 46462 45152 } … … 46479 45169 /* 46480 45170 * return TRUE if 'c' is a path list separator. 46481 @@ -5168,11 +519 1,18 @@45171 @@ -5168,11 +5194,18 @@ 46482 45172 #if defined(FEAT_CINDENT) || defined(FEAT_SYN_HL) 46483 45173 … … 46498 45188 find_start_comment(ind_maxcomment) /* XXX */ 46499 45189 int ind_maxcomment; 46500 @@ -5290,7 +532 0,7 @@45190 @@ -5290,7 +5323,7 @@ 46501 45191 static int cin_isdefault __ARGS((char_u *)); 46502 45192 static char_u *after_label __ARGS((char_u *l)); … … 46507 45197 static int cin_get_equal_amount __ARGS((linenr_T lnum)); 46508 45198 static int cin_ispreproc __ARGS((char_u *)); 46509 @@ -5299,28 +53 29,26 @@45199 @@ -5299,28 +5332,26 @@ 46510 45200 static int cin_islinecomment __ARGS((char_u *)); 46511 45201 static int cin_isterminated __ARGS((char_u *, int, int)); … … 46544 45234 * Skip over white space and C comments within the line. 46545 45235 * Also skip over Perl/shell comments if desired. 46546 @@ -5337,7 +536 5,7 @@45236 @@ -5337,7 +5368,7 @@ 46547 45237 46548 45238 /* Perl/shell # comment comment continues until eol. Require a space … … 46553 45243 s += STRLEN(s); 46554 45244 break; 46555 @@ -5423,8 +545 1,7 @@45245 @@ -5423,8 +5454,7 @@ 46556 45246 * Note: curwin->w_cursor must be where we are looking for the label. 46557 45247 */ … … 46563 45253 char_u *s; 46564 45254 46565 @@ -5458,7 +548 5,7 @@45255 @@ -5458,7 +5488,7 @@ 46566 45256 * If we're in a comment now, skip to the start of the comment. 46567 45257 */ … … 46572 45262 46573 45263 line = ml_get_curline(); 46574 @@ -5704,10 +573 1,9 @@45264 @@ -5704,10 +5734,9 @@ 46575 45265 * ^ 46576 45266 */ … … 46584 45274 char_u *l; 46585 45275 int amount; 46586 @@ -5717,8 +574 3,7 @@45276 @@ -5717,8 +5746,7 @@ 46587 45277 curwin->w_cursor.lnum = lnum; 46588 45278 l = ml_get_curline(); … … 46594 45284 amount = get_indent_nolabel(lnum); 46595 45285 l = after_label(ml_get_curline()); 46596 @@ -5962,12 +59 87,10 @@45286 @@ -5962,12 +5990,10 @@ 46597 45287 * "min_lnum" is the line before which we will not be looking. 46598 45288 */ … … 46608 45298 char_u *s; 46609 45299 linenr_T lnum = first_lnum; 46610 @@ -5981,7 +600 4,7 @@45300 @@ -5981,7 +6007,7 @@ 46611 45301 s = *sp; 46612 45302 … … 46617 45307 lnum = trypos->lnum; 46618 45308 if (lnum < min_lnum) 46619 @@ -6089,10 +611 2,9 @@45309 @@ -6089,10 +6115,9 @@ 46620 45310 * ')' and ';'. The condition may be spread over several lines. 46621 45311 */ … … 46629 45319 pos_T cursor_save; 46630 45320 pos_T *trypos; 46631 @@ -6112,7 +613 4,8 @@45321 @@ -6112,7 +6137,8 @@ 46632 45322 ++p; 46633 45323 ++curwin->w_cursor.col; … … 46639 45329 retval = TRUE; 46640 45330 curwin->w_cursor = cursor_save; 46641 @@ -6175,10 +6 198,8 @@45331 @@ -6175,10 +6201,8 @@ 46642 45332 * Adjust the cursor to the line with "while". 46643 45333 */ … … 46651 45341 char_u *line; 46652 45342 char_u *p; 46653 @@ -6202,7 +622 3,7 @@45343 @@ -6202,7 +6226,7 @@ 46654 45344 * before the matching '('. XXX */ 46655 45345 i = (int)(p - line); … … 46660 45350 { 46661 45351 s = cin_skipcomment(ml_get(trypos->lnum)); 46662 @@ -6394,11 +641 5,8 @@45352 @@ -6394,11 +6418,8 @@ 46663 45353 } 46664 45354 … … 46673 45363 int amount; 46674 45364 colnr_T vcol; 46675 @@ -6408,11 +642 6,10 @@45365 @@ -6408,11 +6429,10 @@ 46676 45366 { 46677 45367 amount = get_indent(); … … 46687 45377 else 46688 45378 { 46689 @@ -6420,8 +64 37,8 @@45379 @@ -6420,8 +6440,8 @@ 46690 45380 getvcol(curwin, &curwin->w_cursor, &vcol, NULL, NULL); 46691 45381 amount = (int)vcol; … … 46698 45388 } 46699 45389 46700 @@ -6505,8 +652 2,7 @@45390 @@ -6505,8 +6525,7 @@ 46701 45391 /* } */ 46702 45392 … … 46708 45398 pos_T cursor_save; 46709 45399 pos_T *trypos; 46710 @@ -6522,7 +65 38,7 @@45400 @@ -6522,7 +6541,7 @@ 46711 45401 pos = NULL; 46712 45402 /* ignore the { if it's in a // or / * * / comment */ … … 46717 45407 if (pos != NULL) 46718 45408 curwin->w_cursor.lnum = pos->lnum; 46719 @@ -6536,9 +655 2,8 @@45409 @@ -6536,9 +6555,8 @@ 46720 45410 * Return NULL if no match found. 46721 45411 */ … … 46728 45418 pos_T cursor_save; 46729 45419 pos_T *trypos; 46730 @@ -6555,7 +657 0,7 @@45420 @@ -6555,7 +6573,7 @@ 46731 45421 pos_copy = *trypos; /* copy trypos, findmatch will change it */ 46732 45422 trypos = &pos_copy; … … 46737 45427 } 46738 45428 } 46739 @@ -6570,15 +658 5,14 @@45429 @@ -6570,15 +6588,14 @@ 46740 45430 * looking a few lines further. 46741 45431 */ … … 46757 45447 46758 45448 /* 46759 @@ -6616,201 +663 0,229 @@45449 @@ -6616,201 +6633,229 @@ 46760 45450 return retval; 46761 45451 } … … 46790 45480 46791 45481 - 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 - 46796 45483 - /* 46797 45484 - * spaces from the edge of the line an open brace that's at the end of a … … 46799 45486 - */ 46800 45487 - int ind_open_imag = 0; 46801 + /* Spaces from the prevailing indent for a line that is not preceded by46802 + * 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; 46804 45491 46805 45492 - /* … … 46808 45495 - */ 46809 45496 - 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 46811 45501 - /* 46812 45502 - * column where the first { of a function should be located } … … 47091 45781 + if (l[1] == '-') 47092 45782 + n = -n; 47093 + 45783 47094 45784 + /* When adding an entry here, also update the default 'cinoptions' in 47095 45785 + * doc/indent.txt, and add explanation for it! */ … … 47136 45826 + } 47137 45827 +} 47138 45828 + 47139 45829 + int 47140 45830 +get_c_indent() … … 47143 45833 int amount; 47144 45834 int scope_amount; 47145 @@ -6845,10 +68 87,6 @@45835 @@ -6845,10 +6890,6 @@ 47146 45836 47147 45837 int whilelevel; … … 47154 45844 int iscase; 47155 45845 int lookfor_break; 47156 @@ -6857,83 +689 5,8 @@45846 @@ -6857,83 +6898,8 @@ 47157 45847 int original_line_islabel; 47158 45848 int added_to_amount = 0; … … 47240 45930 /* remember where the cursor was when we started */ 47241 45931 cur_curpos = curwin->w_cursor; 47242 @@ -6967,22 +693 0,21 @@45932 @@ -6967,22 +6933,21 @@ 47243 45933 47244 45934 curwin->w_cursor.col = 0; … … 47267 45957 amount = 0; 47268 45958 } 47269 @@ -7004,7 +696 6,8 @@45959 @@ -7004,7 +6969,8 @@ 47270 45960 * comment, try using the 'comments' option. 47271 45961 */ … … 47277 45967 int lead_start_len = 2; 47278 45968 int lead_middle_len = 1; 47279 @@ -7138,7 +710 1,7 @@45969 @@ -7138,7 +7104,7 @@ 47280 45970 } 47281 45971 if (amount == -1) /* use the comment opener */ … … 47286 45976 start = ml_get(trypos->lnum); 47287 45977 look = start + trypos->col + 2; /* skip / and * */ 47288 @@ -7147,8 +711 0,8 @@45978 @@ -7147,8 +7113,8 @@ 47289 45979 } 47290 45980 getvcol(curwin, trypos, &col, NULL, NULL); … … 47297 45987 } 47298 45988 } 47299 @@ -7156,9 +71 19,9 @@45989 @@ -7156,9 +7122,9 @@ 47300 45990 /* 47301 45991 * Are we inside parentheses or braces? … … 47310 46000 { 47311 46001 if (trypos != NULL && tryposBrace != NULL) 47312 @@ -7179,7 +714 2,7 @@46002 @@ -7179,7 +7145,7 @@ 47313 46003 * If the matching paren is more than one line away, use the indent of 47314 46004 * a previous non-empty line that matches the same paren. … … 47319 46009 /* Line up with the start of the matching paren line. */ 47320 46010 amount = get_indent_lnum(curwin->w_cursor.lnum - 1); /* XXX */ 47321 @@ -7198,7 +716 1,7 @@46011 @@ -7198,7 +7164,7 @@ 47322 46012 curwin->w_cursor.lnum = lnum; 47323 46013 … … 47328 46018 lnum = trypos->lnum + 1; 47329 46019 continue; 47330 @@ -7206,8 +71 69,7 @@46020 @@ -7206,8 +7172,7 @@ 47331 46021 47332 46022 /* XXX */ … … 47338 46028 && trypos->col == our_paren_pos.col) 47339 46029 { 47340 @@ -7235,7 +7 197,7 @@46030 @@ -7235,7 +7200,7 @@ 47341 46031 int ignore_paren_col = 0; 47342 46032 int is_if_for_while = 0; … … 47347 46037 /* Look for the outermost opening parenthesis on this line 47348 46038 * and check whether it belongs to an "if", "for" or "while". */ 47349 @@ -7250,7 +721 2,7 @@46039 @@ -7250,7 +7215,7 @@ 47350 46040 curwin->w_cursor.lnum = outermost.lnum; 47351 46041 curwin->w_cursor.col = outermost.col; … … 47356 46046 47357 46047 curwin->w_cursor = cursor_save; 47358 @@ -7261,7 +722 3,7 @@46048 @@ -7261,7 +7226,7 @@ 47359 46049 cin_is_if_for_while_before_offset(line, &outermost.col); 47360 46050 } … … 47365 46055 if (*look == '(') 47366 46056 { 47367 @@ -7275,7 +72 37,8 @@46057 @@ -7275,7 +7240,8 @@ 47368 46058 line = ml_get_curline(); 47369 46059 look_col = (int)(look - line); … … 47375 46065 && trypos->lnum == our_paren_pos.lnum 47376 46066 && trypos->col < our_paren_pos.col) 47377 @@ -7284,24 +72 47,25 @@46067 @@ -7284,24 +7250,25 @@ 47378 46068 curwin->w_cursor.lnum = save_lnum; 47379 46069 look = ml_get(our_paren_pos.lnum) + look_col; … … 47406 46096 { 47407 46097 /* look for opening unmatched paren, indent one level 47408 @@ -7323,9 +72 87,9 @@46098 @@ -7323,9 +7290,9 @@ 47409 46099 } 47410 46100 … … 47418 46108 else 47419 46109 { 47420 @@ -7351,12 +731 5,12 @@46110 @@ -7351,12 +7318,12 @@ 47421 46111 } 47422 46112 } … … 47434 46124 { 47435 46125 if (cur_amount != MAXCOL) 47436 @@ -7364,39 +73 28,39 @@46126 @@ -7364,39 +7331,39 @@ 47437 46127 } 47438 46128 else … … 47484 46174 } 47485 46175 /* 47486 @@ -7414,7 +73 78,7 @@46176 @@ -7414,7 +7381,7 @@ 47487 46177 47488 46178 /* add extra indent for a comment */ … … 47493 46183 47494 46184 /* 47495 @@ -7457,8 +742 1,8 @@46185 @@ -7457,8 +7424,8 @@ 47496 46186 */ 47497 46187 lnum = ourscope; … … 47504 46194 47505 46195 /* 47506 @@ -7467,11 +743 1,11 @@46196 @@ -7467,11 +7434,11 @@ 47507 46197 * ldfd) { 47508 46198 * } … … 47518 46208 start_brace = BRACE_AT_END; 47519 46209 } 47520 @@ -7487,7 +745 1,7 @@46210 @@ -7487,7 +7454,7 @@ 47521 46211 * they may want closing braces to line up with something 47522 46212 * other than the open brace. indulge them, if so. … … 47527 46217 else 47528 46218 { 47529 @@ -7500,14 +746 4,12 @@46219 @@ -7500,14 +7467,12 @@ 47530 46220 lookfor = LOOKFOR_INITIAL; 47531 46221 if (cin_iselse(theline)) … … 47544 46234 amount = get_indent(); /* XXX */ 47545 46235 goto theend; 47546 @@ -7524,12 +748 6,12 @@46236 @@ -7524,12 +7489,12 @@ 47547 46237 /* 47548 46238 * if the '{' is _really_ at the left margin, use the imaginary … … 47559 46249 } 47560 46250 else if (start_brace == BRACE_AT_START && 47561 @@ -7542,16 +750 4,16 @@46251 @@ -7542,16 +7507,16 @@ 47562 46252 { 47563 46253 if (start_brace == BRACE_AT_END) /* '{' is at end of line */ … … 47580 46270 amount = 0; 47581 46271 } 47582 @@ -7562,20 +752 4,22 @@46272 @@ -7562,20 +7527,22 @@ 47583 46273 if (cin_iscase(theline, FALSE)) /* it's a switch() label */ 47584 46274 { … … 47607 46297 scope_amount = amount; 47608 46298 whilelevel = 0; 47609 @@ -7613,14 +75 77,14 @@46299 @@ -7613,14 +7580,14 @@ 47610 46300 { 47611 46301 if (curwin->w_cursor.lnum == 0 … … 47626 46316 break; 47627 46317 } 47628 @@ -7631,7 +759 5,7 @@46318 @@ -7631,7 +7598,7 @@ 47629 46319 * If we're in a comment now, skip to the start of the 47630 46320 * comment. … … 47635 46325 { 47636 46326 curwin->w_cursor.lnum = trypos->lnum + 1; 47637 @@ -7656,8 +762 0,7 @@46327 @@ -7656,8 +7623,7 @@ 47638 46328 * (it's a variable declaration). 47639 46329 */ … … 47645 46335 /* if the line is terminated with another ',' 47646 46336 * it is a continued variable initialization. 47647 @@ -7688,11 +765 1,11 @@46337 @@ -7688,11 +7654,11 @@ 47648 46338 */ /* XXX */ 47649 46339 trypos = NULL; … … 47660 46350 if (trypos != NULL) 47661 46351 { 47662 @@ -7727,8 +769 0,8 @@46352 @@ -7727,8 +7693,8 @@ 47663 46353 amount = scope_amount; 47664 46354 if (theline[0] == '{') … … 47671 46361 } 47672 46362 47673 @@ -7750,7 +771 3,7 @@46363 @@ -7750,7 +7716,7 @@ 47674 46364 47675 46365 /* If we're in a comment now, skip to the start of … … 47680 46370 { 47681 46371 curwin->w_cursor.lnum = trypos->lnum + 1; 47682 @@ -7765,7 +77 28,8 @@46372 @@ -7765,7 +7731,8 @@ 47683 46373 /* Finally the actual check for "namespace". */ 47684 46374 if (cin_is_cpp_namespace(l)) … … 47690 46380 } 47691 46381 47692 @@ -7779,7 +774 3,7 @@46382 @@ -7779,7 +7746,7 @@ 47693 46383 /* 47694 46384 * If we're in a comment now, skip to the start of the comment. … … 47699 46389 curwin->w_cursor.lnum = trypos->lnum + 1; 47700 46390 curwin->w_cursor.col = 0; 47701 @@ -7833,8 +7 797,8 @@46391 @@ -7833,8 +7800,8 @@ 47702 46392 * Check that this case label is not for another 47703 46393 * switch() … … 47710 46400 amount = get_indent(); /* XXX */ 47711 46401 break; 47712 @@ -7877,9 +784 1,10 @@46402 @@ -7877,9 +7844,10 @@ 47713 46403 if (l != NULL && cin_is_cinword(l)) 47714 46404 { … … 47723 46413 break; 47724 46414 } 47725 @@ -7893,8 +78 58,10 @@46415 @@ -7893,8 +7861,10 @@ 47726 46416 * -> y = 1; 47727 46417 */ … … 47736 46426 } 47737 46427 47738 @@ -7904,8 +787 1,8 @@46428 @@ -7904,8 +7874,8 @@ 47739 46429 */ 47740 46430 if (lookfor == LOOKFOR_CASE || lookfor == LOOKFOR_SCOPEDECL) … … 47747 46437 curwin->w_cursor.lnum = trypos->lnum + 1; 47748 46438 curwin->w_cursor.col = 0; 47749 @@ -7916,7 +788 3,7 @@46439 @@ -7916,7 +7886,7 @@ 47750 46440 /* 47751 46441 * Ignore jump labels with nothing after them. … … 47756 46446 l = after_label(ml_get_curline()); 47757 46447 if (l == NULL || cin_nocode(l)) 47758 @@ -7939,7 +790 6,7 @@46448 @@ -7939,7 +7909,7 @@ 47759 46449 * constructor initialization? 47760 46450 */ /* XXX */ … … 47765 46455 n = cin_is_cpp_baseclass(&col); 47766 46456 l = ml_get_curline(); 47767 @@ -7962,8 +79 29,7 @@46457 @@ -7962,8 +7932,7 @@ 47768 46458 } 47769 46459 else … … 47775 46465 } 47776 46466 else if (lookfor == LOOKFOR_CPP_BASECLASS) 47777 @@ -8005,9 +797 1,7 @@46467 @@ -8005,9 +7974,7 @@ 47778 46468 * matching it will take us back to the start of the line. 47779 46469 */ … … 47786 46476 /* 47787 46477 * If we are looking for ',', we also look for matching 47788 @@ -8015,7 +79 79,7 @@46478 @@ -8015,7 +7982,7 @@ 47789 46479 */ 47790 46480 if (trypos == NULL && terminated == ',' … … 47795 46485 if (trypos != NULL) 47796 46486 { 47797 @@ -8058,9 +802 2,8 @@46487 @@ -8058,9 +8025,8 @@ 47798 46488 * Get indent and pointer to text for current line, 47799 46489 * ignoring any jump label. XXX … … 47807 46497 cur_amount = get_indent(); 47808 46498 /* 47809 @@ -8075,16 +80 38,16 @@46499 @@ -8075,16 +8041,16 @@ 47810 46500 { 47811 46501 amount = cur_amount; … … 47827 46517 /* have to look back, whether it is a cpp base 47828 46518 * class declaration or initialization */ 47829 @@ -8132,10 +809 5,11 @@46519 @@ -8132,10 +8098,11 @@ 47830 46520 */ 47831 46521 amount = cur_amount; … … 47841 46531 } 47842 46532 47843 @@ -8169,10 +813 3,9 @@46533 @@ -8169,10 +8136,9 @@ 47844 46534 curwin->w_cursor.col = 47845 46535 (colnr_T)(l - ml_get_curline()) + 1; … … 47855 46545 } 47856 46546 } 47857 @@ -8209,7 +817 2,7 @@46547 @@ -8209,7 +8175,7 @@ 47858 46548 * enumerations/initializations. */ 47859 46549 if (terminated == ',') … … 47864 46554 47865 46555 lookfor = LOOKFOR_CPP_BASECLASS; 47866 @@ -8267,8 +823 0,7 @@46556 @@ -8267,8 +8233,7 @@ 47867 46557 * If so: Ignore until the matching "do". 47868 46558 */ … … 47874 46564 /* 47875 46565 * Found an unterminated line after a while ();, line up 47876 @@ -8292,7 +825 4,7 @@46566 @@ -8292,7 +8257,7 @@ 47877 46567 lookfor = LOOKFOR_TERM; 47878 46568 amount = get_indent(); /* XXX */ … … 47883 46573 ++whilelevel; 47884 46574 } 47885 @@ -8385,8 +83 47,8 @@46575 @@ -8385,8 +8350,8 @@ 47886 46576 term_again: 47887 46577 l = ml_get_curline(); … … 47894 46584 /* 47895 46585 * Check if we are on a case label now. This is 47896 @@ -8413,21 +837 5,21 @@46586 @@ -8413,21 +8378,21 @@ 47897 46587 * stat; 47898 46588 * } … … 47922 46612 47923 46613 /* 47924 @@ -8443,10 +840 5,9 @@46614 @@ -8443,10 +8408,9 @@ 47925 46615 && cin_iselse(l) 47926 46616 && whilelevel == 0) … … 47936 46626 continue; 47937 46627 } 47938 @@ -8456,9 +84 17,8 @@46628 @@ -8456,9 +8420,8 @@ 47939 46629 * that block. 47940 46630 */ … … 47948 46638 curwin->w_cursor = *trypos; 47949 46639 /* if not "else {" check for terminated again */ 47950 @@ -8477,11 +84 37,11 @@46640 @@ -8477,11 +8440,11 @@ 47951 46641 47952 46642 /* add extra indent for a comment */ … … 47963 46653 47964 46654 /* 47965 @@ -8502,7 +846 2,7 @@46655 @@ -8502,7 +8465,7 @@ 47966 46656 47967 46657 if (theline[0] == '{') … … 47972 46662 47973 46663 /* 47974 @@ -8519,11 +84 79,10 @@46664 @@ -8519,11 +8482,10 @@ 47975 46665 && !cin_ends_in(theline, (char_u *)":", NULL) 47976 46666 && !cin_ends_in(theline, (char_u *)",", NULL) … … 47986 46676 else 47987 46677 { 47988 @@ -8542,7 +850 1,7 @@46678 @@ -8542,7 +8504,7 @@ 47989 46679 /* 47990 46680 * If we're in a comment now, skip to the start of the comment. … … 47995 46685 curwin->w_cursor.lnum = trypos->lnum + 1; 47996 46686 curwin->w_cursor.col = 0; 47997 @@ -8554,7 +851 3,7 @@46687 @@ -8554,7 +8516,7 @@ 47998 46688 * constructor initialization? 47999 46689 */ /* XXX */ … … 48004 46694 n = cin_is_cpp_baseclass(&col); 48005 46695 l = ml_get_curline(); 48006 @@ -8562,8 +852 1,7 @@46696 @@ -8562,8 +8524,7 @@ 48007 46697 if (n) 48008 46698 { … … 48014 46704 } 48015 46705 48016 @@ -8594,8 +855 2,8 @@46706 @@ -8594,8 +8555,8 @@ 48017 46707 { 48018 46708 /* take us back to opening paren */ … … 48025 46715 48026 46716 /* For a line ending in ',' that is a continuation line go 48027 @@ -8626,8 +858 4,7 @@46717 @@ -8626,8 +8587,7 @@ 48028 46718 * If the line looks like a function declaration, and we're 48029 46719 * not in a comment, put it the left margin. … … 48035 46725 l = ml_get_curline(); 48036 46726 48037 @@ -8675,10 +863 2,9 @@46727 @@ -8675,10 +8635,9 @@ 48038 46728 * line (and the ones that follow) needs to be indented as 48039 46729 * parameters. … … 48048 46738 } 48049 46739 48050 @@ -8707,8 +866 3,7 @@46740 @@ -8707,8 +8666,7 @@ 48051 46741 */ 48052 46742 find_last_paren(l, '(', ')'); … … 48058 46748 amount = get_indent(); /* XXX */ 48059 46749 break; 48060 @@ -8716,7 +867 1,7 @@46750 @@ -8716,7 +8674,7 @@ 48061 46751 48062 46752 /* add extra indent for a comment */ … … 48067 46757 /* add extra indent if the previous line ended in a backslash: 48068 46758 * "asdfasdf\ 48069 @@ -8751,11 +870 6,9 @@46759 @@ -8751,11 +8709,9 @@ 48070 46760 } 48071 46761 … … 48080 46770 char_u *look; 48081 46771 pos_T *theirscope; 48082 @@ -8785,13 +87 38,13 @@46772 @@ -8785,13 +8741,13 @@ 48083 46773 if (cin_iselse(look) 48084 46774 || cin_isif(look) … … 48096 46786 break; 48097 46787 48098 @@ -8829,7 +878 2,7 @@46788 @@ -8829,7 +8785,7 @@ 48099 46789 * if it was a "while" then we need to go back to 48100 46790 * another "do", so increment whilelevel. XXX … … 48105 46795 ++whilelevel; 48106 46796 continue; 48107 @@ -8926,7 +88 79,7 @@46797 @@ -8926,7 +8882,7 @@ 48108 46798 { 48109 46799 char_u buf[LSIZE]; … … 48114 46804 while (*word != NUL) 48115 46805 { 48116 @@ -9174,6 +91 27,8 @@46806 @@ -9174,6 +9130,8 @@ 48117 46807 /* 48118 46808 * Preserve files and exit. … … 48123 46813 void 48124 46814 preserve_exit() 48125 @@ -9196,7 +915 1,7 @@46815 @@ -9196,7 +9154,7 @@ 48126 46816 { 48127 46817 if (buf->b_ml.ml_mfp != NULL && buf->b_ml.ml_mfp->mf_fname != NULL) … … 48132 46822 out_flush(); 48133 46823 ml_sync_all(FALSE, FALSE); /* preserve all swap files */ 48134 @@ -9206,7 +916 1,7 @@46824 @@ -9206,7 +9164,7 @@ 48135 46825 48136 46826 ml_close_all(FALSE); /* close all memfiles, without deleting */ … … 48141 46831 getout(1); 48142 46832 } 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 @@ 48144 46884 else 48145 46885 #endif … … 48150 46890 if (buffer == NULL) 48151 46891 return 0; 48152 @@ -10773,7 +107 28,7 @@46892 @@ -10773,7 +10704,7 @@ 48153 46893 return; 48154 46894 … … 48159 46899 48160 46900 /* Make room for another item in the file list. */ 48161 @@ -10810,13 +107 65,16 @@46901 @@ -10810,13 +10741,16 @@ 48162 46902 48163 46903 /* … … 48177 46917 char_u *tempname; 48178 46918 char_u *command; 48179 @@ -10886,7 +108 44,7 @@46919 @@ -10886,7 +10820,7 @@ 48180 46920 vim_free(buffer); 48181 46921 buffer = NULL; … … 48186 46926 /* Change NUL into SOH, otherwise the string is truncated. */ 48187 46927 for (i = 0; i < len; ++i) 48188 @@ -10895,6 +108 53,8 @@46928 @@ -10895,6 +10829,8 @@ 48189 46929 48190 46930 buffer[len] = NUL; /* make sure the buffer is terminated */ … … 48195 46935 done: 48196 46936 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 +} 48197 46979 diff -Naur vim74.orig/src/misc2.c vim74/src/misc2.c 48198 46980 --- vim74.orig/src/misc2.c 2013-07-07 14:03:35.000000000 +0000 48199 +++ vim74/src/misc2.c 2014-0 4-27 05:20:58.221771232+000046981 +++ vim74/src/misc2.c 2014-06-01 00:43:15.634143166 +0000 48200 46982 @@ -31,9 +31,7 @@ 48201 46983 if (virtual_op != MAYBE) … … 48292 47074 *d++ = '\\'; 48293 47075 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 @@ 48295 47121 { 48296 47122 if (State & NORMAL) … … 48312 47138 return State; 48313 47139 } 48314 @@ -3734,7 +37 27,6 @@47140 @@ -3734,7 +3735,6 @@ 48315 47141 } 48316 47142 if (finish_op) … … 48320 47146 { 48321 47147 if (*p_sel == 'e') 48322 @@ -3742,7 +37 34,6 @@47148 @@ -3742,7 +3742,6 @@ 48323 47149 else 48324 47150 return SHAPE_IDX_V; … … 48328 47154 } 48329 47155 #endif 48330 @@ -4695,8 +46 86,8 @@47156 @@ -4695,8 +4694,8 @@ 48331 47157 else 48332 47158 { … … 48339 47165 48340 47166 if (p > search_ctx->ffsc_fix_path) 48341 @@ -6496,13 +64 87,15 @@47167 @@ -6496,13 +6495,15 @@ 48342 47168 get4c(fd) 48343 47169 FILE *fd; … … 48364 47190 diff -Naur vim74.orig/src/move.c vim74/src/move.c 48365 47191 --- vim74.orig/src/move.c 2012-11-28 17:15:42.000000000 +0000 48366 +++ vim74/src/move.c 2014-0 4-27 05:20:58.225104649 +000047192 +++ vim74/src/move.c 2014-06-01 00:43:15.670809739 +0000 48367 47193 @@ -20,6 +20,7 @@ 48368 47194 #include "vim.h" … … 48507 47333 diff -Naur vim74.orig/src/netbeans.c vim74/src/netbeans.c 48508 47334 --- vim74.orig/src/netbeans.c 2012-06-20 17:56:18.000000000 +0000 48509 +++ vim74/src/netbeans.c 2014-0 4-27 05:20:58.228438065+000047335 +++ vim74/src/netbeans.c 2014-06-01 00:43:15.750809536 +0000 48510 47336 @@ -2232,11 +2232,9 @@ 48511 47337 … … 48522 47348 diff -Naur vim74.orig/src/normal.c vim74/src/normal.c 48523 47349 --- vim74.orig/src/normal.c 2013-07-14 11:24:37.000000000 +0000 48524 +++ vim74/src/normal.c 2014-0 4-27 05:20:58.228438065 +000047350 +++ vim74/src/normal.c 2014-06-01 00:43:15.757476185 +0000 48525 47351 @@ -14,17 +14,15 @@ 48526 47352 … … 48727 47553 #endif 48728 47554 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; 48729 47564 @@ -855,7 +822,6 @@ 48730 47565 goto normal_end; … … 49051 47886 - (void)do_join(oap->line_count, oap->op_type == OP_JOIN, TRUE, TRUE); 49052 47887 + (void)do_join(oap->line_count, oap->op_type == OP_JOIN, 49053 + 47888 + TRUE, TRUE, TRUE); 49054 47889 auto_format(FALSE, TRUE); 49055 47890 } … … 50074 48909 if (cap->count0 <= 1) 50075 48910 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 } 50076 48920 @@ -9425,12 +9248,10 @@ 50077 48921 nv_put(cap) … … 50151 48995 diff -Naur vim74.orig/src/ops.c vim74/src/ops.c 50152 48996 --- vim74.orig/src/ops.c 2013-08-09 17:34:32.000000000 +0000 50153 +++ vim74/src/ops.c 2014-0 4-27 05:20:58.231771480 +000048997 +++ vim74/src/ops.c 2014-06-01 00:43:15.767476160 +0000 50154 48998 @@ -57,9 +57,7 @@ 50155 48999 char_u **y_array; /* pointer to array of line pointers */ … … 50368 49212 } 50369 49213 else /* delete characters between lines */ 50370 @@ -2008,1 1 +1974,8@@49214 @@ -2008,15 +1974,12 @@ 50371 49215 { 50372 49216 /* delete from start of line until op_end */ … … 50382 49226 } 50383 49227 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 50384 49233 @@ -2025,14 +1988,12 @@ 50385 49234 #ifdef FEAT_VIRTUALEDIT … … 50808 49657 ; 50809 49658 } 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 @@ 50811 49684 for (t = 0; t < count; ++t) 50812 49685 { 50813 49686 curr = curr_start = ml_get((linenr_T)(curwin->w_cursor.lnum + t)); 50814 + if (t == 0 )49687 + if (t == 0 && setmark) 50815 49688 + { 50816 49689 + /* Set the '[ mark. */ … … 50821 49694 if (remove_comments) 50822 49695 { 50823 @@ -4496,6 +450 6,10@@49696 @@ -4496,6 +4509,13 @@ 50824 49697 } 50825 49698 ml_replace(curwin->w_cursor.lnum, newp, FALSE); 50826 49699 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 + } 50830 49706 + 50831 49707 /* Only report the change in the first line here, del_lines() will report 50832 49708 * the deleted line. */ 50833 49709 changed_lines(curwin->w_cursor.lnum, currsize, 50834 @@ -4631,11 +46 45,9 @@49710 @@ -4631,11 +4651,9 @@ 50835 49711 return; 50836 49712 curwin->w_cursor = oap->start; … … 50844 49720 /* Set '[ mark at the start of the formatted area */ 50845 49721 curbuf->b_op_start = oap->start; 50846 @@ -4667,7 +46 79,6 @@49722 @@ -4667,7 +4685,6 @@ 50847 49723 saved_cursor.lnum = 0; 50848 49724 } … … 50852 49728 { 50853 49729 win_T *wp; 50854 @@ -4685,7 +4 696,6 @@49730 @@ -4685,7 +4702,6 @@ 50855 49731 } 50856 49732 } … … 50860 49736 50861 49737 #if defined(FEAT_EVAL) || defined(PROTO) 50862 @@ -4696,11 +47 06,9 @@49738 @@ -4696,11 +4712,9 @@ 50863 49739 op_formatexpr(oap) 50864 49740 oparg_T *oap; … … 50872 49748 if (fex_format(oap->start.lnum, oap->line_count, NUL) != 0) 50873 49749 /* As documented: when 'formatexpr' returns non-zero fall back to 50874 @@ -4971,7 +49 79,7 @@49750 @@ -4971,7 +4985,7 @@ 50875 49751 50876 49752 /* … … 50881 49757 if (!is_end_par) 50882 49758 { 50883 @@ -4981,1 1 +4989,25@@49759 @@ -4981,13 +4995,27 @@ 50884 49760 if (line_count < 0 && u_save_cursor() == FAIL) 50885 49761 break; … … 50906 49782 + } 50907 49783 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) 50909 49786 { 50910 @@ -5126,7 +5148,6 @@ 49787 beep_flush(); 49788 break; 49789 @@ -5126,7 +5154,6 @@ 50911 49790 return FALSE; 50912 49791 } … … 50916 49795 * prepare a few things for block mode yank/delete/tilde 50917 49796 * 50918 @@ -5285,7 +53 06,6 @@49797 @@ -5285,7 +5312,6 @@ 50919 49798 bdp->textcol = (colnr_T) (pstart - line); 50920 49799 bdp->textstart = pstart; … … 50924 49803 #ifdef FEAT_RIGHTLEFT 50925 49804 static void reverse_line __ARGS((char_u *s)); 50926 @@ -5636,19 +56 56,13 @@49805 @@ -5636,19 +5662,13 @@ 50927 49806 str = skipwhite(skiptowhite(str)); 50928 49807 if (STRNCMP(str, "CHAR", 4) == 0) … … 50944 49823 50945 49824 while (!(eof = viminfo_readline(virp)) 50946 @@ -5756,11 +577 0,9 @@49825 @@ -5756,11 +5776,9 @@ 50947 49826 case MCHAR: 50948 49827 type = (char_u *)"CHAR"; … … 50956 49835 sprintf((char *)IObuff, _("E574: Unknown register type %d"), 50957 49836 y_regs[i].y_type); 50958 @@ -5774,13 +57 86,7 @@49837 @@ -5774,13 +5792,7 @@ 50959 49838 fprintf(fp, "\"%c", c); 50960 49839 if (c == execreg_lastc) … … 50971 49850 /* If max_num_lines < 0, then we save ALL the lines in the register */ 50972 49851 if (max_num_lines > 0 && num_lines > max_num_lines) 50973 @@ -5927,10 +593 3,8 @@49852 @@ -5927,10 +5939,8 @@ 50974 49853 { 50975 49854 struct yankreg *old_y_previous, *old_y_current; … … 50982 49861 int old_set_curswant; 50983 49862 pos_T old_op_start, old_op_end; 50984 @@ -5951,10 +59 55,8 @@49863 @@ -5951,10 +5961,8 @@ 50985 49864 old_set_curswant = curwin->w_set_curswant; 50986 49865 old_op_start = curbuf->b_op_start; … … 50993 49872 oa.regname = (cbd == &clip_plus ? '+' : '*'); 50994 49873 oa.op_type = OP_YANK; 50995 @@ -5972,10 +59 74,8 @@49874 @@ -5972,10 +5980,8 @@ 50996 49875 curwin->w_set_curswant = old_set_curswant; 50997 49876 curbuf->b_op_start = old_op_start; … … 51004 49883 else 51005 49884 { 51006 @@ -6005,7 +60 05,7 @@49885 @@ -6005,7 +6011,7 @@ 51007 49886 51008 49887 clip_free_selection(cbd); … … 51013 49892 51014 49893 /* 51015 @@ -6078,7 +60 78,6 @@49894 @@ -6078,7 +6084,6 @@ 51016 49895 } 51017 49896 … … 51021 49900 * If we have written to a clipboard register, send the text to the clipboard. 51022 49901 */ 51023 @@ -6096,7 +6 095,6 @@49902 @@ -6096,7 +6101,6 @@ 51024 49903 clip_gen_set_selection(&clip_plus); 51025 49904 } … … 51029 49908 #endif /* FEAT_CLIPBOARD || PROTO */ 51030 49909 51031 @@ -6115,7 +611 3,7 @@49910 @@ -6115,7 +6119,7 @@ 51032 49911 curr = y_current; 51033 49912 y_current = &y_regs[TILDE_REGISTER]; … … 51038 49917 } 51039 49918 #endif 51040 @@ -6154,30 +615 2,63 @@49919 @@ -6154,30 +6158,63 @@ 51041 49920 regname = may_get_selection(regname); 51042 49921 #endif … … 51108 49987 long i; 51109 49988 char_u *retval; 51110 @@ -6187,13 +62 18,11 @@49989 @@ -6187,13 +6224,11 @@ 51111 49990 /* Don't allow using an expression register inside an expression */ 51112 49991 if (regname == '=') … … 51127 50006 51128 50007 if (regname == '@') /* "@@" is used for unnamed register */ 51129 @@ -6211,15 +624 0,33 @@50008 @@ -6211,15 +6246,33 @@ 51130 50009 { 51131 50010 if (retval == NULL) … … 51164 50043 * Compute length of resulting string. 51165 50044 */ 51166 @@ -6261,6 +63 08,47 @@50045 @@ -6261,6 +6314,47 @@ 51167 50046 return retval; 51168 50047 } … … 51212 50091 * Store string "str" in register "name". 51213 50092 * "maxlen" is the maximum number of bytes to use, -1 for all bytes. 51214 @@ -6281,6 +63 69,51 @@50093 @@ -6281,6 +6375,51 @@ 51215 50094 } 51216 50095 … … 51264 50143 int name; 51265 50144 char_u *str; 51266 @@ -6317,45 +645 0,22 @@50145 @@ -6317,45 +6456,22 @@ 51267 50146 s = concat_str(get_expr_line_src(), p); 51268 50147 vim_free(p); … … 51287 50166 - old_y_previous = y_previous; 51288 50167 - 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 - 51293 50169 - get_yank_register(name, TRUE); 51294 50170 - if (!y_append && !must_append) … … 51300 50176 -#endif 51301 50177 - 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; 51303 50181 51304 50182 -# ifdef FEAT_CLIPBOARD … … 51306 50184 - may_set_selection(); 51307 50185 -# endif 51308 - 50186 + str_to_reg(y_current, yank_type, str, len, block_len, FALSE); 50187 51309 50188 - /* ':let @" = "val"' should change the meaning of the "" register */ 51310 50189 - if (name != '"') … … 51315 50194 #endif /* FEAT_EVAL */ 51316 50195 51317 @@ -6365,12 +64 75,13 @@50196 @@ -6365,12 +6481,13 @@ 51318 50197 * is appended. 51319 50198 */ … … 51330 50209 int type; /* MCHAR, MLINE or MBLOCK */ 51331 50210 int lnum; 51332 @@ -6381,16 +649 2,16 @@50211 @@ -6381,16 +6498,16 @@ 51333 50212 int extraline = 0; /* extra line at the end */ 51334 50213 int append = FALSE; /* append to last line in register */ … … 51350 50229 else 51351 50230 type = yank_type; 51352 @@ -6399,18 +651 0,26 @@50231 @@ -6399,18 +6516,26 @@ 51353 50232 * Count the number of lines within the string 51354 50233 */ … … 51386 50265 51387 50266 /* 51388 @@ -6425,58 +65 44,65 @@50267 @@ -6425,58 +6550,65 @@ 51389 50268 pp[lnum] = y_ptr->y_array[lnum]; 51390 50269 vim_free(y_ptr->y_array); … … 51413 50292 - --lnum; 51414 50293 - extra = (int)STRLEN(y_ptr->y_array[lnum]); 51415 + i = STRLEN(*ss);50294 + i = (long)STRLEN(*ss); 51416 50295 + pp[lnum] = vim_strnsave(*ss, i); 51417 50296 + if (i > maxlen) … … 51488 50367 #endif /* FEAT_CLIPBOARD || FEAT_EVAL || PROTO */ 51489 50368 51490 @@ -6570,12 +6 696,10 @@50369 @@ -6570,12 +6702,10 @@ 51491 50370 long word_count_cursor = 0; 51492 50371 int eol_size; … … 51501 50380 /* 51502 50381 * Compute the length of the file in characters. 51503 @@ -6591,7 +67 15,6 @@50382 @@ -6591,7 +6721,6 @@ 51504 50383 else 51505 50384 eol_size = 1; … … 51509 50388 { 51510 50389 if (lt(VIsual, curwin->w_cursor)) 51511 @@ -6635,7 +67 58,6 @@50390 @@ -6635,7 +6764,6 @@ 51512 50391 } 51513 50392 line_count_selected = max_pos.lnum - min_pos.lnum + 1; … … 51517 50396 for (lnum = 1; lnum <= curbuf->b_ml.ml_line_count; ++lnum) 51518 50397 { 51519 @@ -6648,7 +677 0,6 @@50398 @@ -6648,7 +6776,6 @@ 51520 50399 last_check = byte_count + 100000L; 51521 50400 } … … 51525 50404 if (VIsual_active 51526 50405 && lnum >= min_pos.lnum && lnum <= max_pos.lnum) 51527 @@ -6659,13 +678 0,13 @@50406 @@ -6659,13 +6786,13 @@ 51528 50407 switch (VIsual_mode) 51529 50408 { … … 51543 50422 len = (long)bd.textlen; 51544 50423 break; 51545 @@ -6697,7 +68 18,6 @@50424 @@ -6697,7 +6824,6 @@ 51546 50425 } 51547 50426 } … … 51551 50430 /* In non-visual mode, check for the line the cursor is on */ 51552 50431 if (lnum == curwin->w_cursor.lnum) 51553 @@ -6719,7 +68 39,6 @@50432 @@ -6719,7 +6845,6 @@ 51554 50433 if (!curbuf->b_p_eol && curbuf->b_p_bin) 51555 50434 byte_count -= eol_size; … … 51559 50438 { 51560 50439 if (VIsual_mode == Ctrl_V && curwin->w_curswant < MAXCOL) 51561 @@ -6750,7 +68 69,6 @@50440 @@ -6750,7 +6875,6 @@ 51562 50441 byte_count_cursor, byte_count); 51563 50442 } … … 51569 50448 diff -Naur vim74.orig/src/option.c vim74/src/option.c 51570 50449 --- vim74.orig/src/option.c 2013-07-17 19:39:13.000000000 +0000 51571 +++ vim74/src/option.c 2014-0 4-27 05:20:58.235104897+000050450 +++ vim74/src/option.c 2014-06-01 00:43:15.777476134 +0000 51572 50451 @@ -134,6 +134,7 @@ 51573 50452 #define PV_KP OPT_BOTH(OPT_BUF(BV_KP)) … … 51598 50477 {"keywordprg", "kp", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, 51599 50478 (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 } */ 51600 50488 @@ -1717,7 +1715,7 @@ 51601 50489 {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, … … 51658 50546 check_win_options(curwin); 51659 50547 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 @@ 51661 50596 ((flags & P_VI_DEF) || cp_val) 51662 50597 ? VI_DEFAULT : VIM_DEFAULT]; … … 51677 50612 || (long *)varp == &p_wcm) 51678 50613 && (*arg == '<' 51679 @@ -5372,6 +53 67,7 @@50614 @@ -5372,6 +5338,7 @@ 51680 50615 #ifdef FEAT_CINDENT 51681 50616 check_string_option(&buf->b_p_cink); … … 51685 50620 #ifdef FEAT_AUTOCMD 51686 50621 check_string_option(&buf->b_p_ft); 51687 @@ -5401,6 +53 97,9 @@50622 @@ -5401,6 +5368,9 @@ 51688 50623 check_string_option(&buf->b_p_dict); 51689 50624 check_string_option(&buf->b_p_tsr); … … 51695 50630 51696 50631 /* 51697 @@ -6563,7 +65 62,6 @@50632 @@ -6563,7 +6533,6 @@ 51698 50633 } 51699 50634 #endif … … 51703 50638 else if (varp == &p_sel) 51704 50639 { 51705 @@ -6578,7 +65 76,6 @@50640 @@ -6578,7 +6547,6 @@ 51706 50641 if (check_opt_strings(p_slm, p_slm_values, TRUE) != OK) 51707 50642 errmsg = e_invarg; … … 51711 50646 #ifdef FEAT_BROWSE 51712 50647 /* 'browsedir' */ 51713 @@ -6590,7 +65 87,6 @@50648 @@ -6590,7 +6558,6 @@ 51714 50649 } 51715 50650 #endif … … 51719 50654 else if (varp == &p_km) 51720 50655 { 51721 @@ -6602,7 +65 98,6 @@50656 @@ -6602,7 +6569,6 @@ 51722 50657 km_startsel = (vim_strchr(p_km, 'a') != NULL); 51723 50658 } … … 51727 50662 /* 'mousemodel' */ 51728 50663 else if (varp == &p_mousem) 51729 @@ -6990,6 +69 85,15 @@50664 @@ -6990,6 +6956,15 @@ 51730 50665 } 51731 50666 #endif … … 51743 50678 else 51744 50679 { 51745 @@ -7102,6 +7 106,11 @@50680 @@ -7102,6 +7077,11 @@ 51746 50681 if (varp == &(curwin->w_s->b_p_spl)) 51747 50682 { … … 51755 50690 /* 51756 50691 * Source the spell/LANG.vim in 'runtimepath'. 51757 @@ -7109,11 +7 118,10 @@50692 @@ -7109,11 +7089,10 @@ 51758 50693 * Use the first name in 'spelllang' up to '_region' or 51759 50694 * '.encoding'. … … 51769 50704 } 51770 50705 #endif 51771 @@ -7791,7 +77 99,7 @@50706 @@ -7791,7 +7770,7 @@ 51772 50707 /* when 'hlsearch' is set or reset: reset no_hlsearch */ 51773 50708 else if ((int *)varp == &p_hls) … … 51778 50713 #endif 51779 50714 51780 @@ -8338,14 +83 46,24 @@50715 @@ -8338,14 +8317,24 @@ 51781 50716 curwin->w_p_fdc = 12; 51782 50717 } … … 51804 50739 #ifdef FEAT_MBYTE 51805 50740 /* 'maxcombine' */ 51806 @@ -8467,6 +84 85,13 @@50741 @@ -8467,6 +8456,13 @@ 51807 50742 u_sync(TRUE); 51808 50743 p_ul = value; … … 51818 50753 #ifdef FEAT_LINEBREAK 51819 50754 /* 'numberwidth' must be positive */ 51820 @@ -8820,7 +88 45,7 @@50755 @@ -8820,7 +8816,7 @@ 51821 50756 } 51822 50757 #endif … … 51827 50762 * Returns the option attributes and its value. Unlike the above function it 51828 50763 * will return either global value or local value of the option depending on 51829 @@ -8833,7 +88 58,8 @@50764 @@ -8833,7 +8829,8 @@ 51830 50765 * opt_type). Uses 51831 50766 * 51832 50767 * Returned flags: 51833 50768 - * 0 hidden or unknown option 51834 + * 0 hidden or unknown option, also option that does not have requested 51835 + * 50769 + * 0 hidden or unknown option, also option that does not have requested 50770 + * type (see SREQ_* in vim.h) 51836 50771 * see SOPT_* in vim.h for other flags 51837 50772 * 51838 50773 * Possible opt_type values: see SREQ_* in vim.h 51839 @@ -8956,6 +89 82,68 @@50774 @@ -8956,6 +8953,68 @@ 51840 50775 51841 50776 return r; … … 51906 50841 51907 50842 /* 51908 @@ -9700,7 +97 88,6 @@50843 @@ -9700,7 +9759,6 @@ 51909 50844 /* 51910 50845 * Unset local option value, similar to ":set opt<". … … 51914 50849 unset_global_local_option(name, from) 51915 50850 char_u *name; 51916 @@ -9773,6 +98 60,14 @@50851 @@ -9773,6 +9831,14 @@ 51917 50852 clear_string_option(&((win_T *)from)->w_p_stl); 51918 50853 break; … … 51929 50864 } 51930 50865 51931 @@ -9821,6 +9 916,10 @@50866 @@ -9821,6 +9887,10 @@ 51932 50867 #ifdef FEAT_STL_OPT 51933 50868 case PV_STL: return (char_u *)&(curwin->w_p_stl); … … 51940 50875 return NULL; /* "cannot happen" */ 51941 50876 } 51942 @@ -9885,6 +99 84,12 @@50877 @@ -9885,6 +9955,12 @@ 51943 50878 case PV_STL: return *curwin->w_p_stl != NUL 51944 50879 ? (char_u *)&(curwin->w_p_stl) : p->var; … … 51953 50888 #ifdef FEAT_ARABIC 51954 50889 case PV_ARAB: return (char_u *)&(curwin->w_p_arab); 51955 @@ -10425,6 +105 30,7 @@50890 @@ -10425,6 +10501,7 @@ 51956 50891 /* options that are normally global but also have a local value 51957 50892 * are not copied, start using the global value */ … … 51961 50896 buf->b_p_gp = empty_option; 51962 50897 buf->b_p_mp = empty_option; 51963 @@ -10457,6 +105 63,9 @@50898 @@ -10457,6 +10534,9 @@ 51964 50899 #ifdef FEAT_PERSISTENT_UNDO 51965 50900 buf->b_p_udf = p_udf; … … 51971 50906 /* 51972 50907 * Don't copy the options set by ex_help(), use the saved values, 51973 @@ -11729,9 +118 38,10 @@50908 @@ -11729,9 +11809,10 @@ 51974 50909 * 'tabstop' value when 'shiftwidth' is zero. 51975 50910 */ … … 51984 50919 51985 50920 /* 51986 @@ -11741,7 +118 51,7 @@50921 @@ -11741,7 +11822,7 @@ 51987 50922 long 51988 50923 get_sts_value() … … 51995 50930 diff -Naur vim74.orig/src/option.h vim74/src/option.h 51996 50931 --- vim74.orig/src/option.h 2013-06-26 16:41:39.000000000 +0000 51997 +++ vim74/src/option.h 2014-0 4-27 05:20:58.238438314+000050932 +++ vim74/src/option.h 2014-06-01 00:43:15.780809459 +0000 51998 50933 @@ -31,9 +31,9 @@ 51999 50934 # define DFLT_EFM "%A%p^,%C%%CC-%t-%m,%Cat line number %l in file %f,%f|%l| %m" … … 52008 50943 # endif 52009 50944 # 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 @@ 52011 50956 EXTERN char_u *p_isp; /* 'isprint' */ 52012 50957 EXTERN int p_js; /* 'joinspaces' */ … … 52018 50963 EXTERN char_u *p_langmap; /* 'langmap'*/ 52019 50964 #endif 52020 @@ -681,10 +6 79,8 @@50965 @@ -681,10 +680,8 @@ 52021 50966 #endif 52022 50967 EXTERN char_u *p_sections; /* 'sections' */ … … 52029 50974 EXTERN char_u *p_ssop; /* 'sessionoptions' */ 52030 50975 EXTERN unsigned ssop_flags; 52031 @@ -990,6 +98 6,7 @@50976 @@ -990,6 +987,7 @@ 52032 50977 , BV_KP 52033 50978 #ifdef FEAT_LISP … … 52037 50982 , BV_MA 52038 50983 , BV_ML 52039 @@ -1031,6 +102 8,7 @@50984 @@ -1031,6 +1029,7 @@ 52040 50985 , BV_TW 52041 50986 , BV_TX … … 52045 50990 , BV_COUNT /* must be the last one */ 52046 50991 }; 52047 @@ -1109,3 +110 7,6 @@50992 @@ -1109,3 +1108,6 @@ 52048 50993 , WV_WRAP 52049 50994 , WV_COUNT /* must be the last one */ … … 52054 50999 diff -Naur vim74.orig/src/os_amiga.c vim74/src/os_amiga.c 52055 51000 --- vim74.orig/src/os_amiga.c 2013-05-06 02:06:04.000000000 +0000 52056 +++ vim74/src/os_amiga.c 2014-0 4-27 05:20:58.238438314+000051001 +++ vim74/src/os_amiga.c 2014-06-01 00:43:15.794142759 +0000 52057 51002 @@ -884,8 +884,9 @@ 52058 51003 * Return -1 if unknown. … … 52068 51013 diff -Naur vim74.orig/src/os_dos.h vim74/src/os_dos.h 52069 51014 --- vim74.orig/src/os_dos.h 2013-06-12 18:09:44.000000000 +0000 52070 +++ vim74/src/os_dos.h 2014-0 4-27 05:20:58.238438314+000051015 +++ vim74/src/os_dos.h 2014-06-01 00:43:15.837475982 +0000 52071 51016 @@ -109,7 +109,7 @@ 52072 51017 #endif … … 52089 51034 diff -Naur vim74.orig/src/os_mac.h vim74/src/os_mac.h 52090 51035 --- vim74.orig/src/os_mac.h 2013-05-06 02:06:04.000000000 +0000 52091 +++ vim74/src/os_mac.h 2014-0 4-27 05:20:58.238438314+000051036 +++ vim74/src/os_mac.h 2014-06-01 00:43:15.847475956 +0000 52092 51037 @@ -16,6 +16,11 @@ 52093 51038 # define OPAQUE_TOOLBOX_STRUCTS 0 … … 52113 51058 diff -Naur vim74.orig/src/os_msdos.c vim74/src/os_msdos.c 52114 51059 --- vim74.orig/src/os_msdos.c 2013-05-06 02:06:04.000000000 +0000 52115 +++ vim74/src/os_msdos.c 2014-0 4-27 05:20:58.245105145+000051060 +++ vim74/src/os_msdos.c 2014-06-01 00:43:15.950809026 +0000 52116 51061 @@ -2270,9 +2270,7 @@ 52117 51062 default: … … 52155 51100 diff -Naur vim74.orig/src/os_mswin.c vim74/src/os_mswin.c 52156 51101 --- vim74.orig/src/os_mswin.c 2013-06-16 14:41:11.000000000 +0000 52157 +++ vim74/src/os_mswin.c 2014-0 4-27 05:20:58.245105145 +000051102 +++ vim74/src/os_mswin.c 2014-06-01 00:43:15.970808975 +0000 52158 51103 @@ -456,7 +456,14 @@ 52159 51104 int … … 52563 51508 diff -Naur vim74.orig/src/os_os2_cfg.h vim74/src/os_os2_cfg.h 52564 51509 --- vim74.orig/src/os_os2_cfg.h 2010-05-15 11:04:11.000000000 +0000 52565 +++ vim74/src/os_os2_cfg.h 2014-0 4-27 05:20:58.248438561+000051510 +++ vim74/src/os_os2_cfg.h 2014-06-01 00:43:15.987475600 +0000 52566 51511 @@ -47,7 +47,7 @@ 52567 51512 #undef UNIX /* define always by current configure script */ … … 52575 51520 diff -Naur vim74.orig/src/os_qnx.c vim74/src/os_qnx.c 52576 51521 --- vim74.orig/src/os_qnx.c 2011-09-21 17:48:08.000000000 +0000 52577 +++ vim74/src/os_qnx.c 2014-0 4-27 05:20:58.248438561+000051522 +++ vim74/src/os_qnx.c 2014-06-01 00:43:16.000808899 +0000 52578 51523 @@ -78,9 +78,7 @@ 52579 51524 default: /* fallthrough to line type */ … … 52598 51543 diff -Naur vim74.orig/src/os_unix.c vim74/src/os_unix.c 52599 51544 --- vim74.orig/src/os_unix.c 2013-07-03 14:32:32.000000000 +0000 52600 +++ vim74/src/os_unix.c 2014-0 4-27 05:20:58.248438561+000051545 +++ vim74/src/os_unix.c 2014-06-01 00:43:16.020808848 +0000 52601 51546 @@ -46,6 +46,14 @@ 52602 51547 static int selinux_enabled = -1; … … 52852 51797 if (*e != ':') 52853 51798 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 @@ 52855 51884 return avail; 52856 51885 } … … 52860 51889 * Wait "msec" msec until a character is available from file descriptor "fd". 52861 51890 * "msec" == 0 will check for characters once. 52862 @@ -5327,13 +54 65,7 @@51891 @@ -5327,13 +5485,7 @@ 52863 51892 } 52864 51893 # endif … … 52874 51903 if (ret == -1 && errno == EINTR) 52875 51904 { 52876 @@ -5455,8 +5 587,6 @@51905 @@ -5455,8 +5607,6 @@ 52877 51906 return (ret > 0); 52878 51907 } … … 52883 51912 /* 52884 51913 * Expand a path into all matching files and/or directories. Handles "*", 52885 @@ -5569,7 +5 699,7 @@51914 @@ -5569,7 +5719,7 @@ 52886 51915 continue; 52887 51916 … … 52892 51921 52893 51922 if (--files_free == 0) 52894 @@ -5979,7 +61 09,7 @@51923 @@ -5979,7 +6129,7 @@ 52895 51924 { 52896 51925 /* If there is a NUL, set did_find_nul, else set check_spaces */ … … 52901 51930 else 52902 51931 check_spaces = TRUE; 52903 @@ -6067,7 +6 197,7 @@51932 @@ -6067,7 +6217,7 @@ 52904 51933 continue; 52905 51934 … … 52910 51939 52911 51940 p = alloc((unsigned)(STRLEN((*file)[i]) + 1 + dir)); 52912 @@ -6294,7 +64 24,7 @@51941 @@ -6294,7 +6444,7 @@ 52913 51942 52914 51943 /* Reads gpm event and adds special keys to input buf. Returns length of … … 52921 51950 diff -Naur vim74.orig/src/os_unix.h vim74/src/os_unix.h 52922 51951 --- vim74.orig/src/os_unix.h 2013-06-12 18:09:44.000000000 +0000 52923 +++ vim74/src/os_unix.h 2014-0 4-27 05:20:58.251771978+000051952 +++ vim74/src/os_unix.h 2014-06-01 00:43:16.040808797 +0000 52924 51953 @@ -225,6 +225,8 @@ 52925 51954 # include <starlet.h> … … 52962 51991 diff -Naur vim74.orig/src/os_vms.c vim74/src/os_vms.c 52963 51992 --- vim74.orig/src/os_vms.c 2010-06-26 04:03:31.000000000 +0000 52964 +++ vim74/src/os_vms.c 2014-0 4-27 05:20:58.251771978+000051993 +++ vim74/src/os_vms.c 2014-06-01 00:43:16.060808746 +0000 52965 51994 @@ -11,6 +11,23 @@ 52966 51995 … … 53210 52239 diff -Naur vim74.orig/src/os_vms_conf.h vim74/src/os_vms_conf.h 53211 52240 --- vim74.orig/src/os_vms_conf.h 2010-07-28 17:07:48.000000000 +0000 53212 +++ vim74/src/os_vms_conf.h 2014-0 4-27 05:20:58.251771978+000052241 +++ vim74/src/os_vms_conf.h 2014-06-01 00:43:16.077475370 +0000 53213 52242 @@ -23,7 +23,7 @@ 53214 52243 #define HAVE_DATE_TIME … … 53252 52281 diff -Naur vim74.orig/src/os_win16.h vim74/src/os_win16.h 53253 52282 --- vim74.orig/src/os_win16.h 2013-05-06 02:06:04.000000000 +0000 53254 +++ vim74/src/os_win16.h 2014-0 4-27 05:20:58.255105394+000052283 +++ vim74/src/os_win16.h 2014-06-01 00:43:16.150808517 +0000 53255 52284 @@ -55,8 +55,8 @@ 53256 52285 … … 53266 52295 diff -Naur vim74.orig/src/os_win32.c vim74/src/os_win32.c 53267 52296 --- vim74.orig/src/os_win32.c 2013-08-10 10:39:12.000000000 +0000 53268 +++ vim74/src/os_win32.c 2014-0 4-27 05:20:58.255105394+000052297 +++ vim74/src/os_win32.c 2014-06-01 00:43:16.187475090 +0000 53269 52298 @@ -78,16 +78,6 @@ 53270 52299 # endif … … 54100 53129 diff -Naur vim74.orig/src/os_win32.h vim74/src/os_win32.h 54101 53130 --- vim74.orig/src/os_win32.h 2013-07-21 15:53:13.000000000 +0000 54102 +++ vim74/src/os_win32.h 2014-0 4-27 05:20:58.255105394+000053131 +++ vim74/src/os_win32.h 2014-06-01 00:43:16.214141689 +0000 54103 53132 @@ -68,7 +68,7 @@ 54104 53133 #endif … … 54132 53161 diff -Naur vim74.orig/src/osdef.sh vim74/src/osdef.sh 54133 53162 --- vim74.orig/src/osdef.sh 2010-05-15 11:04:08.000000000 +0000 54134 +++ vim74/src/osdef.sh 2014-0 4-27 05:20:58.255105394+000053163 +++ vim74/src/osdef.sh 2014-06-01 00:43:16.220808339 +0000 54135 53164 @@ -47,11 +47,7 @@ 54136 53165 #endif … … 54146 53175 # insert a space in front of each line, so that a function name at the 54147 53176 # start of the line is matched with "[)*, ]\1[ (]" 53177 diff -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" 53189 diff -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" 54148 53201 diff -Naur vim74.orig/src/po/eo.po vim74/src/po/eo.po 54149 53202 --- vim74.orig/src/po/eo.po 2013-05-27 18:40:27.000000000 +0000 54150 +++ vim74/src/po/eo.po 2014-0 4-27 05:20:58.268439058+000053203 +++ vim74/src/po/eo.po 2014-06-01 00:43:16.487474326 +0000 54151 53204 @@ -23,8 +23,8 @@ 54152 53205 msgstr "" … … 54200 53253 msgstr "E687: Malpli da celoj ol Listeroj" 54201 53254 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" 54202 53264 @@ -596,13 +602,13 @@ 54203 53265 msgid "&Ok" … … 54896 53958 +"Ne povis agordi serÄvojon: sys.path ne estas listo\n" 54897 53959 +"Vi nun devas aldoni vim.VIM_SPECIAL_PATH al sys.path" 53960 diff -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" 53974 diff -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" 53986 diff -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" 54000 diff -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" 54012 diff -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" 54024 diff -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" 54045 diff -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" 54066 diff -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: Xg^ÍXg^Ƶ©ärūܹñ" 54081 54082 -msgid "E692: Invalid operation for Lists" 54083 +msgid "E692: Invalid operation for List" 54084 msgstr "E692: Xg^ÉͳøÈìÅ·" 54085 54086 msgid "E735: Can only compare Dictionary with Dictionary" 54087 diff -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" 54099 diff -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" 54111 diff -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" 54125 diff -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" 54139 diff -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" 54153 diff -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" 54175 diff -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" 54196 diff -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" 54208 diff -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" 54898 54222 diff -Naur vim74.orig/src/po/ru.cp1251.po vim74/src/po/ru.cp1251.po 54899 54223 --- vim74.orig/src/po/ru.cp1251.po 2013-08-10 12:28:27.000000000 +0000 54900 +++ vim74/src/po/ru.cp1251.po 2014-0 4-27 05:20:58.305106636+000054224 +++ vim74/src/po/ru.cp1251.po 2014-06-01 00:43:16.704140441 +0000 54901 54225 @@ -3,14 +3,14 @@ 54902 54226 # Îá óñëîâèÿõ èñïîëüçîâàíèÿ ÷èòàéòå â ðåäàêòîðå Vim ":help uganda" … … 54937 54261 msgstr "W14: Ïðåäóïðåæäåíèå: ïåðåïîëíåíèå ñïèñêà èìží ôàéëîâ" 54938 54262 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" 54939 54272 @@ -569,7 +569,7 @@ 54940 54273 msgstr "E808: Òðåáóåòñÿ öåëîå ÷èñëî èëè ñ ïëàâàþùåé òî÷êîé" … … 55150 54483 diff -Naur vim74.orig/src/po/ru.po vim74/src/po/ru.po 55151 54484 --- vim74.orig/src/po/ru.po 2013-07-09 12:36:10.000000000 +0000 55152 +++ vim74/src/po/ru.po 2014-0 4-27 05:20:58.308440052+000054485 +++ vim74/src/po/ru.po 2014-06-01 00:43:16.710807091 +0000 55153 54486 @@ -3,14 +3,14 @@ 55154 54487 # Ðб ÑÑлПвОÑÑ … … 55192 54525 msgstr "W14: ÐÑеЎÑпÑежЎеМОе: пеÑепПлМеМОе ÑпОÑка ОЌÑÐœ ÑайлПв" 55193 54526 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" 55194 54536 @@ -569,7 +569,7 @@ 55195 54537 msgstr "E808: ТÑебÑеÑÑÑ ÑелПе ÑОÑлП ОлО Ñ Ð¿Ð»Ð°Ð²Ð°ÑÑей ÑПÑкПй" … … 55408 54750 msgstr "ÐевПзЌПжМП ÑЎалОÑÑ Ð°ÑÑОбÑÑÑ vim.List" 55409 54751 54752 diff -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 mono 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 mono iba Slovník so Slovníkom (Dictionary with Dictionary)" 54766 diff -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)" 54780 diff -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" 55410 54794 diff -Naur vim74.orig/src/po/uk.cp1251.po vim74/src/po/uk.cp1251.po 55411 54795 --- vim74.orig/src/po/uk.cp1251.po 2013-08-10 12:28:27.000000000 +0000 55412 +++ vim74/src/po/uk.cp1251.po 2014-0 4-27 05:20:58.315106883+000054796 +++ vim74/src/po/uk.cp1251.po 2014-06-01 00:43:16.754140314 +0000 55413 54797 @@ -2,19 +2,17 @@ 55414 54798 # Ukrainian Vim translation [uk] … … 55455 54839 msgstr "E687: Ö³ëåé ìåíøå, í³æ åëåìåíò³â ñïèñêó" 55456 54840 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" 55457 54850 @@ -594,16 +599,16 @@ 55458 54851 msgid "&Ok" … … 56243 55636 diff -Naur vim74.orig/src/po/uk.po vim74/src/po/uk.po 56244 55637 --- vim74.orig/src/po/uk.po 2013-01-17 12:11:55.000000000 +0000 56245 +++ vim74/src/po/uk.po 2014-0 4-27 05:20:58.318440300+000055638 +++ vim74/src/po/uk.po 2014-06-01 00:43:16.790806887 +0000 56246 55639 @@ -2,19 +2,17 @@ 56247 55640 # Ukrainian Vim translation [uk] … … 56289 55682 msgstr "E687: ЊÑлей ЌеМÑе, ÐœÑж елеЌеМÑÑв ÑпОÑкÑ" 56290 55683 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" 56291 55693 @@ -594,16 +599,16 @@ 56292 55694 msgid "&Ok" … … 57084 56486 : sys.path Ме ÑпОÑПк\n" 57085 56487 +"ÐÐ°Ñ ÑлÑÐŽ ЎПЎаÑО vim.VIM_SPECIAL_PATH ЎП sys.path" 56488 diff -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" 56500 diff -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" 56521 diff -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" 57086 56533 diff -Naur vim74.orig/src/popupmnu.c vim74/src/popupmnu.c 57087 56534 --- vim74.orig/src/popupmnu.c 2011-08-17 16:04:28.000000000 +0000 57088 +++ vim74/src/popupmnu.c 2014-0 4-27 05:20:58.328440548+000056535 +++ vim74/src/popupmnu.c 2014-06-01 00:43:16.890806633 +0000 57089 56536 @@ -282,6 +282,10 @@ 57090 56537 int round; … … 57111 56558 diff -Naur vim74.orig/src/proto/blowfish.pro vim74/src/proto/blowfish.pro 57112 56559 --- vim74.orig/src/proto/blowfish.pro 2013-08-10 11:37:06.000000000 +0000 57113 +++ vim74/src/proto/blowfish.pro 2014-0 4-27 05:20:58.328440548+000056560 +++ vim74/src/proto/blowfish.pro 2014-06-01 00:43:16.927473206 +0000 57114 56561 @@ -1,6 +1,6 @@ 57115 56562 /* blowfish.c */ … … 57122 56569 diff -Naur vim74.orig/src/proto/eval.pro vim74/src/proto/eval.pro 57123 56570 --- 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)); 57126 56574 int list_append_string __ARGS((list_T *l, char_u *str, int len)); 57127 56575 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)); 57129 56578 +void list_insert __ARGS((list_T *l, listitem_T *ni, listitem_T *item)); 57130 56579 int garbage_collect __ARGS((void)); … … 57133 56582 diff -Naur vim74.orig/src/proto/ex_cmds2.pro vim74/src/proto/ex_cmds2.pro 57134 56583 --- vim74.orig/src/proto/ex_cmds2.pro 2013-08-10 11:37:10.000000000 +0000 57135 +++ vim74/src/proto/ex_cmds2.pro 2014-0 4-27 05:20:58.331773964+000056584 +++ vim74/src/proto/ex_cmds2.pro 2014-06-01 00:43:17.000806353 +0000 57136 56585 @@ -35,7 +35,7 @@ 57137 56586 int prof_def_func __ARGS((void)); … … 57145 56594 diff -Naur vim74.orig/src/proto/ex_docmd.pro vim74/src/proto/ex_docmd.pro 57146 56595 --- vim74.orig/src/proto/ex_docmd.pro 2013-08-10 11:37:10.000000000 +0000 57147 +++ vim74/src/proto/ex_docmd.pro 2014-0 4-27 05:20:58.331773964+000056596 +++ vim74/src/proto/ex_docmd.pro 2014-06-01 00:43:17.007473002 +0000 57148 56597 @@ -54,4 +54,5 @@ 57149 56598 int put_line __ARGS((FILE *fd, char *s)); … … 57154 56603 diff -Naur vim74.orig/src/proto/ex_eval.pro vim74/src/proto/ex_eval.pro 57155 56604 --- vim74.orig/src/proto/ex_eval.pro 2013-08-10 11:37:10.000000000 +0000 57156 +++ vim74/src/proto/ex_eval.pro 2014-0 4-27 05:20:58.331773964+000056605 +++ vim74/src/proto/ex_eval.pro 2014-06-01 00:43:17.020806302 +0000 57157 56606 @@ -4,8 +4,10 @@ 57158 56607 int should_abort __ARGS((int retcode)); … … 57166 56615 void report_make_pending __ARGS((int pending, void *value)); 57167 56616 void report_resume_pending __ARGS((int pending, void *value)); 56617 diff -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)); 57168 56629 diff -Naur vim74.orig/src/proto/getchar.pro vim74/src/proto/getchar.pro 57169 56630 --- vim74.orig/src/proto/getchar.pro 2013-08-10 11:37:12.000000000 +0000 57170 +++ vim74/src/proto/getchar.pro 2014-0 4-27 05:20:58.335107381+000056631 +++ vim74/src/proto/getchar.pro 2014-06-01 00:43:17.060806200 +0000 57171 56632 @@ -1,8 +1,9 @@ 57172 56633 /* getchar.c */ … … 57182 56643 diff -Naur vim74.orig/src/proto/misc1.pro vim74/src/proto/misc1.pro 57183 56644 --- vim74.orig/src/proto/misc1.pro 2013-08-10 11:37:20.000000000 +0000 57184 +++ vim74/src/proto/misc1.pro 2014-0 4-27 05:20:58.345107629+000056645 +++ vim74/src/proto/misc1.pro 2014-06-01 00:43:17.457471856 +0000 57185 56646 @@ -69,6 +69,7 @@ 57186 56647 char_u *getnextcomp __ARGS((char_u *fname)); … … 57203 56664 int get_expr_indent __ARGS((void)); 57204 56665 int get_lisp_indent __ARGS((void)); 57205 @@ -98,7 +100, 7@@56666 @@ -98,7 +100,8 @@ 57206 56667 void remove_duplicates __ARGS((garray_T *gap)); 57207 56668 int gen_expand_wildcards __ARGS((int num_pat, char_u **pat, int *num_file, char_u ***file, int flags)); … … 57211 56672 void FreeWild __ARGS((int count, char_u **files)); 57212 56673 int goto_im __ARGS((void)); 56674 +char_u *get_isolated_shell_name __ARGS((void)); 57213 56675 /* vim: set ft=c : */ 57214 56676 diff -Naur vim74.orig/src/proto/misc2.pro vim74/src/proto/misc2.pro 57215 56677 --- vim74.orig/src/proto/misc2.pro 2013-08-10 11:37:20.000000000 +0000 57216 +++ vim74/src/proto/misc2.pro 2014-0 4-27 05:20:58.345107629+000056678 +++ vim74/src/proto/misc2.pro 2014-06-01 00:43:17.460805181 +0000 57217 56679 @@ -32,7 +32,7 @@ 57218 56680 char_u *vim_strsave_escaped __ARGS((char_u *string, char_u *esc_chars)); … … 57224 56686 char_u *vim_strnsave_up __ARGS((char_u *string, int len)); 57225 56687 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)); 57226 56697 diff -Naur vim74.orig/src/proto/ops.pro vim74/src/proto/ops.pro 57227 56698 --- 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)); 57229 56709 @@ -53,9 +53,10 @@ 57230 56710 int clip_convert_selection __ARGS((char_u **str, long_u *len, VimClipboard *cbd)); … … 57241 56721 diff -Naur vim74.orig/src/proto/option.pro vim74/src/proto/option.pro 57242 56722 --- vim74.orig/src/proto/option.pro 2013-08-10 11:37:22.000000000 +0000 57243 +++ vim74/src/proto/option.pro 2014-0 4-27 05:20:58.348441045+000056723 +++ vim74/src/proto/option.pro 2014-06-01 00:43:17.510805054 +0000 57244 56724 @@ -23,6 +23,7 @@ 57245 56725 char_u *check_stl_option __ARGS((char_u *s)); … … 57261 56741 diff -Naur vim74.orig/src/proto/os_amiga.pro vim74/src/proto/os_amiga.pro 57262 56742 --- vim74.orig/src/proto/os_amiga.pro 2013-08-10 11:37:37.000000000 +0000 57263 +++ vim74/src/proto/os_amiga.pro 2014-0 4-27 05:20:58.348441045+000056743 +++ vim74/src/proto/os_amiga.pro 2014-06-01 00:43:17.517471704 +0000 57264 56744 @@ -26,7 +26,7 @@ 57265 56745 void mch_hide __ARGS((char_u *name)); … … 57273 56753 diff -Naur vim74.orig/src/proto/os_msdos.pro vim74/src/proto/os_msdos.pro 57274 56754 --- vim74.orig/src/proto/os_msdos.pro 2013-08-10 11:37:37.000000000 +0000 57275 +++ vim74/src/proto/os_msdos.pro 2014-0 4-27 05:20:58.348441045+000056755 +++ vim74/src/proto/os_msdos.pro 2014-06-01 00:43:17.564138251 +0000 57276 56756 @@ -38,7 +38,7 @@ 57277 56757 int mch_setperm __ARGS((char_u *name, long perm)); … … 57285 56765 diff -Naur vim74.orig/src/proto/os_unix.pro vim74/src/proto/os_unix.pro 57286 56766 --- vim74.orig/src/proto/os_unix.pro 2013-08-10 11:37:23.000000000 +0000 57287 +++ vim74/src/proto/os_unix.pro 2014-0 4-27 05:20:58.348441045+000056767 +++ vim74/src/proto/os_unix.pro 2014-06-01 00:43:17.584138200 +0000 57288 56768 @@ -42,7 +42,7 @@ 57289 56769 void mch_free_acl __ARGS((vim_acl_T aclent)); … … 57297 56777 diff -Naur vim74.orig/src/proto/os_vms.pro vim74/src/proto/os_vms.pro 57298 56778 --- vim74.orig/src/proto/os_vms.pro 2013-08-10 11:37:40.000000000 +0000 57299 +++ vim74/src/proto/os_vms.pro 2014-0 4-27 05:20:58.348441045 +000056779 +++ vim74/src/proto/os_vms.pro 2014-06-01 00:43:17.594138175 +0000 57300 56780 @@ -7,6 +7,7 @@ 57301 56781 int vms_sys __ARGS((char *cmd, char *out, char *inp)); … … 57308 56788 diff -Naur vim74.orig/src/proto/os_win32.pro vim74/src/proto/os_win32.pro 57309 56789 --- vim74.orig/src/proto/os_win32.pro 2013-08-10 11:37:38.000000000 +0000 57310 +++ vim74/src/proto/os_win32.pro 2014-0 4-27 05:20:58.348441045+000056790 +++ vim74/src/proto/os_win32.pro 2014-06-01 00:43:17.610804799 +0000 57311 56791 @@ -26,7 +26,7 @@ 57312 56792 int mch_is_linked __ARGS((char_u *fname)); … … 57320 56800 diff -Naur vim74.orig/src/proto/regexp.pro vim74/src/proto/regexp.pro 57321 56801 --- vim74.orig/src/proto/regexp.pro 2013-08-10 11:37:24.000000000 +0000 57322 +++ vim74/src/proto/regexp.pro 2014-0 4-27 05:20:58.351774461+000056802 +++ vim74/src/proto/regexp.pro 2014-06-01 00:43:17.660804672 +0000 57323 56803 @@ -10,6 +10,7 @@ 57324 56804 int vim_regsub __ARGS((regmatch_T *rmp, char_u *source, char_u *dest, int copy, int magic, int backslash)); … … 57331 56811 diff -Naur vim74.orig/src/proto/spell.pro vim74/src/proto/spell.pro 57332 56812 --- vim74.orig/src/proto/spell.pro 2013-08-10 11:37:26.000000000 +0000 57333 +++ vim74/src/proto/spell.pro 2014-0 4-27 05:20:58.351774461 +000056813 +++ vim74/src/proto/spell.pro 2014-06-01 00:43:17.687471271 +0000 57334 56814 @@ -3,6 +3,7 @@ 57335 56815 int spell_move_to __ARGS((win_T *wp, int dir, int allwords, int curline, hlf_T *attrp)); … … 57342 56822 diff -Naur vim74.orig/src/proto/term.pro vim74/src/proto/term.pro 57343 56823 --- 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)); 57346 56827 void starttermcap __ARGS((void)); 57347 56828 void stoptermcap __ARGS((void)); 56829 +int did_request_esc_sequence __ARGS((void)); 57348 56830 void may_req_termresponse __ARGS((void)); 57349 56831 -void may_req_ambiguous_character_width __ARGS((void)); … … 57354 56836 diff -Naur vim74.orig/src/proto/winclip.pro vim74/src/proto/winclip.pro 57355 56837 --- vim74.orig/src/proto/winclip.pro 2013-08-10 11:37:39.000000000 +0000 57356 +++ vim74/src/proto/winclip.pro 2014-0 4-27 05:20:58.355107876+000056838 +++ vim74/src/proto/winclip.pro 2014-06-01 00:43:17.754137768 +0000 57357 56839 @@ -11,4 +11,5 @@ 57358 56840 short_u *enc_to_utf16 __ARGS((char_u *str, int *lenp)); … … 57363 56845 diff -Naur vim74.orig/src/proto/window.pro vim74/src/proto/window.pro 57364 56846 --- vim74.orig/src/proto/window.pro 2013-08-10 11:37:30.000000000 +0000 57365 +++ vim74/src/proto/window.pro 2014-0 4-27 05:20:58.355107876+000056847 +++ vim74/src/proto/window.pro 2014-06-01 00:43:17.764137742 +0000 57366 56848 @@ -9,7 +9,7 @@ 57367 56849 void win_equal __ARGS((win_T *next_curwin, int current, int dir)); … … 57375 56857 diff -Naur vim74.orig/src/quickfix.c vim74/src/quickfix.c 57376 56858 --- vim74.orig/src/quickfix.c 2013-07-01 19:16:44.000000000 +0000 57377 +++ vim74/src/quickfix.c 2014-0 4-27 05:20:58.358441293+000056859 +++ vim74/src/quickfix.c 2014-06-01 00:43:17.804137640 +0000 57378 56860 @@ -751,7 +751,10 @@ 57379 56861 fmt_start = fmt_ptr; … … 57422 56904 diff -Naur vim74.orig/src/regexp.c vim74/src/regexp.c 57423 56905 --- 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 @@ 57426 56927 /* TRUE if using multi-line regexp. */ 57427 56928 #define REG_MULTI (reg_match == NULL) … … 57455 56956 reg_win = NULL; 57456 56957 ireg_ic = rmp->rm_ic; 57457 @@ -3738,35 +374 1,6 @@56958 @@ -3738,35 +3746,6 @@ 57458 56959 return (bt_regexec_both(line, col, NULL) != 0); 57459 56960 } … … 57491 56992 57492 56993 /* 57493 @@ -4146,7 +412 0,8 @@56994 @@ -4146,7 +4125,8 @@ 57494 56995 { 57495 56996 /* Only accept single line matches. */ … … 57501 57002 vim_strnsave(reg_getline(reg_startzpos[i].lnum) 57502 57003 + reg_startzpos[i].col, 57503 @@ -4179,9 +415 4,8 @@57004 @@ -4179,9 +4159,8 @@ 57504 57005 - (*mb_head_off)(regline, reginput - 1), reg_buf); 57505 57006 return -1; … … 57512 57013 57513 57014 /* 57514 @@ -4258,7 +423 2,6 @@57015 @@ -4258,7 +4237,6 @@ 57515 57016 } 57516 57017 return TRUE; … … 57520 57021 #define ADVANCE_REGINPUT() mb_ptr_adv(reginput) 57521 57022 57522 @@ -4311,8 +428 4,8 @@57023 @@ -4311,8 +4289,8 @@ 57523 57024 */ 57524 57025 for (;;) … … 57531 57032 57532 57033 #ifdef DEBUG 57533 @@ -4440,9 +441 3,7 @@57034 @@ -4440,9 +4418,7 @@ 57534 57035 break; 57535 57036 … … 57541 57042 break; 57542 57043 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 @@ 57544 57116 /* 57545 57117 * Check whether a backreference matches. … … 57551 57123 static int 57552 57124 match_with_backref(start_lnum, start_col, end_lnum, end_col, bytelen) 57553 @@ -6511,6 +6 483,8 @@57125 @@ -6511,6 +6506,8 @@ 57554 57126 57555 57127 /* Advance to next line. */ … … 57560 57132 ccol = 0; 57561 57133 if (got_int) 57562 @@ -7381,6 +73 55,7 @@57134 @@ -7381,6 +7378,7 @@ 57563 57135 reg_mmatch = NULL; 57564 57136 reg_maxline = 0; … … 57568 57140 } 57569 57141 #endif 57570 @@ -7400,6 +73 75,7 @@57142 @@ -7400,6 +7398,7 @@ 57571 57143 reg_buf = curbuf; /* always works on the current buffer! */ 57572 57144 reg_firstlnum = lnum; … … 57576 57148 } 57577 57149 57578 @@ -7898,17 +78 74,92 @@57150 @@ -7898,17 +7897,92 @@ 57579 57151 57580 57152 return retval; … … 57673 57245 #ifdef DEBUG 57674 57246 ,(char_u *)"" 57675 @@ -7922,11 +79 73,7 @@57247 @@ -7922,11 +7996,7 @@ 57676 57248 { 57677 57249 nfa_regcomp, … … 57685 57257 #ifdef DEBUG 57686 57258 ,(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 @@ 57688 57271 } 57689 57272 #endif … … 57701 57284 57702 57285 return prog; 57703 @@ -8051,7 +8 097,7 @@57286 @@ -8051,7 +8120,7 @@ 57704 57287 char_u *line; /* string to match against */ 57705 57288 colnr_T col; /* column to start looking for match */ … … 57710 57293 57711 57294 #if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL) \ 57712 @@ -8065,7 +81 11,7 @@57295 @@ -8065,7 +8134,7 @@ 57713 57296 char_u *line; 57714 57297 colnr_T col; … … 57721 57304 diff -Naur vim74.orig/src/regexp.h vim74/src/regexp.h 57722 57305 --- vim74.orig/src/regexp.h 2013-06-11 08:53:14.000000000 +0000 57723 +++ vim74/src/regexp.h 2014-0 4-27 05:20:58.361774709+000057306 +++ vim74/src/regexp.h 2014-06-01 00:43:17.844137538 +0000 57724 57307 @@ -149,11 +149,7 @@ 57725 57308 { … … 57737 57320 diff -Naur vim74.orig/src/regexp_nfa.c vim74/src/regexp_nfa.c 57738 57321 --- vim74.orig/src/regexp_nfa.c 2013-08-01 16:27:51.000000000 +0000 57739 +++ vim74/src/regexp_nfa.c 2014-0 4-27 05:20:58.361774709+000057322 +++ vim74/src/regexp_nfa.c 2014-06-01 00:43:17.864137487 +0000 57740 57323 @@ -29,11 +29,14 @@ 57741 57324 # define NFA_REGEXP_DEBUG_LOG "nfa_regexp_debug.log" … … 57754 57337 NFA_START_COLL, /* [abc] start */ 57755 57338 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 @@ 57757 57348 NFA_NLOWER, /* Match non-lowercase char */ 57758 57349 NFA_UPPER, /* Match uppercase char */ … … 57768 57359 NFA_CURSOR, /* Match cursor pos */ 57769 57360 NFA_LNUM, /* Match line number */ 57770 @@ -199,9 +2 09,6 @@57361 @@ -199,9 +210,6 @@ 57771 57362 NFA_MARK_LT, /* Match < mark */ 57772 57363 NFA_VISUAL, /* Match Visual area */ … … 57778 57369 NFA_CLASS_ALNUM, 57779 57370 NFA_CLASS_ALPHA, 57780 @@ -232,7 +2 39,9 @@57371 @@ -232,7 +240,9 @@ 57781 57372 NFA_UPPER, NFA_NUPPER 57782 57373 }; … … 57788 57379 /* NFA regexp \ze operator encountered. */ 57789 57380 static int nfa_has_zend; 57790 @@ -302,7 +31 1,7 @@57381 @@ -302,7 +312,7 @@ 57791 57382 static long nfa_regexec_both __ARGS((char_u *line, colnr_T col)); 57792 57383 static regprog_T *nfa_regcomp __ARGS((char_u *expr, int re_flags)); … … 57797 57388 static int match_follows __ARGS((nfa_state_T *startstate, int depth)); 57798 57389 static int failure_chance __ARGS((nfa_state_T *state, int depth)); 57799 @@ -578,6 +58 7,8 @@57390 @@ -578,6 +588,8 @@ 57800 57391 * On failure, return 0 (=FAIL) 57801 57392 * Start points to the first char of the range, while end should point … … 57806 57397 static int 57807 57398 nfa_recognize_char_class(start, end, extra_newl) 57808 @@ -681,7 +69 2,7 @@57399 @@ -681,7 +693,7 @@ 57809 57400 return FAIL; 57810 57401 … … 57815 57406 switch (config) 57816 57407 { 57817 @@ -710,13 +72 1,13 @@57408 @@ -710,13 +722,13 @@ 57818 57409 case CLASS_not | CLASS_az | CLASS_AZ: 57819 57410 return extra_newl + NFA_NALPHA; … … 57833 57424 return FAIL; 57834 57425 } 57835 @@ -733,7 +74 4,12 @@57426 @@ -733,7 +745,12 @@ 57836 57427 nfa_emit_equi_class(c) 57837 57428 int c; … … 57847 57438 #ifdef FEAT_MBYTE 57848 57439 if (enc_utf8 || STRCMP(p_enc, "latin1") == 0 57849 @@ -744,92 +76 0,338 @@57440 @@ -744,92 +761,338 @@ 57850 57441 { 57851 57442 case 'A': case 0300: case 0301: case 0302: … … 58219 57810 58220 57811 /* 58221 @@ -877,7 +11 39,7 @@57812 @@ -877,7 +1140,7 @@ 58222 57813 switch (c) 58223 57814 { … … 58228 57819 case Magic('^'): 58229 57820 EMIT(NFA_BOL); 58230 @@ -900,6 +116 2,9 @@57821 @@ -900,6 +1163,9 @@ 58231 57822 58232 57823 case Magic('_'): … … 58238 57829 { 58239 57830 EMIT(NFA_BOL); 58240 @@ -914,7 +11 79,7 @@57831 @@ -914,7 +1180,7 @@ 58241 57832 break; 58242 57833 } … … 58247 57838 /* "\_[" is collection plus newline */ 58248 57839 if (c == '[') 58249 @@ -956,6 +122 1,12 @@57840 @@ -956,6 +1222,12 @@ 58250 57841 p = vim_strchr(classchars, no_Magic(c)); 58251 57842 if (p == NULL) … … 58260 57851 return FAIL; 58261 57852 } 58262 @@ -970,7 +124 1,7 @@57853 @@ -970,7 +1242,7 @@ 58263 57854 } 58264 57855 #endif … … 58269 57860 EMIT(NFA_NEWL); 58270 57861 EMIT(NFA_OR); 58271 @@ -1123,8 +139 4,9 @@57862 @@ -1123,8 +1395,9 @@ 58272 57863 EMSG2_RET_FAIL( 58273 57864 _("E678: Invalid character after %s%%[dxouU]"), … … 58280 57871 break; 58281 57872 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 @@ 58283 57885 { 58284 57886 /* … … 58308 57910 mb_ptr_adv(regparse); 58309 57911 return OK; 58310 @@ -1504,7 +17 76,7 @@57912 @@ -1504,7 +1781,7 @@ 58311 57913 * collection, add an OR below. But not for negated 58312 57914 * range. */ … … 58317 57919 else 58318 57920 { 58319 @@ -1537,7 +18 09,7 @@57921 @@ -1537,7 +1814,7 @@ 58320 57922 EMIT(NFA_END_COLL); 58321 57923 … … 58326 57928 EMIT(reg_string ? NL : NFA_NEWL); 58327 57929 EMIT(NFA_OR); 58328 @@ -1744,8 +20 16,8 @@57930 @@ -1744,8 +2021,8 @@ 58329 57931 { 58330 57932 /* Ignore result of previous call to nfa_regatom() */ … … 58337 57939 } 58338 57940 58339 @@ -1909,16 +218 1,16 @@57941 @@ -1909,16 +2186,16 @@ 58340 57942 old_post_pos = (int)(post_ptr - post_start); 58341 57943 if (nfa_regconcat() == FAIL) … … 58358 57960 return OK; 58359 57961 } 58360 @@ -2011,7 +228 3,7 @@57962 @@ -2011,7 +2288,7 @@ 58361 57963 if (c >= NFA_FIRST_NL && c <= NFA_LAST_NL) 58362 57964 { … … 58367 57969 58368 57970 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; 58370 57978 case NFA_STAR_NONGREEDY: STRCPY(code, "NFA_STAR_NONGREEDY "); break; 58371 57979 case NFA_QUEST: STRCPY(code, "NFA_QUEST"); break; … … 58376 57984 58377 57985 case NFA_START_COLL: STRCPY(code, "NFA_START_COLL"); break; 58378 @@ -2217,6 +24 89,10 @@57986 @@ -2217,6 +2495,10 @@ 58379 57987 case NFA_NLOWER:STRCPY(code, "NFA_NLOWER"); break; 58380 57988 case NFA_UPPER: STRCPY(code, "NFA_UPPER"); break; … … 58387 57995 default: 58388 57996 STRCPY(code, "CHAR(x)"); 58389 @@ -2687,6 +296 3,10@@57997 @@ -2687,6 +2969,11 @@ 58390 57998 case NFA_NLOWER: 58391 57999 case NFA_UPPER: … … 58395 58003 + case NFA_UPPER_IC: 58396 58004 + case NFA_NUPPER_IC: 58005 + case NFA_ANY_COMPOSING: 58397 58006 /* possibly non-ascii */ 58398 58007 #ifdef FEAT_MBYTE 58399 58008 if (has_mbyte) 58400 @@ -2798,7 +30 78,7 @@58009 @@ -2798,7 +3085,7 @@ 58401 58010 case NFA_ZSTART: 58402 58011 case NFA_ZEND: … … 58407 58016 case NFA_END_PATTERN: 58408 58017 case NFA_COMPOSING: 58409 @@ -2996,15 +32 76,14 @@58018 @@ -2996,15 +3283,14 @@ 58410 58019 PUSH(frag(e1.start, e2.out)); 58411 58020 break; … … 58426 58035 goto theend; 58427 58036 PUSH(frag(s, list1(&s->out))); 58428 @@ -3554,6 +38 33,7 @@58037 @@ -3554,6 +3840,7 @@ 58429 58038 static void clear_sub __ARGS((regsub_T *sub)); 58430 58039 static void copy_sub __ARGS((regsub_T *to, regsub_T *from)); … … 58434 58043 static int match_backref __ARGS((regsub_T *sub, int subidx, int *bytelen)); 58435 58044 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 @@ 58437 58046 } 58438 58047 … … 58462 58071 +/* 58463 58072 * Return TRUE if "sub1" and "sub2" have the same start positions. 58073 + * When using back-references also check the end position. 58464 58074 */ 58465 58075 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 @@ 58467 58122 if (two_unused) 58468 58123 /* one is used and two is not: not equal */ … … 58474 58129 if (REG_MULTI) 58475 58130 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 @@ 58477 58140 case NFA_NLOWER: 58478 58141 case NFA_UPPER: … … 58485 58148 case NFA_START_NEG_COLL: 58486 58149 case NFA_NEWL: 58487 @@ -3933,7 +42 43,7 @@58150 @@ -3933,7 +4282,7 @@ 58488 58151 case NFA_MOPEN: 58489 58152 case NFA_ZEND: … … 58494 58157 * "out1" may be added below. */ 58495 58158 break; 58496 @@ -3979, 7 +4289,7@@58159 @@ -3979,12 +4328,14 @@ 58497 58160 * endless loop for "\(\)*" */ 58498 58161 … … 58503 58166 /* This state is already in the list, don't add it again, 58504 58167 * 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 @@ 58506 58187 subs = addstate(l, state->out1, subs, pim, off); 58507 58188 break; … … 58512 58193 case NFA_NCLOSE: 58513 58194 subs = addstate(l, state->out, subs, pim, off); 58514 @@ -4096,7 +44 06,7 @@58195 @@ -4096,7 +4447,7 @@ 58515 58196 sub = &subs->norm; 58516 58197 } … … 58521 58202 subidx = state->c - NFA_ZOPEN; 58522 58203 sub = &subs->synt; 58523 @@ -4165,6 +4 475,13 @@58204 @@ -4165,6 +4516,13 @@ 58524 58205 } 58525 58206 … … 58535 58216 if (save_in_use == -1) 58536 58217 { 58537 @@ -4178,10 +4 495,11 @@58218 @@ -4178,10 +4536,11 @@ 58538 58219 break; 58539 58220 … … 58550 58231 break; 58551 58232 } 58552 @@ -4213,7 +45 31,7 @@58233 @@ -4213,7 +4572,7 @@ 58553 58234 sub = &subs->norm; 58554 58235 } … … 58559 58240 subidx = state->c - NFA_ZCLOSE; 58560 58241 sub = &subs->synt; 58561 @@ -4257,6 +4 575,13 @@58242 @@ -4257,6 +4616,13 @@ 58562 58243 } 58563 58244 … … 58573 58254 if (REG_MULTI) 58574 58255 sub->list.multi[subidx].end = save_lpos; 58575 @@ -4419,7 +47 44,7 @@58256 @@ -4419,7 +4785,7 @@ 58576 58257 58577 58258 default: … … 58582 58263 } 58583 58264 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 @@ 58585 58274 * When "nfa_endp" is not NULL it is a required end-of-match position. 58586 58275 * … … 58590 58279 */ 58591 58280 static int 58592 @@ -5051,6 +5 377,12 @@58281 @@ -5051,6 +5419,12 @@ 58593 58282 return FALSE; 58594 58283 } … … 58603 58292 58604 58293 /* 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 @@ 58606 58308 log_subsexpr(m); 58607 58309 #endif … … 58615 58317 case NFA_START_INVISIBLE: 58616 58318 case NFA_START_INVISIBLE_FIRST: 58617 @@ -5304,9 +56 39,13 @@58319 @@ -5304,9 +5687,13 @@ 58618 58320 { 58619 58321 int in_use = m->norm.in_use; … … 58631 58333 /* 58632 58334 * First try matching the invisible match, then what 58633 @@ -5330,6 +5 669,9 @@58335 @@ -5330,6 +5717,9 @@ 58634 58336 if (nfa_has_zsubexpr) 58635 58337 copy_sub_off(&t->subs.synt, &m->synt); … … 58641 58343 /* t->state->out1 is the corresponding 58642 58344 * END_INVISIBLE node; Add its out to the current 58643 @@ -5413,6 +5 755,13 @@58345 @@ -5413,6 +5803,13 @@ 58644 58346 #endif 58645 58347 break; … … 58655 58357 /* First try matching the pattern. */ 58656 58358 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 @@ 58658 58384 ADD_STATE_IF_MATCH(t->state); 58659 58385 break; … … 58684 58410 case NFA_BACKREF2: 58685 58411 case NFA_BACKREF3: 58686 @@ -6032,14 +64 03,12 @@58412 @@ -6032,14 +6468,12 @@ 58687 58413 break; 58688 58414 … … 58699 58425 58700 58426 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 @@ 58702 58445 if (add_state != NULL) 58703 58446 { … … 58707 58450 if (t->pim.result == NFA_PIM_UNUSED) 58708 58451 pim = NULL; 58709 @@ -6171,6 +6 541,15 @@58452 @@ -6171,6 +6604,15 @@ 58710 58453 pim = NULL; 58711 58454 } … … 58723 58466 addstate_here(thislist, add_state, &t->subs, pim, &listidx); 58724 58467 else 58725 @@ -6402,8 +6 781,10 @@58468 @@ -6402,8 +6844,10 @@ 58726 58469 { 58727 58470 struct multipos *mpos = &subs.synt.list.multi[i]; … … 58736 58479 vim_strnsave(reg_getline(mpos->start.lnum) 58737 58480 + mpos->start.col, 58738 @@ -6679, 47 +7060,21 @@58481 @@ -6679,19 +7123,21 @@ 58739 58482 * Match a regexp against a string. 58740 58483 * "rmp->regprog" is a compiled regexp as returned by nfa_regcomp(). … … 58746 58489 static int 58747 58490 -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; 58755 58500 - 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 58766 58509 -#if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL) \ 58767 58510 - || defined(FIND_REPLACE_DIALOG) || defined(PROTO) … … 58774 58517 - static int 58775 58518 -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; 58785 58526 - 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; 58794 58532 -#endif 58795 58533 - ireg_maxcol = 0; 58534 - return (nfa_regexec_both(line, col) != 0); 58535 -} 58536 -#endif 58537 - 58796 58538 58797 58539 /* 58540 * Match a regexp against multiple lines. 58798 58541 diff -Naur vim74.orig/src/screen.c vim74/src/screen.c 58799 58542 --- 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 * 58801 58553 @@ -446,8 +446,6 @@ 58802 58554 #endif … … 58868 58620 #if defined(FEAT_SYN_HL) || defined(FEAT_SEARCH_EXTRA) 58869 58621 /* 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; 58870 58633 @@ -2670,7 +2659,6 @@ 58871 58634 * 6. set highlighting for the Visual area an other text. … … 58957 58720 /* Handle a character that's not completely on the screen: Put ptr at 58958 58721 * 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); 58959 58748 @@ -4500,9 +4470,7 @@ 58960 58749 && ((wp->w_p_list && lcs_eol > 0) … … 59020 58809 59021 58810 #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 @@ 59023 58843 { 59024 58844 /* don't free regprog in the match list, it's a copy */ … … 59029 58849 shl->rm.regprog = NULL; 59030 58850 shl->lnum = 0; 59031 @@ -9648,10 +96 25,7 @@58851 @@ -9648,10 +9630,7 @@ 59032 58852 do_mode = ((p_smd && msg_silent == 0) 59033 58853 && ((State & INSERT) … … 59041 58861 { 59042 58862 /* 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 @@ 59044 58874 if ((State & INSERT) && p_paste) 59045 58875 MSG_PUTS_ATTR(_(" (paste)"), attr); … … 59049 58879 { 59050 58880 char *p; 59051 @@ -9799,7 +977 2,6 @@58881 @@ -9799,7 +9778,6 @@ 59052 58882 } 59053 58883 MSG_PUTS_ATTR(_(p), attr); … … 59057 58887 } 59058 58888 59059 @@ -9828,11 +980 0,9 @@58889 @@ -9828,11 +9806,9 @@ 59060 58890 msg_clr_cmdline(); 59061 58891 … … 59071 58901 diff -Naur vim74.orig/src/search.c vim74/src/search.c 59072 58902 --- vim74.orig/src/search.c 2013-07-17 17:20:47.000000000 +0000 59073 +++ vim74/src/search.c 2014-0 4-27 05:20:58.368441542+000058903 +++ vim74/src/search.c 2014-06-01 00:43:17.920804010 +0000 59074 58904 @@ -201,7 +201,7 @@ 59075 58905 * Save the currently used pattern in the appropriate place, … … 59531 59361 diff -Naur vim74.orig/src/spell.c vim74/src/spell.c 59532 59362 --- vim74.orig/src/spell.c 2013-07-17 15:28:28.000000000 +0000 59533 +++ vim74/src/spell.c 2014-0 4-27 05:20:58.375108373 +000059363 +++ vim74/src/spell.c 2014-06-01 00:43:17.964137233 +0000 59534 59364 @@ -317,7 +317,7 @@ 59535 59365 … … 59620 59450 * If there is a region name let "region" point to it and remove it 59621 59451 * 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 @@ 59623 59461 int past_second = FALSE; /* past second word char */ 59624 59462 … … 59629 59467 return 0; /* only non-word characters, illegal word */ 59630 59468 #ifdef FEAT_MBYTE 59631 @@ -4617,7 +46 29,7 @@59469 @@ -4617,7 +4630,7 @@ 59632 59470 * But a word with an upper char only at start is a ONECAP. 59633 59471 */ … … 59638 59476 c = PTR2CHAR(p); 59639 59477 if (!SPELL_ISUPPER(c)) 59640 @@ -4689,7 +470 1,25 @@59478 @@ -4689,7 +4702,25 @@ 59641 59479 return flags; 59642 59480 } … … 59665 59503 * Free all languages. 59666 59504 */ 59667 @@ -4698,7 +472 8,6 @@59505 @@ -4698,7 +4729,6 @@ 59668 59506 { 59669 59507 slang_T *slang; … … 59673 59511 /* Go through all buffers and handle 'spelllang'. <VN> */ 59674 59512 for (buf = firstbuf; buf != NULL; buf = buf->b_next) 59675 @@ -4711,24 +474 0,16 @@59513 @@ -4711,24 +4741,16 @@ 59676 59514 slang_free(slang); 59677 59515 } … … 59701 59539 * Clear all spelling tables and reload them. 59702 59540 * Used after 'encoding' is set and when ":mkspell" was used. 59703 @@ -4761,7 +478 2,7 @@59541 @@ -4761,7 +4783,7 @@ 59704 59542 } 59705 59543 } … … 59710 59548 /* 59711 59549 * Reload the spell file "fname" if it's loaded. 59712 @@ -9479,7 +950 0,8 @@59550 @@ -9479,7 +9501,8 @@ 59713 59551 if (undo) 59714 59552 { … … 59720 59558 } 59721 59559 fseek(fd, fpos_next, SEEK_SET); 59722 @@ -9525,7 +954 7,7 @@59560 @@ -9525,7 +9548,7 @@ 59723 59561 fclose(fd); 59724 59562 … … 59729 59567 } 59730 59568 59731 @@ -9906,7 +992 8,7 @@59569 @@ -9906,7 +9929,7 @@ 59732 59570 59733 59571 c = mb_ptr2char(s); … … 59738 59576 } 59739 59577 #endif 59740 @@ -9919,8 +994 1,9 @@59578 @@ -9919,8 +9942,9 @@ 59741 59579 * Unlike spell_iswordp() this doesn't check for "midword" characters. 59742 59580 */ … … 59749 59587 #ifdef FEAT_MBYTE 59750 59588 int c; 59751 @@ -9929,7 +995 2,7 @@59589 @@ -9929,7 +9953,7 @@ 59752 59590 { 59753 59591 c = mb_ptr2char(p); … … 59758 59596 } 59759 59597 #endif 59760 @@ -9941,11 +996 4,16 @@59598 @@ -9941,11 +9965,16 @@ 59761 59599 * Return TRUE if word class indicates a word character. 59762 59600 * Only for characters above 255. … … 59777 59615 } 59778 59616 59779 @@ -9970,9 +999 8,10 @@59617 @@ -9970,9 +9999,10 @@ 59780 59618 if (*s > 255) 59781 59619 { … … 59790 59628 } 59791 59629 return spelltab.st_isw[*s]; 59792 @@ -10135,7 +1016 4,7 @@59630 @@ -10135,7 +10165,7 @@ 59793 59631 } 59794 59632 … … 59799 59637 * In Visual mode use the highlighted word as the bad word. 59800 59638 * When "count" is non-zero use that suggestion. 59801 @@ -10162,7 +1019 1,6 @@59639 @@ -10162,7 +10192,6 @@ 59802 59640 if (no_spell_checking(curwin)) 59803 59641 return; … … 59807 59645 { 59808 59646 /* Use the Visually selected text as the bad word. But reject 59809 @@ -10180,10 +1020 8,8 @@59647 @@ -10180,10 +10209,8 @@ 59810 59648 ++badlen; 59811 59649 end_visual_mode(); … … 59820 59658 { 59821 59659 /* No bad word or it starts after the cursor: use the word under the 59822 @@ -10192,13 +1021 8,13 @@59660 @@ -10192,13 +10219,13 @@ 59823 59661 line = ml_get_curline(); 59824 59662 p = line + curwin->w_cursor.col; … … 59837 59675 beep_flush(); 59838 59676 return; 59839 @@ -10435,7 +1046 1,7 @@59677 @@ -10435,7 +10462,7 @@ 59840 59678 for (;;) 59841 59679 { … … 59846 59684 if (vim_regexec(®match, p, 0) 59847 59685 && regmatch.endp[0] == line + endcol) 59848 @@ -11644,7 +1167 0,7 @@59686 @@ -11644,7 +11671,7 @@ 59849 59687 59850 59688 /* When appending a compound word after a word character don't … … 59855 59693 make_case_word(tword + sp->ts_splitoff, 59856 59694 preword + sp->ts_prewordlen, c); 59857 @@ -11894,7 +1192 0,8 @@59695 @@ -11894,7 +11921,8 @@ 59858 59696 * character when the word ends. But only when the 59859 59697 * good word can end. */ … … 59865 59703 && fword[sp->ts_fidx] != NUL 59866 59704 && goodword_ends) 59867 @@ -12007,7 +1203 4,7 @@59705 @@ -12007,7 +12035,7 @@ 59868 59706 /* Normal byte, go one level deeper. If it's not equal to the 59869 59707 * byte in the bad word adjust the score. But don't even try … … 59874 59712 if (c == fword[sp->ts_fidx] 59875 59713 #ifdef FEAT_MBYTE 59876 @@ -13377,9 +1340 4,8 @@59714 @@ -13377,9 +13405,8 @@ 59877 59715 59878 59716 /* Lookup the word "orgnr" one of the two tries. */ … … 59885 59723 i = 1; 59886 59724 if (wordcount == orgnr && byts[n + 1] == NUL) 59887 @@ -13393,6 +134 19,7 @@59725 @@ -13393,6 +13420,7 @@ 59888 59726 if (i > byts[n]) /* safety check */ 59889 59727 { … … 59893 59731 } 59894 59732 59895 @@ -13405,7 +1343 2,7 @@59733 @@ -13405,7 +13433,7 @@ 59896 59734 wordcount += wc; 59897 59735 } … … 59902 59740 } 59903 59741 badword: 59904 @@ -14225,7 +1425 2,7 @@59742 @@ -14225,7 +14253,7 @@ 59905 59743 } 59906 59744 else … … 59911 59749 ++s; 59912 59750 } 59913 @@ -14520,7 +1454 7,7 @@59751 @@ -14520,7 +14548,7 @@ 59914 59752 else 59915 59753 { … … 59920 59758 } 59921 59759 } 59922 @@ -15568,11 +1559 5,21 @@59760 @@ -15568,11 +15596,21 @@ 59923 59761 ex_spelldump(eap) 59924 59762 exarg_T *eap; … … 59943 59781 return; 59944 59782 59945 @@ -16034,7 +1607 1,7 @@59783 @@ -16034,7 +16072,7 @@ 59946 59784 for (p = line + startcol; p > line; ) 59947 59785 { … … 59954 59792 diff -Naur vim74.orig/src/structs.h vim74/src/structs.h 59955 59793 --- vim74.orig/src/structs.h 2013-07-03 13:35:59.000000000 +0000 59956 +++ vim74/src/structs.h 2014-0 4-27 05:20:58.375108373+000059794 +++ vim74/src/structs.h 2014-06-01 00:43:17.970803882 +0000 59957 59795 @@ -346,9 +346,7 @@ 59958 59796 #endif … … 60018 59856 char_u *save_ei; /* saved value of 'eventignore' */ 60019 59857 # 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 @@ 60021 59876 int typebuf_valid; /* TRUE when save_typebuf valid */ 60022 59877 int old_char; … … 60028 59883 char_u *save_inputbuf; 60029 59884 #endif 60030 @@ -1088,7 +109 3,7 @@59885 @@ -1088,7 +1094,7 @@ 60031 59886 typedef long_u hash_T; /* Type for hi_hash */ 60032 59887 … … 60037 59892 #else 60038 59893 typedef int varnumber_T; 60039 @@ -1309,6 +131 4,9 @@59894 @@ -1309,6 +1315,9 @@ 60040 59895 regprog_T *b_cap_prog; /* program for 'spellcapcheck' */ 60041 59896 char_u *b_p_spf; /* 'spellfile' */ … … 60047 59902 #if !defined(FEAT_SYN_HL) && !defined(FEAT_SPELL) 60048 59903 int dummy; 60049 @@ -1397,12 +140 5,10 @@59904 @@ -1397,12 +1406,10 @@ 60050 59905 60051 59906 pos_T b_namedm[NMARKS]; /* current named marks (mark.c) */ … … 60061 59916 60062 59917 pos_T b_last_cursor; /* cursor position when last unloading this 60063 @@ -1440,6 +144 6,7 @@59918 @@ -1440,6 +1447,7 @@ 60064 59919 * start and end of an operator, also used for '[ and '] 60065 59920 */ … … 60069 59924 60070 59925 #ifdef FEAT_VIMINFO 60071 @@ -1627,12 +163 4,55 @@59926 @@ -1627,12 +1635,55 @@ 60072 59927 char_u *b_p_dict; /* 'dictionary' local value */ 60073 59928 char_u *b_p_tsr; /* 'thesaurus' local value */ … … 60125 59980 * write should not have an end-of-line */ 60126 59981 60127 @@ -1927,7 +197 7,6 @@59982 @@ -1927,7 +1978,6 @@ 60128 59983 time through cursupdate() to the 60129 59984 current virtual column */ … … 60133 59988 * the next six are used to update the visual part 60134 59989 */ 60135 @@ -1938,7 +198 7,6 @@59990 @@ -1938,7 +1988,6 @@ 60136 59991 linenr_T w_old_visual_lnum; /* last known start of visual part */ 60137 59992 colnr_T w_old_visual_col; /* last known start of visual part */ … … 60141 59996 /* 60142 59997 * "w_topline", "w_leftcol" and "w_skipcol" specify the offsets for 60143 @@ -2240,10 +228 8,8 @@59998 @@ -2240,10 +2289,8 @@ 60144 59999 (inclusive) */ 60145 60000 int empty; /* op_start and op_end the same (only used by … … 60154 60009 diff -Naur vim74.orig/src/syntax.c vim74/src/syntax.c 60155 60010 --- vim74.orig/src/syntax.c 2013-06-08 14:10:08.000000000 +0000 60156 +++ vim74/src/syntax.c 2014-0 4-27 05:20:58.378441790+000060011 +++ vim74/src/syntax.c 2014-06-01 00:43:18.047470354 +0000 60157 60012 @@ -6837,10 +6837,8 @@ 60158 60013 CENT("SignColumn term=standout ctermbg=Grey ctermfg=DarkBlue", … … 60188 60043 diff -Naur vim74.orig/src/tag.c vim74/src/tag.c 60189 60044 --- vim74.orig/src/tag.c 2013-06-15 20:26:26.000000000 +0000 60190 +++ vim74/src/tag.c 2014-0 4-27 05:20:58.381775206+000060045 +++ vim74/src/tag.c 2014-06-01 00:43:18.100803551 +0000 60191 60046 @@ -741,8 +741,10 @@ 60192 60047 break; … … 60263 60118 diff -Naur vim74.orig/src/term.c vim74/src/term.c 60264 60119 --- 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 @@ 60267 60188 * it must be called immediately after entering termcap mode. 60268 60189 */ … … 60273 60194 if (u7_status == U7_GET 60274 60195 && cur_tmode == TMODE_RAW 60275 @@ -3379,7 +3 379,8 @@60196 @@ -3379,7 +3408,8 @@ 60276 60197 out_str(buf); 60277 60198 out_str(T_U7); … … 60283 60204 term_windgoto(0, 0); 60284 60205 /* check for the characters now, otherwise they might be eaten by 60285 @@ -3455,12 +34 56,9 @@60206 @@ -3455,12 +3485,9 @@ 60286 60207 return; 60287 60208 } … … 60297 60218 else if (State & INSERT) 60298 60219 checkfor = MOUSE_INSERT; 60299 @@ -4185,24 +4 183,38 @@60220 @@ -4185,24 +4212,38 @@ 60300 60221 || (tp[0] == CSI && len >= 2)) 60301 60222 && (VIM_ISDIGIT(*p) || *p == '>' || *p == '?')) … … 60341 60262 char *aw = NULL; 60342 60263 60343 @@ -4211,18 +42 23,16 @@60264 @@ -4211,18 +4252,16 @@ 60344 60265 # ifdef FEAT_AUTOCMD 60345 60266 did_cursorhold = TRUE; … … 60363 60284 char buf[100]; 60364 60285 int r = redraw_asap(CLEAR); 60365 @@ -4231,9 +42 41,9 @@60286 @@ -4231,9 +4270,9 @@ 60366 60287 r); 60367 60288 log_tr(buf); … … 60375 60296 key_name[0] = (int)KS_EXTRA; 60376 60297 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 { 60377 60308 diff -Naur vim74.orig/src/testdir/Make_amiga.mak vim74/src/testdir/Make_amiga.mak 60378 60309 --- vim74.orig/src/testdir/Make_amiga.mak 2013-07-09 11:40:02.000000000 +0000 60379 +++ vim74/src/testdir/Make_amiga.mak 2014-0 4-27 05:20:58.385108623+000060380 @@ -33,7 +33,1 1@@60310 +++ vim74/src/testdir/Make_amiga.mak 2014-06-01 00:43:18.240803195 +0000 60311 @@ -33,7 +33,12 @@ 60381 60312 test76.out test77.out test78.out test79.out test80.out \ 60382 60313 test81.out test82.out test83.out test84.out test88.out \ … … 60385 60316 + test94.out test95.out test96.out test97.out test98.out \ 60386 60317 + 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 \ 60388 60320 + test_eval.out \ 60389 60321 + test_options.out … … 60391 60323 .SUFFIXES: .in .out 60392 60324 60393 @@ -148,3 +15 2,13@@60325 @@ -148,3 +153,15 @@ 60394 60326 test96.out: test96.in 60395 60327 test97.out: test97.in … … 60403 60335 +test105.out: test105.in 60404 60336 +test106.out: test106.in 60337 +test107.out: test107.in 60338 +test_autoformat_join.out: test_autoformat_join.in 60405 60339 +test_eval.out: test_eval.in 60406 60340 +test_options.out: test_options.in 60407 60341 diff -Naur vim74.orig/src/testdir/Make_dos.mak vim74/src/testdir/Make_dos.mak 60408 60342 --- vim74.orig/src/testdir/Make_dos.mak 2013-07-09 11:40:30.000000000 +0000 60409 +++ vim74/src/testdir/Make_dos.mak 2014-0 4-27 05:20:58.385108623+000060410 @@ -32,7 +32,1 1@@60343 +++ vim74/src/testdir/Make_dos.mak 2014-06-01 00:43:18.240803195 +0000 60344 @@ -32,7 +32,12 @@ 60411 60345 test79.out test80.out test81.out test82.out test83.out \ 60412 60346 test84.out test85.out test86.out test87.out test88.out \ … … 60415 60349 + test94.out test95.out test96.out test98.out test99.out \ 60416 60350 + 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 \ 60418 60353 + test_eval.out \ 60419 60354 + test_options.out … … 60423 60358 diff -Naur vim74.orig/src/testdir/Make_ming.mak vim74/src/testdir/Make_ming.mak 60424 60359 --- vim74.orig/src/testdir/Make_ming.mak 2013-07-09 11:40:38.000000000 +0000 60425 +++ vim74/src/testdir/Make_ming.mak 2014-0 4-27 05:20:58.385108623+000060426 @@ -52,7 +52,1 1@@60360 +++ vim74/src/testdir/Make_ming.mak 2014-06-01 00:43:18.244136520 +0000 60361 @@ -52,7 +52,12 @@ 60427 60362 test79.out test80.out test81.out test82.out test83.out \ 60428 60363 test84.out test85.out test86.out test87.out test88.out \ … … 60431 60366 + test94.out test95.out test96.out test98.out test99.out \ 60432 60367 + 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 \ 60434 60370 + test_eval.out \ 60435 60371 + test_options.out … … 60439 60375 diff -Naur vim74.orig/src/testdir/Make_os2.mak vim74/src/testdir/Make_os2.mak 60440 60376 --- vim74.orig/src/testdir/Make_os2.mak 2013-07-09 11:40:43.000000000 +0000 60441 +++ vim74/src/testdir/Make_os2.mak 2014-0 4-27 05:20:58.385108623+000060442 @@ -34,7 +34,1 1@@60377 +++ vim74/src/testdir/Make_os2.mak 2014-06-01 00:43:18.244136520 +0000 60378 @@ -34,7 +34,12 @@ 60443 60379 test76.out test77.out test78.out test79.out test80.out \ 60444 60380 test81.out test82.out test83.out test84.out test88.out \ … … 60447 60383 + test94.out test95.out test96.out test98.out test99.out \ 60448 60384 + 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 \ 60450 60387 + test_eval.out \ 60451 60388 + test_options.out … … 60455 60392 diff -Naur vim74.orig/src/testdir/Make_vms.mms vim74/src/testdir/Make_vms.mms 60456 60393 --- vim74.orig/src/testdir/Make_vms.mms 2013-07-09 11:40:47.000000000 +0000 60457 +++ vim74/src/testdir/Make_vms.mms 2014-0 4-27 05:20:58.385108623+000060394 +++ vim74/src/testdir/Make_vms.mms 2014-06-01 00:43:18.247469845 +0000 60458 60395 @@ -4,7 +4,7 @@ 60459 60396 # Authors: Zoltan Arpadffy, <arpadffy@polarhome.com> … … 60461 60398 # 60462 60399 -# Last change: 2013 Jul 09 60463 +# Last change: 2014 Ma r 1260400 +# Last change: 2014 May 28 60464 60401 # 60465 60402 # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64. … … 60498 60435 # End of configuration section. 60499 60436 # 60500 @@ -63,35 +78,4 6@@60437 @@ -63,35 +78,47 @@ 60501 60438 60502 60439 SCRIPT = test1.out test2.out test3.out test4.out test5.out \ … … 60525 60462 + test95.out test96.out test98.out test99.out \ 60526 60463 + 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 \ 60528 60466 + test_eval.out \ 60529 60467 + test_options.out … … 60556 60494 .IFDEF WANT_GUI 60557 60495 SCRIPT_GUI = test16.out 60558 @@ -99,7 +12 5,7 @@60496 @@ -99,7 +126,7 @@ 60559 60497 .ENDIF 60560 60498 … … 60565 60503 60566 60504 .IFDEF WANT_WIN 60567 @@ -114,6 +14 0,10 @@60505 @@ -114,6 +141,10 @@ 60568 60506 SCRIPT_MZSCH = test70.out 60569 60507 .ENDIF … … 60576 60514 SCRIPT_GZIP = test11.out 60577 60515 .ENDIF 60578 @@ -122,10 +15 2,28 @@60516 @@ -122,10 +153,28 @@ 60579 60517 SCRIPT_GDIFF = test47.out 60580 60518 .ENDIF … … 60605 60543 -@ write sys$output "-----------------------------------------------" 60606 60544 -@ write sys$output " "$*" " 60607 @@ -138,9 +18 6,10 @@60545 @@ -138,9 +187,10 @@ 60608 60546 -@ if "''F$SEARCH("$*.out.*")'" .NES. "" then differences /par $*.out $*.ok; 60609 60547 -@ !clean up after the test … … 60618 60556 -@ write sys$output "-----------------------------------------------" 60619 60557 -@ write sys$output " All done" 60620 @@ -163,13 +21 2,18 @@60558 @@ -163,13 +213,18 @@ 60621 60559 -@ write sys$output " Test results:" 60622 60560 -@ write sys$output "-----------------------------------------------" … … 60644 60582 -@ write sys$output "-----------------------------------------------" 60645 60583 -@ type VMS.VIM 60646 @@ -179,6 +23 3,9 @@60584 @@ -179,6 +234,9 @@ 60647 60585 -@ if "''F$SEARCH("test.log")'" .NES. "" then delete/noconfirm/nolog test.log.* 60648 60586 -@ if "''F$SEARCH("test.ok")'" .NES. "" then delete/noconfirm/nolog test.ok.* … … 60654 60592 -@ if "''F$SEARCH("*.failed")'" .NES. "" then delete/noconfirm/nolog *.failed.* 60655 60593 -@ if "''F$SEARCH("*.rej")'" .NES. "" then delete/noconfirm/nolog *.rej.* 60656 @@ -186,6 +24 3,6 @@60594 @@ -186,6 +244,6 @@ 60657 60595 -@ if "''F$SEARCH("small.vim")'" .NES. "" then delete/noconfirm/nolog small.vim.* 60658 60596 -@ if "''F$SEARCH("mbyte.vim")'" .NES. "" then delete/noconfirm/nolog mbyte.vim.* … … 60664 60602 diff -Naur vim74.orig/src/testdir/Makefile vim74/src/testdir/Makefile 60665 60603 --- vim74.orig/src/testdir/Makefile 2013-08-10 12:20:20.000000000 +0000 60666 +++ vim74/src/testdir/Makefile 2014-0 4-27 05:20:58.385108623+000060604 +++ vim74/src/testdir/Makefile 2014-06-01 00:43:18.250803169 +0000 60667 60605 @@ -3,6 +3,7 @@ 60668 60606 # … … 60673 60611 # Uncomment this line to use valgrind for memory leaks and extra warnings. 60674 60612 # The output goes into a file "valgrind.testN" 60675 @@ -29,7 +30,1 0@@60613 @@ -29,7 +30,12 @@ 60676 60614 test79.out test80.out test81.out test82.out test83.out \ 60677 60615 test84.out test85.out test86.out test87.out test88.out \ … … 60680 60618 + test94.out test95.out test96.out test97.out test98.out \ 60681 60619 + 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 \ 60683 60623 + test_options.out 60684 60624 60685 60625 SCRIPTS_GUI = test16.out 60686 60626 60687 @@ -51,15 +5 5,19 @@60627 @@ -51,15 +57,19 @@ 60688 60628 60689 60629 RM_ON_RUN = test.out X* viminfo 60690 60630 RM_ON_START = tiny.vim small.vim mbyte.vim mzscheme.vim lua.vim test.ok 60691 60631 -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.in60632 +RUN_VIM = VIMRUNTIME=$(SCRIPTSOURCE); export VIMRUNTIME; $(VALGRIND) $(VIMPROG) -u unix.vim -U NONE --noplugin -s dotest.in 60693 60633 60694 60634 clean: … … 60710 60650 diff -Naur vim74.orig/src/testdir/sautest/autoload/Test104.vim vim74/src/testdir/sautest/autoload/Test104.vim 60711 60651 --- 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-0 4-27 05:20:58.391775454+000060652 +++ vim74/src/testdir/sautest/autoload/Test104.vim 2014-06-01 00:43:18.450802660 +0000 60713 60653 @@ -0,0 +1 @@ 60714 60654 +let Test104#numvar = 123 60715 60655 diff -Naur vim74.orig/src/testdir/sautest/autoload/footest.vim vim74/src/testdir/sautest/autoload/footest.vim 60716 60656 --- 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-0 4-27 05:20:58.391775454+000060657 +++ vim74/src/testdir/sautest/autoload/footest.vim 2014-06-01 00:43:18.464135959 +0000 60718 60658 @@ -0,0 +1,5 @@ 60719 60659 +" Autoload script used by test55 and test60 … … 60724 60664 diff -Naur vim74.orig/src/testdir/test1.in vim74/src/testdir/test1.in 60725 60665 --- vim74.orig/src/testdir/test1.in 2012-04-05 14:37:37.000000000 +0000 60726 +++ vim74/src/testdir/test1.in 2014-0 4-27 05:20:58.391775454+000060666 +++ vim74/src/testdir/test1.in 2014-06-01 00:43:18.470802609 +0000 60727 60667 @@ -18,6 +18,10 @@ 60728 60668 Similar logic is applied to the +lua feature, using lua.vim. … … 60738 60678 diff -Naur vim74.orig/src/testdir/test100.in vim74/src/testdir/test100.in 60739 60679 --- vim74.orig/src/testdir/test100.in 1970-01-01 00:00:00.000000000 +0000 60740 +++ vim74/src/testdir/test100.in 2014-0 4-27 05:20:58.395108870+000060680 +++ vim74/src/testdir/test100.in 2014-06-01 00:43:18.517469157 +0000 60741 60681 @@ -0,0 +1,50 @@ 60742 60682 +Tests for 'undolevel' and 'lispwords' settings being global-local … … 60792 60732 diff -Naur vim74.orig/src/testdir/test100.ok vim74/src/testdir/test100.ok 60793 60733 --- vim74.orig/src/testdir/test100.ok 1970-01-01 00:00:00.000000000 +0000 60794 +++ vim74/src/testdir/test100.ok 2014-0 4-27 05:20:58.395108870+000060734 +++ vim74/src/testdir/test100.ok 2014-06-01 00:43:18.517469157 +0000 60795 60735 @@ -0,0 +1,51 @@ 60796 60736 +ONE: expecting global undolevels: 5, local undolevels: -123456 (default) … … 60847 60787 diff -Naur vim74.orig/src/testdir/test101.in vim74/src/testdir/test101.in 60848 60788 --- vim74.orig/src/testdir/test101.in 1970-01-01 00:00:00.000000000 +0000 60849 +++ vim74/src/testdir/test101.in 2014-0 4-27 05:20:58.395108870+000060789 +++ vim74/src/testdir/test101.in 2014-06-01 00:43:18.540802431 +0000 60850 60790 @@ -0,0 +1,45 @@ 60851 60791 +Test for v:hlsearch vim: set ft=vim : … … 60896 60836 diff -Naur vim74.orig/src/testdir/test101.ok vim74/src/testdir/test101.ok 60897 60837 --- vim74.orig/src/testdir/test101.ok 1970-01-01 00:00:00.000000000 +0000 60898 +++ vim74/src/testdir/test101.ok 2014-0 4-27 05:20:58.395108870+000060838 +++ vim74/src/testdir/test101.ok 2014-06-01 00:43:18.544135756 +0000 60899 60839 @@ -0,0 +1,11 @@ 60900 60840 +start: … … 60911 60851 diff -Naur vim74.orig/src/testdir/test102.in vim74/src/testdir/test102.in 60912 60852 --- vim74.orig/src/testdir/test102.in 1970-01-01 00:00:00.000000000 +0000 60913 +++ vim74/src/testdir/test102.in 2014-0 4-27 05:20:58.395108870+000060853 +++ vim74/src/testdir/test102.in 2014-06-01 00:43:18.557469055 +0000 60914 60854 @@ -0,0 +1,12 @@ 60915 60855 +Test if fnameescape is correct for special chars like ! … … 60927 60867 diff -Naur vim74.orig/src/testdir/test102.ok vim74/src/testdir/test102.ok 60928 60868 --- vim74.orig/src/testdir/test102.ok 1970-01-01 00:00:00.000000000 +0000 60929 +++ vim74/src/testdir/test102.ok 2014-0 4-27 05:20:58.395108870 +000060869 +++ vim74/src/testdir/test102.ok 2014-06-01 00:43:18.560802380 +0000 60930 60870 @@ -0,0 +1,3 @@ 60931 60871 + … … 60934 60874 diff -Naur vim74.orig/src/testdir/test103.in vim74/src/testdir/test103.in 60935 60875 --- vim74.orig/src/testdir/test103.in 1970-01-01 00:00:00.000000000 +0000 60936 +++ vim74/src/testdir/test103.in 2014-0 4-27 05:20:58.395108870+000060876 +++ vim74/src/testdir/test103.in 2014-06-01 00:43:18.574135679 +0000 60937 60877 @@ -0,0 +1,37 @@ 60938 60878 +Test for visual mode not being reset causing E315 error. … … 60975 60915 diff -Naur vim74.orig/src/testdir/test103.ok vim74/src/testdir/test103.ok 60976 60916 --- vim74.orig/src/testdir/test103.ok 1970-01-01 00:00:00.000000000 +0000 60977 +++ vim74/src/testdir/test103.ok 2014-0 4-27 05:20:58.395108870+000060917 +++ vim74/src/testdir/test103.ok 2014-06-01 00:43:18.590802304 +0000 60978 60918 @@ -0,0 +1,2 @@ 60979 60919 + … … 60981 60921 diff -Naur vim74.orig/src/testdir/test104.in vim74/src/testdir/test104.in 60982 60922 --- vim74.orig/src/testdir/test104.in 1970-01-01 00:00:00.000000000 +0000 60983 +++ vim74/src/testdir/test104.in 2014-0 4-27 05:20:58.395108870+000060923 +++ vim74/src/testdir/test104.in 2014-06-01 00:43:18.600802278 +0000 60984 60924 @@ -0,0 +1,30 @@ 60985 60925 +Tests for :let. vim: set ft=vim ts=8 : … … 61015 60955 diff -Naur vim74.orig/src/testdir/test104.ok vim74/src/testdir/test104.ok 61016 60956 --- vim74.orig/src/testdir/test104.ok 1970-01-01 00:00:00.000000000 +0000 61017 +++ vim74/src/testdir/test104.ok 2014-0 4-27 05:20:58.395108870+000060957 +++ vim74/src/testdir/test104.ok 2014-06-01 00:43:18.614135578 +0000 61018 60958 @@ -0,0 +1,13 @@ 61019 60959 +Results of test104: … … 61032 60972 diff -Naur vim74.orig/src/testdir/test105.in vim74/src/testdir/test105.in 61033 60973 --- vim74.orig/src/testdir/test105.in 1970-01-01 00:00:00.000000000 +0000 61034 +++ vim74/src/testdir/test105.in 2014-0 4-27 05:20:58.395108870+000060974 +++ vim74/src/testdir/test105.in 2014-06-01 00:43:18.620802227 +0000 61035 60975 @@ -0,0 +1,45 @@ 61036 60976 +Test filename modifiers vim: set ft=vim : … … 61081 61021 diff -Naur vim74.orig/src/testdir/test105.ok vim74/src/testdir/test105.ok 61082 61022 --- vim74.orig/src/testdir/test105.ok 1970-01-01 00:00:00.000000000 +0000 61083 +++ vim74/src/testdir/test105.ok 2014-0 4-27 05:20:58.398442287 +000061023 +++ vim74/src/testdir/test105.ok 2014-06-01 00:43:18.627468877 +0000 61084 61024 @@ -0,0 +1,29 @@ 61085 61025 +fnamemodify('.', ':p' )[-1:] '/' … … 61114 61054 diff -Naur vim74.orig/src/testdir/test106.in vim74/src/testdir/test106.in 61115 61055 --- vim74.orig/src/testdir/test106.in 1970-01-01 00:00:00.000000000 +0000 61116 +++ vim74/src/testdir/test106.in 2014-0 4-27 05:20:58.398442287+000061056 +++ vim74/src/testdir/test106.in 2014-06-01 00:43:18.644135501 +0000 61117 61057 @@ -0,0 +1,16 @@ 61118 61058 +Tests for errorformat. vim: set ft=vim ts=8 : … … 61134 61074 diff -Naur vim74.orig/src/testdir/test106.ok vim74/src/testdir/test106.ok 61135 61075 --- vim74.orig/src/testdir/test106.ok 1970-01-01 00:00:00.000000000 +0000 61136 +++ vim74/src/testdir/test106.ok 2014-0 4-27 05:20:58.398442287+000061076 +++ vim74/src/testdir/test106.ok 2014-06-01 00:43:18.657468801 +0000 61137 61077 @@ -0,0 +1,4 @@ 61138 61078 +Results of test106: … … 61140 61080 +[['W', 1], ['E^@CCCC', 1]] 61141 61081 +[['W', 1], ['ZZZZ', 0], ['E^@CCCC', 1], ['YYYY', 0]] 61082 diff -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: 61124 diff -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 '] 61142 61132 diff -Naur vim74.orig/src/testdir/test14.in vim74/src/testdir/test14.in 61143 61133 --- vim74.orig/src/testdir/test14.in 2013-04-03 18:59:14.000000000 +0000 61144 +++ vim74/src/testdir/test14.in 2014-0 4-27 05:20:58.398442287+000061134 +++ vim74/src/testdir/test14.in 2014-06-01 00:43:18.754135221 +0000 61145 61135 @@ -47,7 +47,19 @@ 61146 61136 /two … … 61174 61164 diff -Naur vim74.orig/src/testdir/test14.ok vim74/src/testdir/test14.ok 61175 61165 --- vim74.orig/src/testdir/test14.ok 2013-04-03 18:59:14.000000000 +0000 61176 +++ vim74/src/testdir/test14.ok 2014-0 4-27 05:20:58.398442287+000061166 +++ vim74/src/testdir/test14.ok 2014-06-01 00:43:18.767468520 +0000 61177 61167 @@ -20,3 +20,7 @@ 61178 61168 1 … … 61185 61175 diff -Naur vim74.orig/src/testdir/test20.in vim74/src/testdir/test20.in 61186 61176 --- vim74.orig/src/testdir/test20.in 2010-05-15 11:04:10.000000000 +0000 61187 +++ vim74/src/testdir/test20.in 2014-0 4-27 05:20:58.401775704+000061177 +++ vim74/src/testdir/test20.in 2014-06-01 00:43:18.927468113 +0000 61188 61178 @@ -9,11 +9,17 @@ 61189 61179 @auY:quit! … … 61208 61198 diff -Naur vim74.orig/src/testdir/test20.ok vim74/src/testdir/test20.ok 61209 61199 --- vim74.orig/src/testdir/test20.ok 2010-05-15 11:04:10.000000000 +0000 61210 +++ vim74/src/testdir/test20.ok 2014-0 4-27 05:20:58.401775704+000061200 +++ vim74/src/testdir/test20.ok 2014-06-01 00:43:18.940801412 +0000 61211 61201 @@ -1,3 +1,7 @@ 61212 61202 +123start here56 … … 61217 61207 somext 61218 61208 tesext 61209 diff -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:*/,:// 61247 diff -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. */ 61219 61266 diff -Naur vim74.orig/src/testdir/test32.in vim74/src/testdir/test32.in 61220 61267 --- vim74.orig/src/testdir/test32.in 2010-05-15 11:04:10.000000000 +0000 61221 +++ vim74/src/testdir/test32.in 2014-0 4-27 05:20:58.408442535+000061268 +++ vim74/src/testdir/test32.in 2014-06-01 00:43:19.207467400 +0000 61222 61269 @@ -36,6 +36,9 @@ 61223 61270 :w Xtest11.one … … 61232 61279 diff -Naur vim74.orig/src/testdir/test34.in vim74/src/testdir/test34.in 61233 61280 --- vim74.orig/src/testdir/test34.in 2012-07-16 14:51:29.000000000 +0000 61234 +++ vim74/src/testdir/test34.in 2014-0 4-27 05:20:58.411775950+000061281 +++ vim74/src/testdir/test34.in 2014-06-01 00:43:19.244133973 +0000 61235 61282 @@ -1,6 +1,7 @@ 61236 61283 Test for user functions. … … 61262 61309 diff -Naur vim74.orig/src/testdir/test34.ok vim74/src/testdir/test34.ok 61263 61310 --- vim74.orig/src/testdir/test34.ok 2012-07-16 14:43:15.000000000 +0000 61264 +++ vim74/src/testdir/test34.ok 2014-0 4-27 05:20:58.411775950+000061311 +++ vim74/src/testdir/test34.ok 2014-06-01 00:43:19.250800623 +0000 61265 61312 @@ -6,3 +6,5 @@ 61266 61313 1. one again … … 61271 61318 diff -Naur vim74.orig/src/testdir/test37.ok vim74/src/testdir/test37.ok 61272 61319 --- vim74.orig/src/testdir/test37.ok 2010-05-15 11:04:10.000000000 +0000 61273 +++ vim74/src/testdir/test37.ok 2014-0 4-27 05:20:58.411775950+000061320 +++ vim74/src/testdir/test37.ok 2014-06-01 00:43:19.300800496 +0000 61274 61321 @@ -27,7 +27,7 @@ 61275 61322 … … 61285 61332 diff -Naur vim74.orig/src/testdir/test39.in vim74/src/testdir/test39.in 61286 61333 --- vim74.orig/src/testdir/test39.in 2013-03-07 17:30:38.000000000 +0000 61287 +++ vim74/src/testdir/test39.in 2014-0 4-27 05:20:58.415109367+000061334 +++ vim74/src/testdir/test39.in 2014-06-01 00:43:19.330800419 +0000 61288 61335 @@ -19,6 +19,28 @@ 61289 61336 :" Test block-change … … 61357 61404 diff -Naur vim74.orig/src/testdir/test39.ok vim74/src/testdir/test39.ok 61358 61405 --- vim74.orig/src/testdir/test39.ok 2013-03-07 17:28:51.000000000 +0000 61359 +++ vim74/src/testdir/test39.ok 2014-0 4-27 05:20:58.415109367+000061406 +++ vim74/src/testdir/test39.ok 2014-06-01 00:43:19.334133744 +0000 61360 61407 @@ -3,6 +3,24 @@ 61361 61408 axyzqqqqef mno ghijklm … … 61411 61458 diff -Naur vim74.orig/src/testdir/test44.in vim74/src/testdir/test44.in 61412 61459 --- vim74.orig/src/testdir/test44.in 2013-05-26 12:16:31.000000000 +0000 61413 +++ vim74/src/testdir/test44.in 2014-0 4-27 05:20:58.418442783+000061460 +++ vim74/src/testdir/test44.in 2014-06-01 00:43:19.467466738 +0000 61414 61461 @@ -1,9 +1,11 @@ 61415 61462 Tests for regexp with multi-byte encoding and various magic settings. … … 61424 61471 /a*b\{2}c\+/e 61425 61472 x/\Md\*e\{2}f\+/e 61473 diff -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 61426 61485 diff -Naur vim74.orig/src/testdir/test53.in vim74/src/testdir/test53.in 61427 61486 --- vim74.orig/src/testdir/test53.in 2013-06-30 12:31:56.000000000 +0000 61428 +++ vim74/src/testdir/test53.in 2014-0 4-27 05:20:58.421776200+000061487 +++ vim74/src/testdir/test53.in 2014-06-01 00:43:19.714132776 +0000 61429 61488 @@ -4,6 +4,8 @@ 61430 61489 … … 61500 61559 diff -Naur vim74.orig/src/testdir/test53.ok vim74/src/testdir/test53.ok 61501 61560 --- vim74.orig/src/testdir/test53.ok 2013-06-30 12:31:56.000000000 +0000 61502 +++ vim74/src/testdir/test53.ok 2014-0 4-27 05:20:58.425109616 +000061561 +++ vim74/src/testdir/test53.ok 2014-06-01 00:43:19.720799426 +0000 61503 61562 @@ -18,6 +18,28 @@ 61504 61563 a … … 61549 61608 diff -Naur vim74.orig/src/testdir/test55.in vim74/src/testdir/test55.in 61550 61609 --- vim74.orig/src/testdir/test55.in 2013-03-07 13:33:12.000000000 +0000 61551 +++ vim74/src/testdir/test55.in 2014-0 4-27 05:20:58.425109616+000061610 +++ vim74/src/testdir/test55.in 2014-06-01 00:43:19.757465999 +0000 61552 61611 @@ -282,6 +282,13 @@ 61553 61612 : $put =ps … … 61584 61643 diff -Naur vim74.orig/src/testdir/test55.ok vim74/src/testdir/test55.ok 61585 61644 --- vim74.orig/src/testdir/test55.ok 2012-08-29 14:51:15.000000000 +0000 61586 +++ vim74/src/testdir/test55.ok 2014-0 4-27 05:20:58.425109616+000061645 +++ vim74/src/testdir/test55.ok 2014-06-01 00:43:19.767465974 +0000 61587 61646 @@ -86,16 +86,21 @@ 61588 61647 FFpFFpp … … 61614 61673 diff -Naur vim74.orig/src/testdir/test60.in vim74/src/testdir/test60.in 61615 61674 --- vim74.orig/src/testdir/test60.in 2010-05-15 11:04:10.000000000 +0000 61616 +++ vim74/src/testdir/test60.in 2014-0 4-27 05:20:58.428443032 +000061675 +++ vim74/src/testdir/test60.in 2014-06-01 00:43:19.904132292 +0000 61617 61676 @@ -1,4 +1,4 @@ 61618 61677 -Tests for the exists() function. vim: set ft=vim : … … 61698 61757 diff -Naur vim74.orig/src/testdir/test60.ok vim74/src/testdir/test60.ok 61699 61758 --- vim74.orig/src/testdir/test60.ok 2010-05-15 11:04:10.000000000 +0000 61700 +++ vim74/src/testdir/test60.ok 2014-0 4-27 05:20:58.428443032+000061759 +++ vim74/src/testdir/test60.ok 2014-06-01 00:43:19.930798891 +0000 61701 61760 @@ -71,6 +71,10 @@ 61702 61761 OK … … 61731 61790 +has patch 9.1.0: 0 61732 61791 +has patch 9.9.1: 0 61792 diff -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() 61733 61803 diff -Naur vim74.orig/src/testdir/test64.in vim74/src/testdir/test64.in 61734 61804 --- 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 @@ 61737 61820 :call add(tl, [2, '.a\%$', " a\n "]) 61738 61821 :call add(tl, [2, '.a\%$', " a\n_a", "_a"]) … … 61773 61856 :" 61774 61857 :"""" Tests for \z features 61775 @@ -314,6 +3 28,7 @@61858 @@ -314,6 +332,7 @@ 61776 61859 :call add(tl, [2, 'abc \zsmatch\ze abc', 'abc abc abc match abc abc', 'match']) 61777 61860 :call add(tl, [2, '\v(a \zsif .*){2}', 'a if then a if last', 'if last', 'a if last']) … … 61781 61864 :"""" Tests for \@= and \& features 61782 61865 :call add(tl, [2, 'abc\@=', 'abc', 'ab']) 61783 @@ -358,6 +37 3,7 @@61866 @@ -358,6 +377,7 @@ 61784 61867 :call add(tl, [2, '\%x20', 'yes no', ' ']) 61785 61868 :call add(tl, [2, '\%u0020', 'yes no', ' ']) … … 61789 61872 :""""" \%[abc] 61790 61873 :call add(tl, [2, 'foo\%[bar]', 'fobar']) 61791 @@ -390,6 +4 06,7@@61874 @@ -390,6 +410,8 @@ 61792 61875 :call add(tl, [2, '^.*\.\(.*\)/.\+\(\1\)\@<!$', 'foo.bat/foo.bat']) 61793 61876 :call add(tl, [2, '^.*\.\(.*\)/.\+\(\1\)\@<=$', 'foo.bat/foo.bat', 'foo.bat/foo.bat', 'bat', 'bat']) 61794 61877 :call add(tl, [2, '\\\@<!\${\(\d\+\%(:.\{-}\)\?\\\@<!\)}', '2013-06-27${0}', '${0}', '0']) 61795 61878 +:call add(tl, [2, '^\(a*\)\1$', 'aaaaaaaa', 'aaaaaaaa', 'aaaa']) 61879 +:call add(tl, [2, '^\(a\{-2,}\)\1\+$', 'aaaaaaaaa', 'aaaaaaaaa', 'aaa']) 61796 61880 :" 61797 61881 :"""" Look-behind with limit 61798 61882 :call add(tl, [2, '<\@<=span.', 'xxspanxx<spanyyy', 'spany']) 61799 @@ -407,9 +42 4,15 @@61883 @@ -407,9 +429,15 @@ 61800 61884 :call add(tl, [2, '\(foo\)\@<=\>', 'barfoo', '', 'foo']) 61801 61885 :call add(tl, [2, '\(foo\)\@<=.*', 'foobar', 'bar', 'foo']) … … 61813 61897 :call add(tl, [1, '\(a*\)\@>a\|a\+', 'aaaa', 'aaaa']) 61814 61898 :" 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 @@ 61816 61929 :" Check a pattern with a line break and ^ and $ 61817 61930 :call add(tl, [2, 'a\n^b$\n^c', ['a', 'b', 'c'], ['XX']]) … … 61824 61937 diff -Naur vim74.orig/src/testdir/test64.ok vim74/src/testdir/test64.ok 61825 61938 --- 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 @@ 61828 61960 OK 0 - .a\%$ 61829 61961 OK 1 - .a\%$ … … 61916 62048 OK 1 - \C[^A-Z]\+ 61917 62049 OK 2 - \C[^A-Z]\+ 61918 @@ -710,6 +7 52,9 @@62050 @@ -710,6 +764,9 @@ 61919 62051 OK 0 - \>\zs. 61920 62052 OK 1 - \>\zs. … … 61926 62058 OK 1 - abc\@= 61927 62059 OK 2 - abc\@= 61928 @@ -818,6 +8 63,9 @@62060 @@ -818,6 +875,9 @@ 61929 62061 OK 0 - \%U00000020 61930 62062 OK 1 - \%U00000020 … … 61936 62068 OK 1 - foo\%[bar] 61937 62069 OK 2 - foo\%[bar] 61938 @@ -896,6 +9 44,9@@62070 @@ -896,6 +956,12 @@ 61939 62071 OK 0 - \\\@<!\${\(\d\+\%(:.\{-}\)\?\\\@<!\)} 61940 62072 OK 1 - \\\@<!\${\(\d\+\%(:.\{-}\)\?\\\@<!\)} … … 61943 62075 +OK 1 - ^\(a*\)\1$ 61944 62076 +OK 2 - ^\(a*\)\1$ 62077 +OK 0 - ^\(a\{-2,}\)\1\+$ 62078 +OK 1 - ^\(a\{-2,}\)\1\+$ 62079 +OK 2 - ^\(a\{-2,}\)\1\+$ 61945 62080 OK 0 - <\@<=span. 61946 62081 OK 1 - <\@<=span. 61947 62082 OK 2 - <\@<=span. 61948 @@ -932,12 +9 83,24 @@62083 @@ -932,12 +998,24 @@ 61949 62084 OK 0 - \(foo\)\@<=.* 61950 62085 OK 1 - \(foo\)\@<=.* … … 61971 62106 OK 2 - \(a*\)\@>a\|a\+ 61972 62107 OK 0 - \_[^8-9]\+ 61973 @@ -968,6 +10 31,9 @@62108 @@ -968,6 +1046,9 @@ 61974 62109 OK 0 - a\n^b$\n^c 61975 62110 OK 1 - a\n^b$\n^c … … 61983 62118 diff -Naur vim74.orig/src/testdir/test68.in vim74/src/testdir/test68.in 61984 62119 --- vim74.orig/src/testdir/test68.in 2012-07-25 13:57:06.000000000 +0000 61985 +++ vim74/src/testdir/test68.in 2014-0 4-27 05:20:58.435109863+000062120 +++ vim74/src/testdir/test68.in 2014-06-01 00:43:20.107465108 +0000 61986 62121 @@ -62,6 +62,20 @@ 61987 62122 } … … 62007 62142 diff -Naur vim74.orig/src/testdir/test68.ok vim74/src/testdir/test68.ok 62008 62143 --- vim74.orig/src/testdir/test68.ok 2012-07-25 14:03:05.000000000 +0000 62009 +++ vim74/src/testdir/test68.ok 2014-0 4-27 05:20:58.435109863 +000062144 +++ vim74/src/testdir/test68.ok 2014-06-01 00:43:20.117465083 +0000 62010 62145 @@ -43,6 +43,15 @@ 62011 62146 … … 62026 62161 diff -Naur vim74.orig/src/testdir/test69.in vim74/src/testdir/test69.in 62027 62162 --- vim74.orig/src/testdir/test69.in 2013-03-07 17:30:50.000000000 +0000 62028 +++ vim74/src/testdir/test69.in 2014-0 4-27 05:20:58.435109863+000062163 +++ vim74/src/testdir/test69.in 2014-06-01 00:43:20.130798382 +0000 62029 62164 @@ -1,6 +1,7 @@ 62030 62165 Test for multi-byte text formatting. … … 62069 62204 diff -Naur vim74.orig/src/testdir/test69.ok vim74/src/testdir/test69.ok 62070 62205 --- vim74.orig/src/testdir/test69.ok 2013-03-07 17:31:32.000000000 +0000 62071 +++ vim74/src/testdir/test69.ok 2014-0 4-27 05:20:58.435109863+000062206 +++ vim74/src/testdir/test69.ok 2014-06-01 00:43:20.137465032 +0000 62072 62207 @@ -149,3 +149,14 @@ 62073 62208 aaaa … … 62087 62222 diff -Naur vim74.orig/src/testdir/test72.in vim74/src/testdir/test72.in 62088 62223 --- vim74.orig/src/testdir/test72.in 2012-01-04 18:04:17.000000000 +0000 62089 +++ vim74/src/testdir/test72.in 2014-0 4-27 05:20:58.438443280+000062224 +++ vim74/src/testdir/test72.in 2014-06-01 00:43:20.217464828 +0000 62090 62225 @@ -105,7 +105,11 @@ 62091 62226 u:.w >>test.out … … 62103 62238 diff -Naur vim74.orig/src/testdir/test75.in vim74/src/testdir/test75.in 62104 62239 --- vim74.orig/src/testdir/test75.in 2013-06-29 11:48:42.000000000 +0000 62105 +++ vim74/src/testdir/test75.in 2014-0 4-27 05:20:58.438443280+000062240 +++ vim74/src/testdir/test75.in 2014-06-01 00:43:20.277464675 +0000 62106 62241 @@ -1,8 +1,11 @@ 62107 62242 -" Tests for functions. … … 62140 62275 diff -Naur vim74.orig/src/testdir/test75.ok vim74/src/testdir/test75.ok 62141 62276 --- vim74.orig/src/testdir/test75.ok 2013-06-29 11:50:08.000000000 +0000 62142 +++ vim74/src/testdir/test75.ok 2014-0 4-27 05:20:58.438443280+000062277 +++ vim74/src/testdir/test75.ok 2014-06-01 00:43:20.294131299 +0000 62143 62278 @@ -4,3 +4,4 @@ 62144 62279 {'silent': 0, 'noremap': 0, 'lhs': 'foo', 'mode': ' ', 'nowait': 1, 'expr': 0, 'sid': 0, 'rhs': 'bar', 'buffer': 1} … … 62148 62283 diff -Naur vim74.orig/src/testdir/test77a.com vim74/src/testdir/test77a.com 62149 62284 --- vim74.orig/src/testdir/test77a.com 1970-01-01 00:00:00.000000000 +0000 62150 +++ vim74/src/testdir/test77a.com 2014-0 4-27 05:20:58.438443280+000062285 +++ vim74/src/testdir/test77a.com 2014-06-01 00:43:20.344131172 +0000 62151 62286 @@ -0,0 +1,8 @@ 62152 62287 +$! test77a - help file creating checksum on VMS … … 62160 62295 diff -Naur vim74.orig/src/testdir/test77a.in vim74/src/testdir/test77a.in 62161 62296 --- vim74.orig/src/testdir/test77a.in 1970-01-01 00:00:00.000000000 +0000 62162 +++ vim74/src/testdir/test77a.in 2014-0 4-27 05:20:58.438443280+000062297 +++ vim74/src/testdir/test77a.in 2014-06-01 00:43:20.347464497 +0000 62163 62298 @@ -0,0 +1,31 @@ 62164 62299 +Inserts 2 million lines with consecutive integers starting from 1 … … 62195 62330 diff -Naur vim74.orig/src/testdir/test77a.ok vim74/src/testdir/test77a.ok 62196 62331 --- vim74.orig/src/testdir/test77a.ok 1970-01-01 00:00:00.000000000 +0000 62197 +++ vim74/src/testdir/test77a.ok 2014-0 4-27 05:20:58.438443280+000062332 +++ vim74/src/testdir/test77a.ok 2014-06-01 00:43:20.347464497 +0000 62198 62333 @@ -0,0 +1 @@ 62199 62334 + CHECKSUM$CHECKSUM = "844110470" 62200 62335 diff -Naur vim74.orig/src/testdir/test79.in vim74/src/testdir/test79.in 62201 62336 --- vim74.orig/src/testdir/test79.in 2013-04-13 09:16:38.000000000 +0000 62202 +++ vim74/src/testdir/test79.in 2014-0 4-27 05:20:58.441776697+000062337 +++ vim74/src/testdir/test79.in 2014-06-01 00:43:20.380797745 +0000 62203 62338 @@ -1,6 +1,7 @@ 62204 62339 Test for *sub-replace-special* and *sub-replace-expression* on :substitute. … … 62269 62404 diff -Naur vim74.orig/src/testdir/test79.ok vim74/src/testdir/test79.ok 62270 62405 --- vim74.orig/src/testdir/test79.ok 2013-03-19 16:30:51.000000000 +0000 62271 +++ vim74/src/testdir/test79.ok 2014-0 4-27 05:20:58.441776697+000062406 +++ vim74/src/testdir/test79.ok 2014-06-01 00:43:20.387464395 +0000 62272 62407 @@ -105,6 +105,7 @@ 62273 62408 … … 62296 62431 diff -Naur vim74.orig/src/testdir/test80.in vim74/src/testdir/test80.in 62297 62432 --- vim74.orig/src/testdir/test80.in 2013-03-19 16:30:51.000000000 +0000 62298 +++ vim74/src/testdir/test80.in 2014-0 4-27 05:20:58.441776697+000062433 +++ vim74/src/testdir/test80.in 2014-06-01 00:43:20.430797618 +0000 62299 62434 @@ -117,6 +117,7 @@ 62300 62435 :set cpo& … … 62342 62477 diff -Naur vim74.orig/src/testdir/test80.ok vim74/src/testdir/test80.ok 62343 62478 --- vim74.orig/src/testdir/test80.ok 2013-03-19 16:31:45.000000000 +0000 62344 +++ vim74/src/testdir/test80.ok 2014-0 4-27 05:20:58.441776697 +000062479 +++ vim74/src/testdir/test80.ok 2014-06-01 00:43:20.450797567 +0000 62345 62480 @@ -90,6 +90,7 @@ 62346 62481 … … 62380 62515 diff -Naur vim74.orig/src/testdir/test86.in vim74/src/testdir/test86.in 62381 62516 --- vim74.orig/src/testdir/test86.in 2013-07-13 12:00:31.000000000 +0000 62382 +++ vim74/src/testdir/test86.in 2014-0 4-27 05:20:58.445110113 +000062517 +++ vim74/src/testdir/test86.in 2014-06-01 00:43:20.647463733 +0000 62383 62518 @@ -39,6 +39,7 @@ 62384 62519 py << EOF … … 62717 62852 diff -Naur vim74.orig/src/testdir/test86.ok vim74/src/testdir/test86.ok 62718 62853 --- vim74.orig/src/testdir/test86.ok 2013-06-23 14:38:39.000000000 +0000 62719 +++ vim74/src/testdir/test86.ok 2014-0 4-27 05:20:58.448443529+000062854 +++ vim74/src/testdir/test86.ok 2014-06-01 00:43:20.687463631 +0000 62720 62855 @@ -41,6 +41,9 @@ 62721 62856 [2, 3] … … 62945 63080 diff -Naur vim74.orig/src/testdir/test87.in vim74/src/testdir/test87.in 62946 63081 --- vim74.orig/src/testdir/test87.in 2013-07-06 11:41:30.000000000 +0000 62947 +++ vim74/src/testdir/test87.in 2014-0 4-27 05:20:58.448443529+000063082 +++ vim74/src/testdir/test87.in 2014-06-01 00:43:20.717463555 +0000 62948 63083 @@ -33,6 +33,7 @@ 62949 63084 py3 << EOF … … 63307 63442 diff -Naur vim74.orig/src/testdir/test87.ok vim74/src/testdir/test87.ok 63308 63443 --- vim74.orig/src/testdir/test87.ok 2013-06-23 14:38:39.000000000 +0000 63309 +++ vim74/src/testdir/test87.ok 2014-0 4-27 05:20:58.448443529+000063444 +++ vim74/src/testdir/test87.ok 2014-06-01 00:43:20.747463478 +0000 63310 63445 @@ -41,6 +41,9 @@ 63311 63446 [2, 3] … … 63546 63681 diff -Naur vim74.orig/src/testdir/test92.in vim74/src/testdir/test92.in 63547 63682 --- vim74.orig/src/testdir/test92.in 2013-04-18 21:33:45.000000000 +0000 63548 +++ vim74/src/testdir/test92.in 2014-0 4-27 05:20:58.451776944+000063683 +++ vim74/src/testdir/test92.in 2014-06-01 00:43:20.880796472 +0000 63549 63684 @@ -33,7 +33,7 @@ 63550 63685 :mksession! test.out … … 63558 63693 diff -Naur vim74.orig/src/testdir/test93.in vim74/src/testdir/test93.in 63559 63694 --- vim74.orig/src/testdir/test93.in 2013-02-26 16:13:01.000000000 +0000 63560 +++ vim74/src/testdir/test93.in 2014-0 4-27 05:20:58.451776944+000063695 +++ vim74/src/testdir/test93.in 2014-06-01 00:43:20.904129746 +0000 63561 63696 @@ -33,7 +33,7 @@ 63562 63697 :mksession! test.out … … 63568 63703 ENDTEST 63569 63704 63705 diff -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 63750 diff -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 - aÌ 63764 +OK 1 - aÌ 63765 +OK 2 - aÌ 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 63778 diff -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 63806 diff -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'] 63570 63816 diff -Naur vim74.orig/src/testdir/test99.in vim74/src/testdir/test99.in 63571 63817 --- vim74.orig/src/testdir/test99.in 1970-01-01 00:00:00.000000000 +0000 63572 +++ vim74/src/testdir/test99.in 2014-0 4-27 05:20:58.455110360+000063818 +++ vim74/src/testdir/test99.in 2014-06-01 00:43:21.017462791 +0000 63573 63819 @@ -0,0 +1,68 @@ 63574 63820 +Tests for regexp with multi-byte encoding and various magic settings. … … 63648 63894 diff -Naur vim74.orig/src/testdir/test99.ok vim74/src/testdir/test99.ok 63649 63895 --- vim74.orig/src/testdir/test99.ok 1970-01-01 00:00:00.000000000 +0000 63650 +++ vim74/src/testdir/test99.ok 2014-0 4-27 05:20:58.455110360+000063896 +++ vim74/src/testdir/test99.ok 2014-06-01 00:43:21.020796116 +0000 63651 63897 @@ -0,0 +1,24 @@ 63652 63898 +1 a aa abb abbcc … … 63679 63925 +× 63680 63926 +× 63927 diff -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: 63954 diff -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]' 63681 63966 diff -Naur vim74.orig/src/testdir/test_eval.in vim74/src/testdir/test_eval.in 63682 63967 --- vim74.orig/src/testdir/test_eval.in 1970-01-01 00:00:00.000000000 +0000 63683 +++ vim74/src/testdir/test_eval.in 2014-0 4-27 05:20:58.455110360+000063684 @@ -0,0 +1, 188@@63968 +++ vim74/src/testdir/test_eval.in 2014-06-01 00:43:21.027462765 +0000 63969 @@ -0,0 +1,207 @@ 63685 63970 +Test for various eval features. vim: set ft=vim : 63686 63971 + … … 63865 64150 +:echo Foo(3) 63866 64151 +:" 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 +:" 63867 64168 +:/^start:/+1,$wq! test.out 63868 64169 +:" vim: et ts=4 isk-=\: fmr=???,??? … … 63870 64171 +ENDTEST 63871 64172 + 64173 +012345678 64174 +012345678 64175 + 63872 64176 +start: 63873 64177 diff -Naur vim74.orig/src/testdir/test_eval.ok vim74/src/testdir/test_eval.ok 63874 64178 --- vim74.orig/src/testdir/test_eval.ok 1970-01-01 00:00:00.000000000 +0000 63875 +++ vim74/src/testdir/test_eval.ok 2014-0 4-27 05:20:58.458443777+000063876 @@ -0,0 +1,3 43@@64179 +++ vim74/src/testdir/test_eval.ok 2014-06-01 00:43:21.030796090 +0000 64180 @@ -0,0 +1,350 @@ 63877 64181 +{{{1 let tests 63878 64182 +": type v; value: abc (['abc']), expr: abc (['abc']) … … 64222 64526 +called Foo(2) 64223 64527 +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 64535 diff -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') 64224 64549 diff -Naur vim74.orig/src/testdir/test_options.in vim74/src/testdir/test_options.in 64225 64550 --- vim74.orig/src/testdir/test_options.in 1970-01-01 00:00:00.000000000 +0000 64226 +++ vim74/src/testdir/test_options.in 2014-0 4-27 05:20:58.458443777+000064551 +++ vim74/src/testdir/test_options.in 2014-06-01 00:43:21.050796039 +0000 64227 64552 @@ -0,0 +1,17 @@ 64228 64553 +Test for ":options". … … 64245 64570 diff -Naur vim74.orig/src/testdir/test_options.ok vim74/src/testdir/test_options.ok 64246 64571 --- vim74.orig/src/testdir/test_options.ok 1970-01-01 00:00:00.000000000 +0000 64247 +++ vim74/src/testdir/test_options.ok 2014-0 4-27 05:20:58.458443777+000064572 +++ vim74/src/testdir/test_options.ok 2014-06-01 00:43:21.050796039 +0000 64248 64573 @@ -0,0 +1,2 @@ 64249 64574 +result … … 64251 64576 diff -Naur vim74.orig/src/ui.c vim74/src/ui.c 64252 64577 --- vim74.orig/src/ui.c 2013-07-13 18:57:08.000000000 +0000 64253 +++ vim74/src/ui.c 2014-0 4-27 05:20:58.458443777+000064578 +++ vim74/src/ui.c 2014-06-01 00:43:21.167462409 +0000 64254 64579 @@ -2610,13 +2610,11 @@ 64255 64580 if (on_sep_line) … … 64340 64665 diff -Naur vim74.orig/src/undo.c vim74/src/undo.c 64341 64666 --- vim74.orig/src/undo.c 2013-06-10 18:13:37.000000000 +0000 64342 +++ vim74/src/undo.c 2014-0 4-27 05:20:58.461777194+000064667 +++ vim74/src/undo.c 2014-06-01 00:43:21.194129007 +0000 64343 64668 @@ -83,6 +83,7 @@ 64344 64669 … … 64572 64897 diff -Naur vim74.orig/src/version.c vim74/src/version.c 64573 64898 --- vim74.orig/src/version.c 2013-08-10 11:29:20.000000000 +0000 64574 +++ vim74/src/version.c 2014-0 4-27 05:20:58.465110609+000064899 +++ vim74/src/version.c 2014-06-01 00:43:21.227462256 +0000 64575 64900 @@ -60,6 +60,11 @@ 64576 64901 … … 64616 64941 NULL 64617 64942 }; 64618 @@ -728,6 +735, 536@@64943 @@ -728,6 +735,638 @@ 64619 64944 static int included_patches[] = 64620 64945 { /* Add new patch number below this line */ 64621 64946 /**/ 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 +/**/ 64622 65049 + 265, 64623 65050 +/**/ … … 65155 65582 diff -Naur vim74.orig/src/vim.h vim74/src/vim.h 65156 65583 --- vim74.orig/src/vim.h 2013-08-02 14:02:27.000000000 +0000 65157 +++ vim74/src/vim.h 2014-0 4-27 05:20:58.465110609+000065584 +++ vim74/src/vim.h 2014-06-01 00:43:21.297462078 +0000 65158 65585 @@ -43,7 +43,7 @@ 65159 65586 * it becomes zero. This is likely a problem of not being able to run the … … 65317 65744 diff -Naur vim74.orig/src/winclip.c vim74/src/winclip.c 65318 65745 --- vim74.orig/src/winclip.c 2013-07-01 19:05:53.000000000 +0000 65319 +++ vim74/src/winclip.c 2014-0 4-27 05:20:58.471777440+000065746 +++ vim74/src/winclip.c 2014-06-01 00:43:21.514128193 +0000 65320 65747 @@ -797,4 +797,29 @@ 65321 65748 vim_free(widestr); … … 65350 65777 diff -Naur vim74.orig/src/window.c vim74/src/window.c 65351 65778 --- vim74.orig/src/window.c 2013-07-24 15:38:29.000000000 +0000 65352 +++ vim74/src/window.c 2014-0 4-27 05:20:58.471777440+000065779 +++ vim74/src/window.c 2014-06-01 00:43:21.530794817 +0000 65353 65780 @@ -130,9 +130,7 @@ 65354 65781 case Ctrl_S: … … 65594 66021 #ifdef FEAT_GUI 65595 66022 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 @@ 65597 66099 long count; 65598 66100 linenr_T *file_lnum; … … 65602 66104 { 65603 66105 int len; 65604 @@ -6046,7 +60 19,6 @@66106 @@ -6046,7 +6029,6 @@ 65605 66107 return find_file_name_in_path(ptr, len, 65606 66108 FNAME_MESS|FNAME_EXP|FNAME_REL, count, curbuf->b_ffname); … … 65612 66114 diff -Naur vim74.orig/src/xxd/Make_cyg.mak vim74/src/xxd/Make_cyg.mak 65613 66115 --- vim74.orig/src/xxd/Make_cyg.mak 2010-05-15 11:04:06.000000000 +0000 65614 +++ vim74/src/xxd/Make_cyg.mak 2014-0 4-27 05:20:58.481777690+000066116 +++ vim74/src/xxd/Make_cyg.mak 2014-06-01 00:43:21.840794027 +0000 65615 66117 @@ -8,7 +8,7 @@ 65616 66118 DEFINES =
Note:
See TracChangeset
for help on using the changeset viewer.