Skip to content

Commit

Permalink
Merge remote-tracking branch 'vim/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
ychin committed Jan 14, 2020
2 parents 7b64f50 + c10b521 commit a1cb3f3
Show file tree
Hide file tree
Showing 107 changed files with 2,459 additions and 711 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -8,6 +8,7 @@ src/auto/gui_gtk_gresources.h
src/objects/.dirstamp
src/objects
src/tags
src/types.vim

# We do need src/auto/configure.
src/auto/config.cache
Expand Down Expand Up @@ -137,6 +138,7 @@ src/a.out.dSYM

# Generated by "make install"
runtime/doc/tags
runtime/doc/doctags

# Generated by "make shadow". The directory names could be anything but we
# restrict them to shadow (the default) or shadow-*
Expand Down
2 changes: 2 additions & 0 deletions .hgignore
Expand Up @@ -10,6 +10,7 @@ src/auto/gui_gtk_gresources.h
src/objects/.dirstamp
src/objects
src/tags
src/types.vim

# We do need src/auto/configure.
src/auto/config.cache
Expand Down Expand Up @@ -86,6 +87,7 @@ src/kword_test

# Generated by "make install"
runtime/doc/tags
runtime/doc/doctags

# Generated by "make shadow". The directory names could be anything but we
# restrict them to shadow (the default) or shadow-*
Expand Down
1 change: 1 addition & 0 deletions Filelist
Expand Up @@ -652,6 +652,7 @@ SRC_EXTRA = \
RT_ALL = \
README.txt \
README.md \
LICENSE \
CONTRIBUTING.md \
runtime/bugreport.vim \
runtime/doc/*.awk \
Expand Down
76 changes: 38 additions & 38 deletions LICENSE
Expand Up @@ -13,48 +13,48 @@ II) It is allowed to distribute a modified (or extended) version of Vim,
1) This license text must be included unmodified.
2) The modified Vim must be distributed in one of the following five ways:
a) If you make changes to Vim yourself, you must clearly describe in
the distribution how to contact you. When the maintainer asks you
(in any way) for a copy of the modified Vim you distributed, you
must make your changes, including source code, available to the
maintainer without fee. The maintainer reserves the right to
include your changes in the official version of Vim. What the
maintainer will do with your changes and under what license they
will be distributed is negotiable. If there has been no negotiation
then this license, or a later version, also applies to your changes.
The current maintainer is Bram Moolenaar <Bram@vim.org>. If this
changes it will be announced in appropriate places (most likely
vim.sf.net, www.vim.org and/or comp.editors). When it is completely
impossible to contact the maintainer, the obligation to send him
your changes ceases. Once the maintainer has confirmed that he has
received your changes they will not have to be sent again.
the distribution how to contact you. When the maintainer asks you
(in any way) for a copy of the modified Vim you distributed, you
must make your changes, including source code, available to the
maintainer without fee. The maintainer reserves the right to
include your changes in the official version of Vim. What the
maintainer will do with your changes and under what license they
will be distributed is negotiable. If there has been no negotiation
then this license, or a later version, also applies to your changes.
The current maintainer is Bram Moolenaar <Bram@vim.org>. If this
changes it will be announced in appropriate places (most likely
vim.sf.net, www.vim.org and/or comp.editors). When it is completely
impossible to contact the maintainer, the obligation to send him
your changes ceases. Once the maintainer has confirmed that he has
received your changes they will not have to be sent again.
b) If you have received a modified Vim that was distributed as
mentioned under a) you are allowed to further distribute it
unmodified, as mentioned at I). If you make additional changes the
text under a) applies to those changes.
mentioned under a) you are allowed to further distribute it
unmodified, as mentioned at I). If you make additional changes the
text under a) applies to those changes.
c) Provide all the changes, including source code, with every copy of
the modified Vim you distribute. This may be done in the form of a
context diff. You can choose what license to use for new code you
add. The changes and their license must not restrict others from
making their own changes to the official version of Vim.
the modified Vim you distribute. This may be done in the form of a
context diff. You can choose what license to use for new code you
add. The changes and their license must not restrict others from
making their own changes to the official version of Vim.
d) When you have a modified Vim which includes changes as mentioned
under c), you can distribute it without the source code for the
changes if the following three conditions are met:
- The license that applies to the changes permits you to distribute
the changes to the Vim maintainer without fee or restriction, and
permits the Vim maintainer to include the changes in the official
version of Vim without fee or restriction.
- You keep the changes for at least three years after last
distributing the corresponding modified Vim. When the maintainer
or someone who you distributed the modified Vim to asks you (in
any way) for the changes within this period, you must make them
available to him.
- You clearly describe in the distribution how to contact you. This
contact information must remain valid for at least three years
after last distributing the corresponding modified Vim, or as long
as possible.
under c), you can distribute it without the source code for the
changes if the following three conditions are met:
- The license that applies to the changes permits you to distribute
the changes to the Vim maintainer without fee or restriction, and
permits the Vim maintainer to include the changes in the official
version of Vim without fee or restriction.
- You keep the changes for at least three years after last
distributing the corresponding modified Vim. When the maintainer
or someone who you distributed the modified Vim to asks you (in
any way) for the changes within this period, you must make them
available to him.
- You clearly describe in the distribution how to contact you. This
contact information must remain valid for at least three years
after last distributing the corresponding modified Vim, or as long
as possible.
e) When the GNU General Public License (GPL) applies to the changes,
you can distribute the modified Vim under the GNU GPL version 2 or
any later version.
you can distribute the modified Vim under the GNU GPL version 2 or
any later version.
3) A message must be added, at least in the output of the ":version"
command and in the intro screen, such that the user of the modified Vim
is able to see that it was modified. When distributing as mentioned
Expand Down
4 changes: 2 additions & 2 deletions runtime/autoload/dist/ft.vim
@@ -1,7 +1,7 @@
" Vim functions for file type detection
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2019 Mar 08
" Last Change: 2020 Jan 02

" These functions are moved here from runtime/filetype.vim to make startup
" faster.
Expand Down Expand Up @@ -298,7 +298,7 @@ endfunc

func dist#ft#FTmms()
let n = 1
while n < 10
while n < 20
let line = getline(n)
if line =~ '^\s*\(%\|//\)' || line =~ '^\*'
setf mmix
Expand Down
4 changes: 2 additions & 2 deletions runtime/autoload/getscript.vim
Expand Up @@ -22,7 +22,7 @@ if &cp
endif
if v:version < 702
echohl WarningMsg
echo "***warning*** this version of getscript needs vim 7.2"
echo "***warning*** this version of GetLatestVimScripts needs vim 7.2"
echohl Normal
finish
endif
Expand Down Expand Up @@ -236,7 +236,7 @@ fun! getscript#GetLatestVimScripts()
" call Decho("..depscript<".depscript.">")

" found a "GetLatestVimScripts: # #" line in the script;
" check if it's already in the datafile by searching backwards from llp1,
" check if its already in the datafile by searching backwards from llp1,
" the (prior to reading in the plugin script) last line plus one of the GetLatestVimScripts.dat file,
" for the script-id with no wrapping allowed.
let curline = line(".")
Expand Down
83 changes: 42 additions & 41 deletions runtime/autoload/netrw.vim
@@ -1,8 +1,8 @@
" netrw.vim: Handles file transfer and remote directory listing across
" AUTOLOAD SECTION
" Date: Nov 29, 2019
" Version: 167
" Maintainer: Charles E Campbell <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
" Date: Jan 07, 2020
" Version: 168
" Maintainer: Charles E Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
" Copyright: Copyright (C) 2016 Charles E. Campbell {{{1
" Permission is hereby granted to use and distribute this code,
Expand Down Expand Up @@ -43,7 +43,7 @@ if exists("s:needspatches")
endfor
endif

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

Expand Down Expand Up @@ -447,23 +447,9 @@ if !exists("g:netrw_localmovecmd")
let g:netrw_localmovecmd= ""
endif
endif
if v:version < 704 || (v:version == 704 && !has("patch1107"))
" 1109 provides for delete(tmpdir,"d") which is what will be used
if exists("g:netrw_local_rmdir")
let g:netrw_localrmdir= g:netrw_local_rmdir
call netrw#ErrorMsg(s:NOTE,"g:netrw_local_rmdir is deprecated in favor of g:netrw_localrmdir",86)
endif
if has("win32") || has("win95") || has("win64") || has("win16")
if g:netrw_cygwin
call s:NetrwInit("g:netrw_localrmdir","rmdir")
else
let g:netrw_localrmdir = expand("$COMSPEC")
let g:netrw_localrmdiropt= " /c rmdir"
endif
else
call s:NetrwInit("g:netrw_localrmdir","rmdir")
endif
endif
" following serves as an example for how to insert a version&patch specific test
"if v:version < 704 || (v:version == 704 && !has("patch1107"))
"endif
call s:NetrwInit("g:netrw_liststyle" , s:THINLIST)
" sanity checks
if g:netrw_liststyle < 0 || g:netrw_liststyle >= s:MAXLIST
Expand Down Expand Up @@ -5217,8 +5203,8 @@ fun! netrw#BrowseX(fname,remote)
if a:remote == 0 && isdirectory(a:fname)
" if its really just a local directory, then do a "gf" instead
" call Decho("remote≡0 and a:fname<".a:fname."> ".(isdirectory(a:fname)? "is a directory" : "is not a directory"),'~'.expand("<slnum>"))
" call Decho("..appears to be a local directory; using gf instead",'~'.expand("<slnum>"))
norm! gf
" call Decho("..appears to be a local directory; using e ".a:fname." instead",'~'.expand("<slnum>"))
exe "e ".a:fname
" call Dret("netrw#BrowseX")
return
elseif a:remote == 1 && a:fname !~ '^https\=:' && a:fname =~ '/$'
Expand Down Expand Up @@ -7158,17 +7144,8 @@ fun! s:NetrwMarkFileCopy(islocal,...)
" call Dret("s:NetrwMarkFileCopy : lcd failure")
return
endif
if v:version < 704 || (v:version == 704 && !has("patch1107"))
call s:NetrwExe("sil !".g:netrw_localrmdir.g:netrw_localrmdiropt." ".s:ShellEscape(tmpdir,1))
if v:shell_error != 0
call netrw#ErrorMsg(s:WARNING,"consider setting g:netrw_localrmdir<".g:netrw_localrmdir."> to something that works",80)
" " call Dret("s:NetrwMarkFileCopy : failed: sil !".g:netrw_localrmdir." ".s:ShellEscape(tmpdir,1) )
return
endif
else
if delete(tmpdir,"d")
call netrw#ErrorMsg(s:ERROR,"unable to delete directory <".tmpdir.">!",103)
endif
if delete(tmpdir,"d")
call netrw#ErrorMsg(s:ERROR,"unable to delete directory <".tmpdir.">!",103)
endif
else
if s:NetrwLcd(curdir)
Expand Down Expand Up @@ -9587,13 +9564,15 @@ fun! s:NetrwWideListing()
" call Decho("setl ma noro",'~'.expand("<slnum>"))
let b:netrw_cpf= 0
if line("$") >= w:netrw_bannercnt
" determine the maximum filename size; use that to set cpf
exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$g/^./if virtcol("$") > b:netrw_cpf|let b:netrw_cpf= virtcol("$")|endif'
NetrwKeepj call histdel("/",-1)
else
let @a= keepa
" call Dret("NetrwWideListing")
return
endif
" allow for two spaces to separate columns
let b:netrw_cpf= b:netrw_cpf + 2
" call Decho("b:netrw_cpf=max_filename_length+2=".b:netrw_cpf,'~'.expand("<slnum>"))

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

" preparation for removing multiple files/directories
let ykeep = @@
let ctr = a:firstline
let svpos = winsaveview()
let ykeep = @@
let ctr = a:firstline
let svpos = winsaveview()
let all = 0
" call Decho("saving posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))

" rename files given by the markfilelist
Expand Down Expand Up @@ -11078,6 +11059,23 @@ fun! s:NetrwLocalRename(path) range
let newname = substitute(oldname,subfrom,subto,'')
endif
endif
if !all && filereadable(newname)
call inputsave()
let response= input("File<".newname."> already exists; do you want to overwrite it? (y/all/n) ")
call inputrestore()
if response == "all"
let all= 1
elseif response != "y" && response != "yes"
" refresh the directory
" call Decho("refresh the directory listing",'~'.expand("<slnum>"))
NetrwKeepj call s:NetrwRefresh(1,s:NetrwBrowseChgDir(1,'./'))
" call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
NetrwKeepj call winrestview(svpos)
let @@= ykeep
" call Dret("NetrwLocalRename")
return
endif
endif
call rename(oldname,newname)
endfor
call s:NetrwUnmarkList(bufnr("%"),b:netrw_curdir)
Expand All @@ -11101,14 +11099,14 @@ fun! s:NetrwLocalRename(path) range

NetrwKeepj norm! 0
let oldname= s:ComposePath(a:path,curword)
" call Decho("oldname<".oldname.">",'~'.expand("<slnum>"))
" call Decho("oldname<".oldname.">",'~'.expand("<slnum>"))

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

call rename(oldname,newname)
" call Decho("renaming <".oldname."> to <".newname.">",'~'.expand("<slnum>"))
" call Decho("renaming <".oldname."> to <".newname.">",'~'.expand("<slnum>"))

let ctr= ctr + 1
endwhile
Expand Down Expand Up @@ -11896,6 +11894,9 @@ fun! s:NetrwExe(cmd)
" call Decho("exe ".a:cmd,'~'.expand("<slnum>"))
exe a:cmd
endif
if v:shell_error
call netrw#ErrorMsg(s:WARNING,"shell signalled an error",106)
endif
" call Dret("s:NetrwExe : v:shell_error=".v:shell_error)
endfun

Expand Down
2 changes: 1 addition & 1 deletion runtime/autoload/netrwSettings.vim
@@ -1,6 +1,6 @@
" netrwSettings.vim: makes netrw settings simpler
" Date: Nov 09, 2016
" Maintainer: Charles E Campbell <drchipNOSPAM at campbellfamily dot biz>
" Maintainer: Charles E Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
" Version: 16
" Copyright: Copyright (C) 1999-2007 Charles E. Campbell {{{1
" Permission is hereby granted to use and distribute this code,
Expand Down

0 comments on commit a1cb3f3

Please sign in to comment.