Skip to content
Permalink
Browse files

Merge remote-tracking branch 'vim/master'

  • Loading branch information
ychin committed Jan 14, 2020
2 parents 7b64f50 + c10b521 commit a1cb3f34bbd913a2e145f858041d9e7689d80a44
Showing with 2,459 additions and 711 deletions.
  1. +2 −0 .gitignore
  2. +2 −0 .hgignore
  3. +1 −0 Filelist
  4. +38 −38 LICENSE
  5. +2 −2 runtime/autoload/dist/ft.vim
  6. +2 −2 runtime/autoload/getscript.vim
  7. +42 −41 runtime/autoload/netrw.vim
  8. +1 −1 runtime/autoload/netrwSettings.vim
  9. +185 −59 runtime/autoload/tar.vim
  10. +18 −15 runtime/autoload/zip.vim
  11. +34 −22 runtime/doc/eval.txt
  12. +3 −2 runtime/doc/insert.txt
  13. +1 −1 runtime/doc/message.txt
  14. +1 −1 runtime/doc/options.txt
  15. +7 −7 runtime/doc/pi_getscript.txt
  16. +7 −5 runtime/doc/pi_logipat.txt
  17. +19 −12 runtime/doc/pi_netrw.txt
  18. +65 −46 runtime/doc/pi_tar.txt
  19. +2 −2 runtime/doc/pi_vimball.txt
  20. +10 −5 runtime/doc/pi_zip.txt
  21. +12 −3 runtime/doc/quickfix.txt
  22. +4 −1 runtime/doc/tags
  23. +9 −10 runtime/doc/tagsrch.txt
  24. +3 −3 runtime/doc/terminal.txt
  25. +0 −21 runtime/doc/textprop.txt
  26. +16 −9 runtime/doc/todo.txt
  27. +1 −1 runtime/doc/uganda.txt
  28. +1 −2 runtime/doc/version8.txt
  29. +1 −1 runtime/plugin/getscriptPlugin.vim
  30. +3 −3 runtime/plugin/netrwPlugin.vim
  31. +2 −2 runtime/plugin/tarPlugin.vim
  32. +4 −4 runtime/plugin/zipPlugin.vim
  33. +2 −2 runtime/syntax/2html.vim
  34. +14 −14 runtime/tools/ccfilter.c
  35. +2 −5 src/Make_cyg_ming.mak
  36. +5 −4 src/Make_mvc.mak
  37. +1 −1 src/Makefile
  38. +11 −2 src/arglist.c
  39. +4 −4 src/auto/configure
  40. +3 −0 src/autocmd.c
  41. +4 −0 src/buffer.c
  42. +2 −0 src/cindent.c
  43. +26 −13 src/cmdexpand.c
  44. +4 −4 src/configure.ac
  45. +43 −6 src/dict.c
  46. +26 −4 src/edit.c
  47. +35 −7 src/eval.c
  48. +20 −15 src/evalfunc.c
  49. +23 −56 src/evalvars.c
  50. +2 −1 src/evalwindow.c
  51. +2 −2 src/ex_cmds.h
  52. +5 −2 src/ex_docmd.c
  53. +1 −0 src/globals.h
  54. +2 −1 src/if_lua.c
  55. +2 −2 src/if_mzsch.c
  56. +3 −0 src/if_perl.xs
  57. +9 −7 src/if_py_both.h
  58. +83 −87 src/if_ruby.c
  59. +32 −15 src/insexpand.c
  60. +9 −3 src/json.c
  61. +1 −1 src/libvterm/src/parser.c
  62. +1 −1 src/libvterm/src/pen.c
  63. +12 −0 src/macros.h
  64. +9 −0 src/main.c
  65. +3 −0 src/map.c
  66. +31 −5 src/memline.c
  67. +1 −1 src/popupmenu.c
  68. +2 −2 src/popupwin.c
  69. +0 −1 src/proto/cmdexpand.pro
  70. +4 −2 src/proto/dict.pro
  71. +1 −0 src/proto/textprop.pro
  72. +16 −7 src/scriptfile.c
  73. +10 −2 src/sign.c
  74. +0 −6 src/sound.c
  75. +9 −1 src/spellfile.c
  76. +20 −2 src/structs.h
  77. +28 −7 src/tag.c
  78. +5 −5 src/testdir/dumps/Test_popupwin_20.dump
  79. +5 −5 src/testdir/dumps/Test_popupwin_21.dump
  80. 0 src/testdir/dumps/{Test_sign_cursor_01.dump → Test_sign_cursor_1.dump}
  81. +6 −0 src/testdir/dumps/Test_sign_cursor_2.dump
  82. 0 src/testdir/dumps/{Test_sign_cursor_02.dump → Test_sign_cursor_3.dump}
  83. +22 −0 src/testdir/test_autocmd.vim
  84. +9 −0 src/testdir/test_cindent.vim
  85. +12 −0 src/testdir/test_eval_stuff.vim
  86. +12 −3 src/testdir/test_execute_func.vim
  87. +52 −23 src/testdir/test_ins_complete.vim
  88. +31 −0 src/testdir/test_listener.vim
  89. +12 −0 src/testdir/test_messages.vim
  90. +53 −25 src/testdir/test_popupwin.vim
  91. +3 −3 src/testdir/test_python3.vim
  92. +25 −0 src/testdir/test_quickfix.vim
  93. +6 −2 src/testdir/test_signs.vim
  94. +28 −0 src/testdir/test_tabpage.vim
  95. +24 −0 src/testdir/test_tagfunc.vim
  96. +479 −0 src/testdir/test_tagjump.vim
  97. +96 −0 src/testdir/test_taglist.vim
  98. +220 −1 src/testdir/test_textprop.vim
  99. +17 −0 src/testdir/test_vimscript.vim
  100. +4 −0 src/testdir/test_window_cmd.vim
  101. +2 −1 src/testing.c
  102. +204 −11 src/textprop.c
  103. +3 −3 src/ui.c
  104. +8 −1 src/userfunc.c
  105. +80 −0 src/version.c
  106. +5 −5 src/vim.h
  107. +15 −7 src/viminfo.c
@@ -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
@@ -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-*
@@ -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
@@ -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-*
@@ -652,6 +652,7 @@ SRC_EXTRA = \
RT_ALL = \
README.txt \
README.md \
LICENSE \
CONTRIBUTING.md \
runtime/bugreport.vim \
runtime/doc/*.awk \
76 LICENSE
@@ -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
@@ -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.
@@ -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
@@ -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
@@ -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(".")
@@ -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,
@@ -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
@@ -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)

@@ -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
@@ -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 =~ '/$'
@@ -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)
@@ -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>"))

@@ -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
@@ -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
@@ -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)
@@ -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
@@ -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

@@ -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,

0 comments on commit a1cb3f3

Please sign in to comment.
You can’t perform that action at this time.