Skip to content

Commit a1cb3f3

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents 7b64f50 + c10b521 commit a1cb3f3

107 files changed

Lines changed: 2459 additions & 711 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ src/auto/gui_gtk_gresources.h
88
src/objects/.dirstamp
99
src/objects
1010
src/tags
11+
src/types.vim
1112

1213
# We do need src/auto/configure.
1314
src/auto/config.cache
@@ -137,6 +138,7 @@ src/a.out.dSYM
137138

138139
# Generated by "make install"
139140
runtime/doc/tags
141+
runtime/doc/doctags
140142

141143
# Generated by "make shadow". The directory names could be anything but we
142144
# restrict them to shadow (the default) or shadow-*

.hgignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ src/auto/gui_gtk_gresources.h
1010
src/objects/.dirstamp
1111
src/objects
1212
src/tags
13+
src/types.vim
1314

1415
# We do need src/auto/configure.
1516
src/auto/config.cache
@@ -86,6 +87,7 @@ src/kword_test
8687

8788
# Generated by "make install"
8889
runtime/doc/tags
90+
runtime/doc/doctags
8991

9092
# Generated by "make shadow". The directory names could be anything but we
9193
# restrict them to shadow (the default) or shadow-*

Filelist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,7 @@ SRC_EXTRA = \
652652
RT_ALL = \
653653
README.txt \
654654
README.md \
655+
LICENSE \
655656
CONTRIBUTING.md \
656657
runtime/bugreport.vim \
657658
runtime/doc/*.awk \

LICENSE

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -13,48 +13,48 @@ II) It is allowed to distribute a modified (or extended) version of Vim,
1313
1) This license text must be included unmodified.
1414
2) The modified Vim must be distributed in one of the following five ways:
1515
a) If you make changes to Vim yourself, you must clearly describe in
16-
the distribution how to contact you. When the maintainer asks you
17-
(in any way) for a copy of the modified Vim you distributed, you
18-
must make your changes, including source code, available to the
19-
maintainer without fee. The maintainer reserves the right to
20-
include your changes in the official version of Vim. What the
21-
maintainer will do with your changes and under what license they
22-
will be distributed is negotiable. If there has been no negotiation
23-
then this license, or a later version, also applies to your changes.
24-
The current maintainer is Bram Moolenaar <[email protected]>. If this
25-
changes it will be announced in appropriate places (most likely
26-
vim.sf.net, www.vim.org and/or comp.editors). When it is completely
27-
impossible to contact the maintainer, the obligation to send him
28-
your changes ceases. Once the maintainer has confirmed that he has
29-
received your changes they will not have to be sent again.
16+
the distribution how to contact you. When the maintainer asks you
17+
(in any way) for a copy of the modified Vim you distributed, you
18+
must make your changes, including source code, available to the
19+
maintainer without fee. The maintainer reserves the right to
20+
include your changes in the official version of Vim. What the
21+
maintainer will do with your changes and under what license they
22+
will be distributed is negotiable. If there has been no negotiation
23+
then this license, or a later version, also applies to your changes.
24+
The current maintainer is Bram Moolenaar <[email protected]>. If this
25+
changes it will be announced in appropriate places (most likely
26+
vim.sf.net, www.vim.org and/or comp.editors). When it is completely
27+
impossible to contact the maintainer, the obligation to send him
28+
your changes ceases. Once the maintainer has confirmed that he has
29+
received your changes they will not have to be sent again.
3030
b) If you have received a modified Vim that was distributed as
31-
mentioned under a) you are allowed to further distribute it
32-
unmodified, as mentioned at I). If you make additional changes the
33-
text under a) applies to those changes.
31+
mentioned under a) you are allowed to further distribute it
32+
unmodified, as mentioned at I). If you make additional changes the
33+
text under a) applies to those changes.
3434
c) Provide all the changes, including source code, with every copy of
35-
the modified Vim you distribute. This may be done in the form of a
36-
context diff. You can choose what license to use for new code you
37-
add. The changes and their license must not restrict others from
38-
making their own changes to the official version of Vim.
35+
the modified Vim you distribute. This may be done in the form of a
36+
context diff. You can choose what license to use for new code you
37+
add. The changes and their license must not restrict others from
38+
making their own changes to the official version of Vim.
3939
d) When you have a modified Vim which includes changes as mentioned
40-
under c), you can distribute it without the source code for the
41-
changes if the following three conditions are met:
42-
- The license that applies to the changes permits you to distribute
43-
the changes to the Vim maintainer without fee or restriction, and
44-
permits the Vim maintainer to include the changes in the official
45-
version of Vim without fee or restriction.
46-
- You keep the changes for at least three years after last
47-
distributing the corresponding modified Vim. When the maintainer
48-
or someone who you distributed the modified Vim to asks you (in
49-
any way) for the changes within this period, you must make them
50-
available to him.
51-
- You clearly describe in the distribution how to contact you. This
52-
contact information must remain valid for at least three years
53-
after last distributing the corresponding modified Vim, or as long
54-
as possible.
40+
under c), you can distribute it without the source code for the
41+
changes if the following three conditions are met:
42+
- The license that applies to the changes permits you to distribute
43+
the changes to the Vim maintainer without fee or restriction, and
44+
permits the Vim maintainer to include the changes in the official
45+
version of Vim without fee or restriction.
46+
- You keep the changes for at least three years after last
47+
distributing the corresponding modified Vim. When the maintainer
48+
or someone who you distributed the modified Vim to asks you (in
49+
any way) for the changes within this period, you must make them
50+
available to him.
51+
- You clearly describe in the distribution how to contact you. This
52+
contact information must remain valid for at least three years
53+
after last distributing the corresponding modified Vim, or as long
54+
as possible.
5555
e) When the GNU General Public License (GPL) applies to the changes,
56-
you can distribute the modified Vim under the GNU GPL version 2 or
57-
any later version.
56+
you can distribute the modified Vim under the GNU GPL version 2 or
57+
any later version.
5858
3) A message must be added, at least in the output of the ":version"
5959
command and in the intro screen, such that the user of the modified Vim
6060
is able to see that it was modified. When distributing as mentioned

runtime/autoload/dist/ft.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
" Vim functions for file type detection
22
"
33
" Maintainer: Bram Moolenaar <[email protected]>
4-
" Last Change: 2019 Mar 08
4+
" Last Change: 2020 Jan 02
55

66
" These functions are moved here from runtime/filetype.vim to make startup
77
" faster.
@@ -298,7 +298,7 @@ endfunc
298298

299299
func dist#ft#FTmms()
300300
let n = 1
301-
while n < 10
301+
while n < 20
302302
let line = getline(n)
303303
if line =~ '^\s*\(%\|//\)' || line =~ '^\*'
304304
setf mmix

runtime/autoload/getscript.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ if &cp
2222
endif
2323
if v:version < 702
2424
echohl WarningMsg
25-
echo "***warning*** this version of getscript needs vim 7.2"
25+
echo "***warning*** this version of GetLatestVimScripts needs vim 7.2"
2626
echohl Normal
2727
finish
2828
endif
@@ -236,7 +236,7 @@ fun! getscript#GetLatestVimScripts()
236236
" call Decho("..depscript<".depscript.">")
237237

238238
" found a "GetLatestVimScripts: # #" line in the script;
239-
" check if it's already in the datafile by searching backwards from llp1,
239+
" check if its already in the datafile by searching backwards from llp1,
240240
" the (prior to reading in the plugin script) last line plus one of the GetLatestVimScripts.dat file,
241241
" for the script-id with no wrapping allowed.
242242
let curline = line(".")

runtime/autoload/netrw.vim

Lines changed: 42 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
" netrw.vim: Handles file transfer and remote directory listing across
22
" AUTOLOAD SECTION
3-
" Date: Nov 29, 2019
4-
" Version: 167
5-
" Maintainer: Charles E Campbell <[email protected]-NOSPAM>
3+
" Date: Jan 07, 2020
4+
" Version: 168
5+
" Maintainer: Charles E Campbell <[email protected]-NOSPAM>
66
" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
77
" Copyright: Copyright (C) 2016 Charles E. Campbell {{{1
88
" Permission is hereby granted to use and distribute this code,
@@ -43,7 +43,7 @@ if exists("s:needspatches")
4343
endfor
4444
endif
4545

46-
let g:loaded_netrw = "v167"
46+
let g:loaded_netrw = "v168"
4747
if !exists("s:NOTE")
4848
let s:NOTE = 0
4949
let s:WARNING = 1
@@ -68,7 +68,7 @@ setl cpo&vim
6868
" Usage: netrw#ErrorMsg(s:NOTE | s:WARNING | s:ERROR,"some message",error-number)
6969
" netrw#ErrorMsg(s:NOTE | s:WARNING | s:ERROR,["message1","message2",...],error-number)
7070
" (this function can optionally take a list of messages)
71-
" Mar 21, 2017 : max errnum currently is 105
71+
" Dec 2, 2019 : max errnum currently is 106
7272
fun! netrw#ErrorMsg(level,msg,errnum)
7373
" call Dfunc("netrw#ErrorMsg(level=".a:level." msg<".a:msg."> errnum=".a:errnum.") g:netrw_use_errorwindow=".g:netrw_use_errorwindow)
7474

@@ -447,23 +447,9 @@ if !exists("g:netrw_localmovecmd")
447447
let g:netrw_localmovecmd= ""
448448
endif
449449
endif
450-
if v:version < 704 || (v:version == 704 && !has("patch1107"))
451-
" 1109 provides for delete(tmpdir,"d") which is what will be used
452-
if exists("g:netrw_local_rmdir")
453-
let g:netrw_localrmdir= g:netrw_local_rmdir
454-
call netrw#ErrorMsg(s:NOTE,"g:netrw_local_rmdir is deprecated in favor of g:netrw_localrmdir",86)
455-
endif
456-
if has("win32") || has("win95") || has("win64") || has("win16")
457-
if g:netrw_cygwin
458-
call s:NetrwInit("g:netrw_localrmdir","rmdir")
459-
else
460-
let g:netrw_localrmdir = expand("$COMSPEC")
461-
let g:netrw_localrmdiropt= " /c rmdir"
462-
endif
463-
else
464-
call s:NetrwInit("g:netrw_localrmdir","rmdir")
465-
endif
466-
endif
450+
" following serves as an example for how to insert a version&patch specific test
451+
"if v:version < 704 || (v:version == 704 && !has("patch1107"))
452+
"endif
467453
call s:NetrwInit("g:netrw_liststyle" , s:THINLIST)
468454
" sanity checks
469455
if g:netrw_liststyle < 0 || g:netrw_liststyle >= s:MAXLIST
@@ -5217,8 +5203,8 @@ fun! netrw#BrowseX(fname,remote)
52175203
if a:remote == 0 && isdirectory(a:fname)
52185204
" if its really just a local directory, then do a "gf" instead
52195205
" call Decho("remote≡0 and a:fname<".a:fname."> ".(isdirectory(a:fname)? "is a directory" : "is not a directory"),'~'.expand("<slnum>"))
5220-
" call Decho("..appears to be a local directory; using gf instead",'~'.expand("<slnum>"))
5221-
norm! gf
5206+
" call Decho("..appears to be a local directory; using e ".a:fname." instead",'~'.expand("<slnum>"))
5207+
exe "e ".a:fname
52225208
" call Dret("netrw#BrowseX")
52235209
return
52245210
elseif a:remote == 1 && a:fname !~ '^https\=:' && a:fname =~ '/$'
@@ -7158,17 +7144,8 @@ fun! s:NetrwMarkFileCopy(islocal,...)
71587144
" call Dret("s:NetrwMarkFileCopy : lcd failure")
71597145
return
71607146
endif
7161-
if v:version < 704 || (v:version == 704 && !has("patch1107"))
7162-
call s:NetrwExe("sil !".g:netrw_localrmdir.g:netrw_localrmdiropt." ".s:ShellEscape(tmpdir,1))
7163-
if v:shell_error != 0
7164-
call netrw#ErrorMsg(s:WARNING,"consider setting g:netrw_localrmdir<".g:netrw_localrmdir."> to something that works",80)
7165-
" " call Dret("s:NetrwMarkFileCopy : failed: sil !".g:netrw_localrmdir." ".s:ShellEscape(tmpdir,1) )
7166-
return
7167-
endif
7168-
else
7169-
if delete(tmpdir,"d")
7170-
call netrw#ErrorMsg(s:ERROR,"unable to delete directory <".tmpdir.">!",103)
7171-
endif
7147+
if delete(tmpdir,"d")
7148+
call netrw#ErrorMsg(s:ERROR,"unable to delete directory <".tmpdir.">!",103)
71727149
endif
71737150
else
71747151
if s:NetrwLcd(curdir)
@@ -9587,13 +9564,15 @@ fun! s:NetrwWideListing()
95879564
" call Decho("setl ma noro",'~'.expand("<slnum>"))
95889565
let b:netrw_cpf= 0
95899566
if line("$") >= w:netrw_bannercnt
9567+
" determine the maximum filename size; use that to set cpf
95909568
exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$g/^./if virtcol("$") > b:netrw_cpf|let b:netrw_cpf= virtcol("$")|endif'
95919569
NetrwKeepj call histdel("/",-1)
95929570
else
95939571
let @a= keepa
95949572
" call Dret("NetrwWideListing")
95959573
return
95969574
endif
9575+
" allow for two spaces to separate columns
95979576
let b:netrw_cpf= b:netrw_cpf + 2
95989577
" call Decho("b:netrw_cpf=max_filename_length+2=".b:netrw_cpf,'~'.expand("<slnum>"))
95999578

@@ -9621,10 +9600,11 @@ fun! s:NetrwWideListing()
96219600
if newcolend > line("$") | let newcolend= line("$") | endif
96229601
let newcolqty= newcolend - newcolstart
96239602
exe newcolstart
9603+
" COMBAK: both of the visual-mode using lines below are problematic vis-a-vis @*
96249604
if newcolqty == 0
96259605
exe "sil! NetrwKeepj norm! 0\<c-v>$h\"ax".w:netrw_bannercnt."G$\"ap"
96269606
else
9627-
exe "sil! NetrwKeepj norm! 0\<c-v>".newcolqty.'j$h\"ax'.w:netrw_bannercnt.'G$\"ap'
9607+
exe "sil! NetrwKeepj norm! 0\<c-v>".newcolqty.'j$h"ax'.w:netrw_bannercnt.'G$"ap'
96289608
endif
96299609
exe "sil! NetrwKeepj ".newcolstart.','.newcolend.'d _'
96309610
exe 'sil! NetrwKeepj '.w:netrw_bannercnt
@@ -11048,9 +11028,10 @@ fun! s:NetrwLocalRename(path) range
1104811028
" call Dfunc("NetrwLocalRename(path<".a:path.">)")
1104911029

1105011030
" preparation for removing multiple files/directories
11051-
let ykeep = @@
11052-
let ctr = a:firstline
11053-
let svpos = winsaveview()
11031+
let ykeep = @@
11032+
let ctr = a:firstline
11033+
let svpos = winsaveview()
11034+
let all = 0
1105411035
" call Decho("saving posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
1105511036

1105611037
" rename files given by the markfilelist
@@ -11078,6 +11059,23 @@ fun! s:NetrwLocalRename(path) range
1107811059
let newname = substitute(oldname,subfrom,subto,'')
1107911060
endif
1108011061
endif
11062+
if !all && filereadable(newname)
11063+
call inputsave()
11064+
let response= input("File<".newname."> already exists; do you want to overwrite it? (y/all/n) ")
11065+
call inputrestore()
11066+
if response == "all"
11067+
let all= 1
11068+
elseif response != "y" && response != "yes"
11069+
" refresh the directory
11070+
" call Decho("refresh the directory listing",'~'.expand("<slnum>"))
11071+
NetrwKeepj call s:NetrwRefresh(1,s:NetrwBrowseChgDir(1,'./'))
11072+
" call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
11073+
NetrwKeepj call winrestview(svpos)
11074+
let @@= ykeep
11075+
" call Dret("NetrwLocalRename")
11076+
return
11077+
endif
11078+
endif
1108111079
call rename(oldname,newname)
1108211080
endfor
1108311081
call s:NetrwUnmarkList(bufnr("%"),b:netrw_curdir)
@@ -11101,14 +11099,14 @@ fun! s:NetrwLocalRename(path) range
1110111099

1110211100
NetrwKeepj norm! 0
1110311101
let oldname= s:ComposePath(a:path,curword)
11104-
" call Decho("oldname<".oldname.">",'~'.expand("<slnum>"))
11102+
" call Decho("oldname<".oldname.">",'~'.expand("<slnum>"))
1110511103

1110611104
call inputsave()
1110711105
let newname= input("Moving ".oldname." to : ",substitute(oldname,'/*$','','e'))
1110811106
call inputrestore()
1110911107

1111011108
call rename(oldname,newname)
11111-
" call Decho("renaming <".oldname."> to <".newname.">",'~'.expand("<slnum>"))
11109+
" call Decho("renaming <".oldname."> to <".newname.">",'~'.expand("<slnum>"))
1111211110

1111311111
let ctr= ctr + 1
1111411112
endwhile
@@ -11896,6 +11894,9 @@ fun! s:NetrwExe(cmd)
1189611894
" call Decho("exe ".a:cmd,'~'.expand("<slnum>"))
1189711895
exe a:cmd
1189811896
endif
11897+
if v:shell_error
11898+
call netrw#ErrorMsg(s:WARNING,"shell signalled an error",106)
11899+
endif
1189911900
" call Dret("s:NetrwExe : v:shell_error=".v:shell_error)
1190011901
endfun
1190111902

runtime/autoload/netrwSettings.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
" netrwSettings.vim: makes netrw settings simpler
22
" Date: Nov 09, 2016
3-
" Maintainer: Charles E Campbell <drchipNOSPAM at campbellfamily dot biz>
3+
" Maintainer: Charles E Campbell <[email protected]>
44
" Version: 16
55
" Copyright: Copyright (C) 1999-2007 Charles E. Campbell {{{1
66
" Permission is hereby granted to use and distribute this code,

0 commit comments

Comments
 (0)