re-import sources as agreed with the maintainer
This commit is contained in:
parent
2380d15677
commit
00a251a9cc
192
.gitignore
vendored
192
.gitignore
vendored
@ -1,7 +1,187 @@
|
||||
/gvim16.png
|
||||
/gvim32.png
|
||||
/gvim48.png
|
||||
/gvim64.png
|
||||
/vim-7.0-specedit.patch
|
||||
/vim-7.4.tar.bz2
|
||||
/vim-7.4-2342.tar.bz2
|
||||
/vim-8.0-003.tar.bz2
|
||||
/vim-8.0-018.tar.bz2
|
||||
/vim-8.0-037.tar.bz2
|
||||
/vim-8.0-057.tar.bz2
|
||||
/vim-8.0-061.tar.bz2
|
||||
/vim-8.0-000.tar.bz2
|
||||
/vim-8.0-070.tar.bz2
|
||||
/vim-8.0-084.tar.bz2
|
||||
/vim-8.0-085.tar.bz2
|
||||
/vim-8.0-086.tar.bz2
|
||||
/vim-8.0-094.tar.bz2
|
||||
/vim-8.0-095.tar.bz2
|
||||
/vim-8.0-104.tar.bz2
|
||||
/vim-8.0-118.tar.bz2
|
||||
/vim-8.0-124.tar.bz2
|
||||
/vim-8.0-133.tar.bz2
|
||||
/vim-8.0-134.tar.bz2
|
||||
/vim-8.0-142.tar.bz2
|
||||
/vim-8.0-160.tar.bz2
|
||||
/vim-8.0-170.tar.bz2
|
||||
/vim-8.0-172.tar.bz2
|
||||
/vim-8.0-176.tar.bz2
|
||||
/vim-8.0-194.tar.bz2
|
||||
/vim-8.0-197.tar.bz2
|
||||
/vim-8.0-206.tar.bz2
|
||||
/vim-8.0-238.tar.bz2
|
||||
/vim-8.0-271.tar.bz2
|
||||
/vim-8.0-273.tar.bz2
|
||||
/vim-8.0-275.tar.bz2
|
||||
/vim-8.0-297.tar.bz2
|
||||
/vim-8.0-311.tar.bz2
|
||||
/vim-8.0-314.tar.bz2
|
||||
/vim-8.0-318.tar.bz2
|
||||
/vim-8.0-324.tar.bz2
|
||||
/vim-8.0-329.tar.bz2
|
||||
/vim-8.0-342.tar.bz2
|
||||
/vim-8.0-344.tar.bz2
|
||||
/vim-8.0-347.tar.bz2
|
||||
/vim-8.0-363.tar.bz2
|
||||
/vim-8.0-381.tar.bz2
|
||||
/vim-8.0-386.tar.bz2
|
||||
/vim-8.0-388.tar.bz2
|
||||
/vim-8.0-398.tar.bz2
|
||||
/vim-8.0-402.tar.bz2
|
||||
/vim-8.0-425.tar.bz2
|
||||
/vim-8.0-427.tar.bz2
|
||||
/vim-8.0-430.tar.bz2
|
||||
/vim-8.0-442.tar.bz2
|
||||
/vim-8.0-456.tar.bz2
|
||||
/vim-8.0-458.tar.bz2
|
||||
/vim-8.0-494.tar.bz2
|
||||
/vim-8.0-497.tar.bz2
|
||||
/vim-8.0-502.tar.bz2
|
||||
/vim-8.0-503.tar.bz2
|
||||
/vim-8.0-514.tar.bz2
|
||||
/vim-8.0-515.tar.bz2
|
||||
/vim-8.0-517.tar.bz2
|
||||
/vim-8.0-525.tar.bz2
|
||||
/vim-8.0-529.tar.bz2
|
||||
/vim-8.0-540.tar.bz2
|
||||
/vim-8.0-543.tar.bz2
|
||||
/vim-8.0-559.tar.bz2
|
||||
/vim-8.0-562.tar.bz2
|
||||
/vim-8.0-566.tar.bz2
|
||||
/vim-8.0-586.tar.bz2
|
||||
/vim-8.0-596.tar.bz2
|
||||
/vim-8.0-597.tar.bz2
|
||||
/vim-8.0-598.tar.bz2
|
||||
/vim-8.0-599.tar.bz2
|
||||
/vim-8.0-600.tar.bz2
|
||||
/vim-8.0-604.tar.bz2
|
||||
/vim-8.0-606.tar.bz2
|
||||
/vim-8.0-617.tar.bz2
|
||||
/vim-8.0-627.tar.bz2
|
||||
/vim-8.0-628.tar.bz2
|
||||
/vim-8.0-636.tar.bz2
|
||||
/vim-8.0-642.tar.bz2
|
||||
/vim-8.0-647.tar.bz2
|
||||
/vim-8.0-648.tar.bz2
|
||||
/vim-8.0-662.tar.bz2
|
||||
/vim-8.0-679.tar.bz2
|
||||
/vim-8.0-685.tar.bz2
|
||||
/vim-8.0-688.tar.bz2
|
||||
/vim-8.0-691.tar.bz2
|
||||
/vim-8.0-705.tar.bz2
|
||||
/vim-8.0-711.tar.bz2
|
||||
/vim-8.0-728.tar.bz2
|
||||
/vim-8.0-730.tar.bz2
|
||||
/vim-8.0-738.tar.bz2
|
||||
/vim-8.0-739.tar.bz2
|
||||
/vim-8.0-823.tar.bz2
|
||||
/vim-8.0-826.tar.bz2
|
||||
/vim-8.0-844.tar.bz2
|
||||
/vim-8.0-885.tar.bz2
|
||||
/vim-8.0-891.tar.bz2
|
||||
/vim-8.0-893.tar.bz2
|
||||
/vim-8.0-895.tar.bz2
|
||||
/vim-8.0-896.tar.bz2
|
||||
/vim-8.0-938.tar.bz2
|
||||
/vim-8.0-946.tar.bz2
|
||||
/vim-8.0-956.tar.bz2
|
||||
/vim-8.0-983.tar.bz2
|
||||
/vim-8.0-987.tar.bz2
|
||||
/vim-8.0-992.tar.bz2
|
||||
/vim-8.0-1030.tar.bz2
|
||||
/vim-8.0-1052.tar.bz2
|
||||
/vim-8.0-1056.tar.bz2
|
||||
/vim-8.0-1064.tar.bz2
|
||||
/vim-8.0-1067.tar.bz2
|
||||
/vim-8.0-1071.tar.bz2
|
||||
/vim-8.0-1092.tar.bz2
|
||||
/vim-8.0-1097.tar.bz2
|
||||
/vim-8.0-1098.tar.bz2
|
||||
/vim-8.0-1102.tar.bz2
|
||||
/vim-8.0-1123.tar.bz2
|
||||
/vim-8.0-1127.tar.bz2
|
||||
/vim-8.0-1129.tar.bz2
|
||||
/vim-8.0-1132.tar.bz2
|
||||
/vim-8.0-1144.tar.bz2
|
||||
/vim-8.0-1155.tar.bz2
|
||||
/vim-8.0-1171.tar.bz2
|
||||
/vim-8.0-1173.tar.bz2
|
||||
/vim-8.0-1175.tar.bz2
|
||||
/vim-8.0-1176.tar.bz2
|
||||
/vim-8.0-1184.tar.bz2
|
||||
/vim-8.0-1187.tar.bz2
|
||||
/vim-8.0-1203.tar.bz2
|
||||
/vim-8.0-1207.tar.bz2
|
||||
/vim-8.0-1213.tar.bz2
|
||||
/vim-8.0-1216.tar.bz2
|
||||
/vim-8.0-1226.tar.bz2
|
||||
/vim-8.0-1238.tar.bz2
|
||||
/vim-8.0-1240.tar.bz2
|
||||
/vim-8.0-1241.tar.bz2
|
||||
/vim-8.0-1257.tar.bz2
|
||||
/vim-8.0-1272.tar.bz2
|
||||
/vim-8.0-1274.tar.bz2
|
||||
/vim-8.0-1283.tar.bz2
|
||||
/vim-8.0-1322.tar.bz2
|
||||
/vim-8.0-1326.tar.bz2
|
||||
/vim-8.0-1330.tar.bz2
|
||||
/vim-8.0-1349.tar.bz2
|
||||
/vim-8.0-1351.tar.bz2
|
||||
/vim-8.0-1358.tar.bz2
|
||||
/vim-8.0-1359.tar.bz2
|
||||
/vim-8.0-1360.tar.bz2
|
||||
/vim-8.0-1367.tar.bz2
|
||||
/vim-8.0-1376.tar.bz2
|
||||
/vim-8.0-1379.tar.bz2
|
||||
/vim-8.0-1386.tar.bz2
|
||||
/vim-8.0-1387.tar.bz2
|
||||
/vim-8.0-1389.tar.bz2
|
||||
/vim-8.0-1390.tar.bz2
|
||||
/vim-8.0-1401.tar.bz2
|
||||
/vim-8.0-1406.tar.bz2
|
||||
/vim-8.0-1427.tar.bz2
|
||||
/vim-8.0-1428.tar.bz2
|
||||
/vim-8.0-1438.tar.bz2
|
||||
/vim-8.0-1451.tar.bz2
|
||||
/vim-8.0-1473.tar.bz2
|
||||
/vim-8.0-1475.tar.bz2
|
||||
/vim-8.0-1478.tar.bz2
|
||||
/vim-8.0-1505.tar.bz2
|
||||
/vim-8.0-1509.tar.bz2
|
||||
/vim-8.0-1520.tar.bz2
|
||||
/vim-8.0-1523.tar.bz2
|
||||
/vim-8.0-1527.tar.bz2
|
||||
/vim-8.0-1543.tar.bz2
|
||||
/vim-8.0-1553.tar.bz2
|
||||
/vim-8.0-1569.tar.bz2
|
||||
/vim-8.0-1573.tar.bz2
|
||||
/vim-8.0-1587.tar.bz2
|
||||
/vim-8.0-1589.tar.bz2
|
||||
/vim-8.0-1591.tar.bz2
|
||||
/vim-8.0-1599.tar.bz2
|
||||
/vim-8.0-1603.tar.bz2
|
||||
/vim-8.0-1605.tar.bz2
|
||||
/vim-8.0-1625.tar.bz2
|
||||
/vim-8.0-1630.tar.bz2
|
||||
/vim-8.0-1661.tar.bz2
|
||||
/vim-8.0-1666.tar.bz2
|
||||
/vim-8.0-1679.tar.bz2
|
||||
/vim-8.0-1704.tar.bz2
|
||||
/vim-8.0-1755.tar.bz2
|
||||
/vim-8.0-1763.tar.bz2
|
||||
/vim-cve3796.patch
|
||||
|
140
7.4.899
Normal file
140
7.4.899
Normal file
@ -0,0 +1,140 @@
|
||||
To: vim_dev@googlegroups.com
|
||||
Subject: Patch 7.4.899
|
||||
Fcc: outbox
|
||||
From: Bram Moolenaar <Bram@moolenaar.net>
|
||||
Mime-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
------------
|
||||
|
||||
Patch 7.4.899
|
||||
Problem: README file is not optimal.
|
||||
Solution: Move buttons, update some text. (closes #460)
|
||||
Files: README.txt, README.md
|
||||
|
||||
|
||||
*** ../vim-7.4.898/README.txt 2013-08-10 13:24:51.000000000 +0200
|
||||
--- README.txt 2015-10-25 13:50:34.962876572 +0100
|
||||
***************
|
||||
*** 1,7 ****
|
||||
README.txt for version 7.4 of Vim: Vi IMproved.
|
||||
|
||||
|
||||
! WHAT IS VIM
|
||||
|
||||
Vim is an almost compatible version of the UNIX editor Vi. Many new features
|
||||
have been added: multi-level undo, syntax highlighting, command line history,
|
||||
--- 1,7 ----
|
||||
README.txt for version 7.4 of Vim: Vi IMproved.
|
||||
|
||||
|
||||
! WHAT IS VIM?
|
||||
|
||||
Vim is an almost compatible version of the UNIX editor Vi. Many new features
|
||||
have been added: multi-level undo, syntax highlighting, command line history,
|
||||
***************
|
||||
*** 21,26 ****
|
||||
--- 21,30 ----
|
||||
|
||||
DISTRIBUTION
|
||||
|
||||
+ You can often use your favorite package manager to install Vim. On Mac and
|
||||
+ Linux a small version of Vim is pre-installed, you still need to install Vim
|
||||
+ if you want more features.
|
||||
+
|
||||
There are separate distributions for Unix, PC, Amiga and some other systems.
|
||||
This README.txt file comes with the runtime archive. It includes the
|
||||
documentation, syntax files and other files that are used at runtime. To run
|
||||
***************
|
||||
*** 94,101 ****
|
||||
The latest news about Vim can be found on the Vim home page:
|
||||
http://www.vim.org/
|
||||
|
||||
! If you have problems, have a look at the Vim FAQ:
|
||||
! http://vimdoc.sf.net/vimfaq.html
|
||||
|
||||
If you still have problems or any other questions, use one of the mailing
|
||||
lists to discuss them with Vim users and developers:
|
||||
--- 98,106 ----
|
||||
The latest news about Vim can be found on the Vim home page:
|
||||
http://www.vim.org/
|
||||
|
||||
! If you have problems, have a look at the Vim documentation or tips:
|
||||
! http://www.vim.org/docs.php
|
||||
! http://vim.wikia.com/wiki/Vim_Tips_Wiki
|
||||
|
||||
If you still have problems or any other questions, use one of the mailing
|
||||
lists to discuss them with Vim users and developers:
|
||||
***************
|
||||
*** 110,115 ****
|
||||
Send any other comments, patches, flowers and suggestions to:
|
||||
|
||||
Bram Moolenaar E-mail: Bram@vim.org
|
||||
- Finsterruetihof 1
|
||||
- 8134 Adliswil
|
||||
- Switzerland
|
||||
--- 115,117 ----
|
||||
*** ../vim-7.4.898/README.md 2015-09-25 17:50:16.350057915 +0200
|
||||
--- README.md 2015-10-25 13:50:31.734914034 +0100
|
||||
***************
|
||||
*** 1,7 ****
|
||||
`README.md` for version 7.4 of Vim: Vi IMproved.
|
||||
|
||||
|
||||
! ## What is VIM ##
|
||||
|
||||
Vim is an almost compatible version of the UNIX editor Vi. Many new features
|
||||
have been added: multi-level undo, syntax highlighting, command line history,
|
||||
--- 1,9 ----
|
||||
`README.md` for version 7.4 of Vim: Vi IMproved.
|
||||
+ [![Build Status](https://travis-ci.org/vim/vim.svg?branch=master)](https://travis-ci.org/vim/vim)
|
||||
+ [![Coverage Status](https://coveralls.io/repos/vim/vim/badge.svg?branch=master&service=github)](https://coveralls.io/github/vim/vim?branch=master)
|
||||
|
||||
|
||||
! ## What is Vim? ##
|
||||
|
||||
Vim is an almost compatible version of the UNIX editor Vi. Many new features
|
||||
have been added: multi-level undo, syntax highlighting, command line history,
|
||||
***************
|
||||
*** 21,26 ****
|
||||
--- 23,32 ----
|
||||
|
||||
## Distribution ##
|
||||
|
||||
+ You can often use your favorite package manager to install Vim. On Mac and
|
||||
+ Linux a small version of Vim is pre-installed, you still need to install Vim
|
||||
+ if you want more features.
|
||||
+
|
||||
There are separate distributions for Unix, PC, Amiga and some other systems.
|
||||
This `README.md` file comes with the runtime archive. It includes the
|
||||
documentation, syntax files and other files that are used at runtime. To run
|
||||
***************
|
||||
*** 29,37 ****
|
||||
want or must compile it yourself. Check http://www.vim.org/download.php for
|
||||
an overview of currently available distributions.
|
||||
|
||||
- [![Build Status](https://travis-ci.org/vim/vim.svg?branch=master)](https://travis-ci.org/vim/vim)
|
||||
- [![Coverage Status](https://coveralls.io/repos/vim/vim/badge.svg?branch=master&service=github)](https://coveralls.io/github/vim/vim?branch=master)
|
||||
-
|
||||
|
||||
## Documentation ##
|
||||
|
||||
--- 35,40 ----
|
||||
*** ../vim-7.4.898/src/version.c 2015-10-13 20:55:46.058715228 +0200
|
||||
--- src/version.c 2015-10-25 13:52:02.669858690 +0100
|
||||
***************
|
||||
*** 743,744 ****
|
||||
--- 743,746 ----
|
||||
{ /* Add new patch number below this line */
|
||||
+ /**/
|
||||
+ 899,
|
||||
/**/
|
||||
|
||||
--
|
||||
hundred-and-one symptoms of being an internet addict:
|
||||
45. You buy a Captain Kirk chair with a built-in keyboard and mouse.
|
||||
|
||||
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
||||
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
||||
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
||||
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|
210
ftplugin-spec.vim
Normal file
210
ftplugin-spec.vim
Normal file
@ -0,0 +1,210 @@
|
||||
" Plugin to update the %changelog section of RPM spec files
|
||||
" Filename: spec.vim
|
||||
" Maintainer: Igor Gnatenko i.gnatenko.brain@gmail.com
|
||||
" Former Maintainer: Gustavo Niemeyer <niemeyer@conectiva.com> (until March 2014)
|
||||
" Last Change: Mon Jun 01 21:15 MSK 2015 Igor Gnatenko
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
if !exists("no_plugin_maps") && !exists("no_spec_maps")
|
||||
if !hasmapto("<Plug>SpecChangelog")
|
||||
map <buffer> <LocalLeader>c <Plug>SpecChangelog
|
||||
endif
|
||||
endif
|
||||
|
||||
if !hasmapto("call <SID>SpecChangelog(\"\")<CR>")
|
||||
noremap <buffer> <unique> <script> <Plug>SpecChangelog :call <SID>SpecChangelog("")<CR>
|
||||
endif
|
||||
|
||||
if !exists("*s:GetRelVer")
|
||||
function! s:GetRelVer()
|
||||
if has('python')
|
||||
python << PYEND
|
||||
import sys, datetime, shutil, tempfile
|
||||
import vim
|
||||
|
||||
try:
|
||||
import rpm
|
||||
except ImportError:
|
||||
pass
|
||||
else:
|
||||
specfile = vim.current.buffer.name
|
||||
if specfile:
|
||||
rpm.delMacro("dist")
|
||||
spec = rpm.spec(specfile)
|
||||
headers = spec.sourceHeader
|
||||
version = headers["Version"]
|
||||
release = headers["Release"]
|
||||
vim.command("let ver = " + version)
|
||||
vim.command("let rel = " + release)
|
||||
PYEND
|
||||
endif
|
||||
endfunction
|
||||
endif
|
||||
|
||||
if !exists("*s:SpecChangelog")
|
||||
function s:SpecChangelog(format)
|
||||
if strlen(a:format) == 0
|
||||
if !exists("g:spec_chglog_format")
|
||||
let email = input("Name <email address>: ")
|
||||
let g:spec_chglog_format = "%a %b %d %Y " . l:email
|
||||
echo "\r"
|
||||
endif
|
||||
let format = g:spec_chglog_format
|
||||
else
|
||||
if !exists("g:spec_chglog_format")
|
||||
let g:spec_chglog_format = a:format
|
||||
endif
|
||||
let format = a:format
|
||||
endif
|
||||
let line = 0
|
||||
let name = ""
|
||||
let ver = ""
|
||||
let rel = ""
|
||||
let nameline = -1
|
||||
let verline = -1
|
||||
let relline = -1
|
||||
let chgline = -1
|
||||
while (line <= line("$"))
|
||||
let linestr = getline(line)
|
||||
if (name == "" && linestr =~? '^Name:')
|
||||
let nameline = line
|
||||
let name = substitute(strpart(linestr,5), '^[ ]*\([^ ]\+\)[ ]*$','\1','')
|
||||
elseif (ver == "" && linestr =~? '^Version:')
|
||||
let verline = line
|
||||
let ver = substitute(strpart(linestr,8), '^[ ]*\([^ ]\+\)[ ]*$','\1','')
|
||||
elseif (rel == "" && linestr =~? '^Release:')
|
||||
let relline = line
|
||||
let rel = substitute(strpart(linestr,8), '^[ ]*\([^ ]\+\)[ ]*$','\1','')
|
||||
elseif (linestr =~? '^%changelog')
|
||||
let chgline = line
|
||||
execute line
|
||||
break
|
||||
endif
|
||||
let line = line+1
|
||||
endwhile
|
||||
if (nameline != -1 && verline != -1 && relline != -1)
|
||||
let include_release_info = exists("g:spec_chglog_release_info")
|
||||
let name = s:ParseRpmVars(name, nameline)
|
||||
let ver = s:ParseRpmVars(ver, verline)
|
||||
let rel = s:ParseRpmVars(rel, relline)
|
||||
else
|
||||
let include_release_info = 0
|
||||
endif
|
||||
|
||||
call s:GetRelVer()
|
||||
|
||||
if (chgline == -1)
|
||||
let option = confirm("Can't find %changelog. Create one? ","&End of file\n&Here\n&Cancel",3)
|
||||
if (option == 1)
|
||||
call append(line("$"),"")
|
||||
call append(line("$"),"%changelog")
|
||||
execute line("$")
|
||||
let chgline = line(".")
|
||||
elseif (option == 2)
|
||||
call append(line("."),"%changelog")
|
||||
normal j
|
||||
chgline = line(".")
|
||||
endif
|
||||
endif
|
||||
if (chgline != -1)
|
||||
let tmptime = v:lc_time
|
||||
language time C
|
||||
let parsed_format = "* ".strftime(format)." - ".ver."-".rel
|
||||
execute "language time" tmptime
|
||||
let release_info = "+ ".name."-".ver."-".rel
|
||||
let wrong_format = 0
|
||||
let wrong_release = 0
|
||||
let insert_line = 0
|
||||
if (getline(chgline+1) != parsed_format)
|
||||
let wrong_format = 1
|
||||
endif
|
||||
if (include_release_info && getline(chgline+2) != release_info)
|
||||
let wrong_release = 1
|
||||
endif
|
||||
if (wrong_format || wrong_release)
|
||||
if (include_release_info && !wrong_release && !exists("g:spec_chglog_never_increase_release"))
|
||||
let option = confirm("Increase release? ","&Yes\n&No",1)
|
||||
if (option == 1)
|
||||
execute relline
|
||||
normal
|
||||
let rel = substitute(strpart(getline(relline),8), '^[ ]*\([^ ]\+\)[ ]*$','\1','')
|
||||
let release_info = "+ ".name."-".ver."-".rel
|
||||
endif
|
||||
endif
|
||||
let n = 0
|
||||
call append(chgline+n, parsed_format)
|
||||
if include_release_info
|
||||
let n = n + 1
|
||||
call append(chgline+n, release_info)
|
||||
endif
|
||||
let n = n + 1
|
||||
call append(chgline+n,"- ")
|
||||
let n = n + 1
|
||||
call append(chgline+n,"")
|
||||
let insert_line = chgline+n
|
||||
else
|
||||
let line = chgline
|
||||
if !exists("g:spec_chglog_prepend")
|
||||
while !(getline(line+2) =~ '^\( *\|\*.*\)$')
|
||||
let line = line+1
|
||||
endwhile
|
||||
endif
|
||||
call append(line+1,"- ")
|
||||
let insert_line = line+2
|
||||
endif
|
||||
execute insert_line
|
||||
startinsert!
|
||||
endif
|
||||
endfunction
|
||||
endif
|
||||
|
||||
if !exists("*s:ParseRpmVars")
|
||||
function s:ParseRpmVars(str, strline)
|
||||
let end = -1
|
||||
let ret = ""
|
||||
while (1)
|
||||
let start = match(a:str, "\%{", end+1)
|
||||
if (start == -1)
|
||||
let ret = ret . strpart(a:str, end+1)
|
||||
break
|
||||
endif
|
||||
let ret = ret . strpart(a:str, end+1, start-(end+1))
|
||||
let end = match(a:str, "}", start)
|
||||
if (end == -1)
|
||||
let ret = ret . strpart(a:str, start)
|
||||
break
|
||||
endif
|
||||
let varname = strpart(a:str, start+2, end-(start+2))
|
||||
execute a:strline
|
||||
let definestr = "^[ \t]*%(?:global|define)[ \t]\\+" . varname . "[ \t]\\+\\(.*\\)$"
|
||||
let linenum = search(definestr, "bW")
|
||||
if (linenum != -1)
|
||||
let ret = ret . substitute(getline(linenum), definestr, "\\1", "")
|
||||
else
|
||||
let ret = ret . strpart(str, start, end+1-start)
|
||||
endif
|
||||
endwhile
|
||||
return ret
|
||||
endfunction
|
||||
endif
|
||||
|
||||
" The following lines, along with the macros/matchit.vim plugin,
|
||||
" make it easy to navigate the different sections of a spec file
|
||||
" with the % key (thanks to Max Ischenko).
|
||||
|
||||
let b:match_ignorecase = 0
|
||||
let b:match_words =
|
||||
\ '^Name:^%description:^%clean:^%(?:auto)?setup:^%build:^%install:^%files:' .
|
||||
\ '^%package:^%preun:^%postun:^%changelog'
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
let b:undo_ftplugin = "unlet! b:match_ignorecase b:match_words"
|
64
gvim.desktop
Normal file
64
gvim.desktop
Normal file
@ -0,0 +1,64 @@
|
||||
[Desktop Entry]
|
||||
Name=Vi IMproved
|
||||
Name[bg]=Vi Ðåäàêòîð
|
||||
Name[ca]=Vi Millorat
|
||||
Name[da]=Vi forbedret
|
||||
Name[eo]=VIM
|
||||
Name[et]=Täiustatud Vi (vim)
|
||||
Name[fr]=Vi étendu (VIM)
|
||||
Name[he]=רפושמ Vi
|
||||
Name[hu]=Vi
|
||||
Name[is]=Vi IMproved ritillinn
|
||||
Name[it]=Vi iMproved
|
||||
Name[no]=Vi IMproved (forbedret VI)
|
||||
Name[pl]=Poprawiony VI (vim)
|
||||
Name[ro]=VIM
|
||||
Name[ru]=Улучшенный VI
|
||||
Name[sk]=Vi IMpreved
|
||||
Name[sl]=Izboljšani vi (vim)
|
||||
Name[sv]=Förbättrad Vi
|
||||
Name[zh_CN.GB2312]=改进的 Vi
|
||||
Comment=Powerful text editor with scripting functions and macro recorder
|
||||
Comment[bg]=Ðåäàêòîð ñ ìíîãî âúçìîæíîñòè
|
||||
Comment[ca]=Editor vi potent
|
||||
Comment[cs]=Mocný textový editor vi
|
||||
Comment[da]=En kraftig vi tekstbehandler
|
||||
Comment[de]=Ein leistungsfähiger vi-Editor
|
||||
Comment[el]=Πανίσχυρος διορθωτής vi
|
||||
Comment[eo]=VIM similas al redaktilo "vi", sed havas aldonajn ecojn
|
||||
Comment[es]=Una versión mejorada del editor vi
|
||||
Comment[et]=Võimas tekstiredaktor vi
|
||||
Comment[fi]=Tehokas vi-tekstieditori
|
||||
Comment[fr]=Éditeur vi puissant
|
||||
Comment[gl]=Potente editor vi
|
||||
Comment[he]=Vi המצועה בר ךרועה
|
||||
Comment[hr]=Napredni vi uređivač
|
||||
Comment[hu]=Vi szövegszerkesztő
|
||||
Comment[is]=Öflug útgáfa vi ritilsins
|
||||
Comment[it]=Un editor vi potenziato
|
||||
Comment[ja]=強力なViエディタ
|
||||
Comment[lt]=Galingas vi redaktorius
|
||||
Comment[mk]=Моќен VI уредувач
|
||||
Comment[nl]=Krachtige vi-editor
|
||||
Comment[no]=En kraftig vi-redigerer
|
||||
Comment[no_NY]=Kraftig vi-tekstredigeringsprogram
|
||||
Comment[pl]=Edytor vi
|
||||
Comment[pt]=Um poderoso editor de texto
|
||||
Comment[ro]=Un editor de texte VI, puternic
|
||||
Comment[ru]=Мощный текстовый редактор vi
|
||||
Comment[sk]=Silný textový procesor vi
|
||||
Comment[sl]=Zmogljivi urejevalnik vi
|
||||
Comment[sr]=Moćni vi editor
|
||||
Comment[sv]=En kraftfull texteditor
|
||||
Comment[ta]=ºì¾¢Å¡öó¾ vi ¦¾¡ÌôÀ¡Ç÷
|
||||
Comment[tr]=Güçlü vi düzenleyicisi
|
||||
Comment[uk]=Потужний редактор vi
|
||||
Comment[zh_CN.GB2312]=功能强大的 vi 编辑器
|
||||
MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
|
||||
Exec=gvim -f %F
|
||||
Icon=gvim
|
||||
Type=Application
|
||||
Terminal=false
|
||||
X-XClassHintResName=VIM
|
||||
MapNotify=false
|
||||
Categories=Utility;TextEditor;
|
BIN
gvim16.png
Normal file
BIN
gvim16.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 226 B |
BIN
gvim32.png
Normal file
BIN
gvim32.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 347 B |
BIN
gvim48.png
Normal file
BIN
gvim48.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 474 B |
BIN
gvim64.png
Normal file
BIN
gvim64.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.4 KiB |
6
sources
6
sources
@ -1,7 +1 @@
|
||||
SHA512 (gvim16.png) = 6c995b62c4bf547b8e23281e7df283631c771fa08f8727715d45ad34105195b68de023b65176c3f8709031fc81bf730c3933e8b034d8df041053a75ce108d10c
|
||||
SHA512 (gvim32.png) = 0fb0f6e6e852cd56e6af3e6bda973e09a8ccad7bce21135a8996390571f879f4706cf768f118b0520ca12fc01c960915e843c75a51404ff4c5fed2dd3efdf5a2
|
||||
SHA512 (gvim48.png) = 32541626b266a735c689b8e9d39a2dd37f077266e2708ed41e3a967f9087d5c041b2180023f3cd2d9faadb77a8d082c0926725a4b94420e90023631cfac2b8a5
|
||||
SHA512 (gvim64.png) = 3d51edec03e9ad1f35032da7efec1b1c64715fea2bb0433dd398baf75ba5ccf3325287c2f338723f08c04f473cbcb073933f538446536392353a7ceef52f7012
|
||||
SHA512 (vim-7.0-specedit.patch) = 0a70b60a950c19dbfa7affbaa3f064739f6792382e495f450a1687e7316dc7d83426d71a823e9b2e11f349920263e723117be269eec45324d71ff8a107c7b3ee
|
||||
SHA512 (vim-8.0-1763.tar.bz2) = 36b8df54aaeebbbc26c662d51e245a28c5a2e1e8e6a1444a717e3f7359b79c1bbc02152e4385eec9779361f681cc52601061f46f3bf185cae46a76e8361c25c8
|
||||
SHA512 (vim-cve3796.patch) = 8a886348c9bd49dd71d4debd7d9e09a10832ab92e87cb680f2a5d83b80846b702deaf1d581850ab1137b9a807a14ba3863aac90aae3217fdb89e38409d998334
|
||||
|
236
syntax-spec.vim
Normal file
236
syntax-spec.vim
Normal file
@ -0,0 +1,236 @@
|
||||
" Filename: spec.vim
|
||||
" Purpose: Vim syntax file
|
||||
" Language: SPEC: Build/install scripts for Linux RPM packages
|
||||
" Maintainer: Igor Gnatenko i.gnatenko.brain@gmail.com
|
||||
" Former Maintainer: Donovan Rebbechi elflord@panix.com (until March 2014)
|
||||
" Last Change: Sat Apr 9 15:30 2016 Filip Szymański
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
if version < 600
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syn sync minlines=1000
|
||||
|
||||
syn match specSpecialChar contained '[][!$()\\|>^;:{}]'
|
||||
syn match specColon contained ':'
|
||||
syn match specPercent contained '%'
|
||||
|
||||
syn match specVariables contained '\$\h\w*' contains=specSpecialVariablesNames,specSpecialChar
|
||||
syn match specVariables contained '\${\w*}' contains=specSpecialVariablesNames,specSpecialChar
|
||||
|
||||
syn match specMacroIdentifier contained '%\h\w*' contains=specMacroNameLocal,specMacroNameOther,specPercent
|
||||
syn match specMacroIdentifier contained '%{\w*}' contains=specMacroNameLocal,specMacroNameOther,specPercent,specSpecialChar
|
||||
|
||||
syn match specSpecialVariables contained '\$[0-9]\|\${[0-9]}'
|
||||
syn match specCommandOpts contained '\s\(-\w\+\|--\w[a-zA-Z_-]\+\)'ms=s+1
|
||||
syn match specComment '^\s*#.*$'
|
||||
|
||||
|
||||
syn case match
|
||||
|
||||
|
||||
"matches with no highlight
|
||||
syn match specNoNumberHilite 'X11\|X11R6\|[a-zA-Z]*\.\d\|[a-zA-Z][-/]\d'
|
||||
syn match specManpageFile '[a-zA-Z]\.1'
|
||||
|
||||
"Day, Month and most used license acronyms
|
||||
syn keyword specLicense contained GPL LGPL BSD MIT GNU
|
||||
syn keyword specWeekday contained Mon Tue Wed Thu Fri Sat Sun
|
||||
syn keyword specMonth contained Jan Feb Mar Apr Jun Jul Aug Sep Oct Nov Dec
|
||||
syn keyword specMonth contained January February March April May June July August September October November December
|
||||
|
||||
"#, @, www
|
||||
syn match specNumber '\(^-\=\|[ \t]-\=\|-\)[0-9.-]*[0-9]'
|
||||
syn match specEmail contained "<\=\<[A-Za-z0-9_.-]\+@\([A-Za-z0-9_-]\+\.\)\+[A-Za-z]\+\>>\="
|
||||
syn match specURL contained '\<\(\(https\{0,1}\|ftp\)://\|\(www[23]\{0,1}\.\|ftp\.\)\)[A-Za-z0-9._/~:,#-]\+\>'
|
||||
syn match specURLMacro contained '\<\(\(https\{0,1}\|ftp\)://\|\(www[23]\{0,1}\.\|ftp\.\)\)[A-Za-z0-9._/~:,#%{}-]\+\>' contains=specMacroIdentifier
|
||||
|
||||
"TODO take specSpecialVariables out of the cluster for the sh* contains (ALLBUT)
|
||||
"Special system directories
|
||||
syn match specListedFilesPrefix contained '/\(usr\|local\|opt\|X11R6\|X11\)/'me=e-1
|
||||
syn match specListedFilesBin contained '/s\=bin/'me=e-1
|
||||
syn match specListedFilesLib contained '/\(lib\|include\)/'me=e-1
|
||||
syn match specListedFilesDoc contained '/\(man\d*\|doc\|info\)\>'
|
||||
syn match specListedFilesEtc contained '/etc/'me=e-1
|
||||
syn match specListedFilesShare contained '/share/'me=e-1
|
||||
syn cluster specListedFiles contains=specListedFilesBin,specListedFilesLib,specListedFilesDoc,specListedFilesEtc,specListedFilesShare,specListedFilesPrefix,specVariables,specSpecialChar
|
||||
|
||||
"specComands
|
||||
syn match specConfigure contained '\./configure'
|
||||
syn match specTarCommand contained '\<tar\s\+[cxvpzIf]\{,5}\s*'
|
||||
syn keyword specCommandSpecial contained root
|
||||
syn keyword specCommand contained make xmkmf mkdir chmod ln find sed rm strip moc echo grep ls rm mv mkdir install cp pwd cat tail then else elif cd gzip rmdir ln eval export touch
|
||||
syn cluster specCommands contains=specCommand,specTarCommand,specConfigure,specCommandSpecial
|
||||
|
||||
"frequently used rpm env vars
|
||||
syn keyword specSpecialVariablesNames contained RPM_BUILD_ROOT RPM_BUILD_DIR RPM_SOURCE_DIR RPM_OPT_FLAGS LDFLAGS CC CC_FLAGS CPPNAME CFLAGS CXX CXXFLAGS CPPFLAGS
|
||||
|
||||
"valid macro names from /usr/lib/rpm/macros
|
||||
syn keyword specMacroNameOther contained buildroot buildsubdir distribution disturl ix86 name nil optflags perl_sitearch release requires_eq vendor version
|
||||
syn match specMacroNameOther contained '\<\(PATCH\|SOURCE\)\d*\>'
|
||||
|
||||
"valid _macro names from /usr/lib/rpm/macros
|
||||
syn keyword specMacroNameLocal contained _arch _binary_payload _bindir _build _build_alias _build_cpu _builddir _build_os _buildshell _buildsubdir _build_vendor _bzip2bin _datadir _dbpath _dbpath_rebuild _defaultdocdir _docdir _excludedocs _exec_prefix _fixgroup _fixowner _fixperms _ftpport _ftpproxy _gpg_path _gzipbin _host _host_alias _host_cpu _host_os _host_vendor _httpport _httpproxy _includedir _infodir _install_langs _install_script_path _instchangelog _langpatt _lib _libdir _libexecdir _localstatedir _mandir _netsharedpath _oldincludedir _os _pgpbin _pgp_path _prefix _preScriptEnvironment _provides _rpmdir _rpmfilename _sbindir _sharedstatedir _signature _sourcedir _source_payload _specdir _srcrpmdir _sysconfdir _target _target_alias _target_cpu _target_os _target_platform _target_vendor _timecheck _tmppath _topdir _usr _usrsrc _var _vendor
|
||||
|
||||
|
||||
"------------------------------------------------------------------------------
|
||||
" here's is all the spec sections definitions: PreAmble, Description, Package,
|
||||
" Scripts, Files and Changelog
|
||||
|
||||
"One line macros - valid in all ScriptAreas
|
||||
"tip: remember do include new items on specScriptArea's skip section
|
||||
syn region specSectionMacroArea oneline matchgroup=specSectionMacro start='^%\(define\|global\|patch\d*\|setup\|autosetup\|autopatch\|configure\|GNUconfigure\|find_lang\|make_build\|makeinstall\|make_install\|include\)\>' end='$' contains=specCommandOpts,specMacroIdentifier
|
||||
syn region specSectionMacroBracketArea oneline matchgroup=specSectionMacro start='^%{\(configure\|GNUconfigure\|find_lang\|make_build\|makeinstall\|make_install\)}' end='$' contains=specCommandOpts,specMacroIdentifier
|
||||
|
||||
"%% Files Section %%
|
||||
"TODO %config valid parameters: missingok\|noreplace
|
||||
"TODO %verify valid parameters: \(not\)\= \(md5\|atime\|...\)
|
||||
syn region specFilesArea matchgroup=specSection start='^%[Ff][Ii][Ll][Ee][Ss]\>' skip='%\(attrib\|defattr\|attr\|dir\|config\|docdir\|doc\|lang\|verify\|ghost\)\>' end='^%[a-zA-Z]'me=e-2 contains=specFilesOpts,specFilesDirective,@specListedFiles,specComment,specCommandSpecial,specMacroIdentifier
|
||||
"tip: remember to include new itens in specFilesArea above
|
||||
syn match specFilesDirective contained '%\(attrib\|defattr\|attr\|dir\|config\|docdir\|doc\|lang\|verify\|ghost\)\>'
|
||||
|
||||
"valid options for certain section headers
|
||||
syn match specDescriptionOpts contained '\s-[ln]\s*\a'ms=s+1,me=e-1
|
||||
syn match specPackageOpts contained '\s-n\s*\w'ms=s+1,me=e-1
|
||||
syn match specFilesOpts contained '\s-f\s*\w'ms=s+1,me=e-1
|
||||
|
||||
|
||||
syn case ignore
|
||||
|
||||
|
||||
"%% PreAmble Section %%
|
||||
"Copyright and Serial were deprecated by License and Epoch
|
||||
syn region specPreAmbleDeprecated oneline matchgroup=specError start='^\(Copyright\|Serial\)' end='$' contains=specEmail,specURL,specURLMacro,specLicense,specColon,specVariables,specSpecialChar,specMacroIdentifier
|
||||
syn region specPreAmble oneline matchgroup=specCommand start='^\(Prereq\|Summary\|Name\|Version\|Packager\|Requires\|Recommends\|Suggests\|Supplements\|Enhances\|Icon\|URL\|Source\d*\|Patch\d*\|Prefix\|Packager\|Group\|License\|Release\|BuildRoot\|Distribution\|Vendor\|Provides\|ExclusiveArch\|ExcludeArch\|ExclusiveOS\|Obsoletes\|BuildArch\|BuildArchitectures\|BuildRequires\|BuildConflicts\|BuildPreReq\|Conflicts\|AutoRequires\|AutoReq\|AutoReqProv\|AutoProv\|Epoch\)' end='$' contains=specEmail,specURL,specURLMacro,specLicense,specColon,specVariables,specSpecialChar,specMacroIdentifier
|
||||
|
||||
"%% Description Section %%
|
||||
syn region specDescriptionArea matchgroup=specSection start='^%description' end='^%'me=e-1 contains=specDescriptionOpts,specEmail,specURL,specNumber,specMacroIdentifier,specComment
|
||||
|
||||
"%% Package Section %%
|
||||
syn region specPackageArea matchgroup=specSection start='^%package' end='^%'me=e-1 contains=specPackageOpts,specPreAmble,specComment
|
||||
|
||||
"%% Scripts Section %%
|
||||
syn region specScriptArea matchgroup=specSection start='^%\(prep\|build\|install\|clean\|pre\|postun\|preun\|post\|posttrans\)\>' skip='^%{\|^%\(define\|patch\d*\|configure\|GNUconfigure\|setup\|autosetup\|autopatch\|find_lang\|make_build\|makeinstall\|make_install\)\>' end='^%'me=e-1 contains=specSpecialVariables,specVariables,@specCommands,specVariables,shDo,shFor,shCaseEsac,specNoNumberHilite,specCommandOpts,shComment,shIf,specSpecialChar,specMacroIdentifier,specSectionMacroArea,specSectionMacroBracketArea,shOperator,shQuote1,shQuote2
|
||||
|
||||
"%% Changelog Section %%
|
||||
syn region specChangelogArea matchgroup=specSection start='^%changelog' end='^%'me=e-1 contains=specEmail,specURL,specWeekday,specMonth,specNumber,specComment,specLicense
|
||||
|
||||
|
||||
|
||||
"------------------------------------------------------------------------------
|
||||
"here's the shell syntax for all the Script Sections
|
||||
|
||||
|
||||
syn case match
|
||||
|
||||
|
||||
"sh-like comment stile, only valid in script part
|
||||
syn match shComment contained '#.*$'
|
||||
|
||||
syn region shQuote1 contained matchgroup=shQuoteDelim start=+'+ skip=+\\'+ end=+'+ contains=specMacroIdentifier
|
||||
syn region shQuote2 contained matchgroup=shQuoteDelim start=+"+ skip=+\\"+ end=+"+ contains=specVariables,specMacroIdentifier
|
||||
|
||||
syn match shOperator contained '[><|!&;]\|[!=]='
|
||||
syn region shDo transparent matchgroup=specBlock start="\<do\>" end="\<done\>" contains=ALLBUT,shFunction,shDoError,shCase,specPreAmble,@specListedFiles
|
||||
|
||||
syn region specIf matchgroup=specBlock start="%ifosf\|%ifos\|%ifnos\|%ifarch\|%ifnarch\|%else" end='%endif' contains=ALLBUT, specIfError, shCase
|
||||
|
||||
syn region shIf transparent matchgroup=specBlock start="\<if\>" end="\<fi\>" contains=ALLBUT,shFunction,shIfError,shCase,@specListedFiles
|
||||
|
||||
syn region shFor matchgroup=specBlock start="\<for\>" end="\<in\>" contains=ALLBUT,shFunction,shInError,shCase,@specListedFiles
|
||||
|
||||
syn region shCaseEsac transparent matchgroup=specBlock start="\<case\>" matchgroup=NONE end="\<in\>"me=s-1 contains=ALLBUT,shFunction,shCaseError,@specListedFiles nextgroup=shCaseEsac
|
||||
syn region shCaseEsac matchgroup=specBlock start="\<in\>" end="\<esac\>" contains=ALLBUT,shFunction,shCaseError,@specListedFilesBin
|
||||
syn region shCase matchgroup=specBlock contained start=")" end=";;" contains=ALLBUT,shFunction,shCaseError,shCase,@specListedFiles
|
||||
|
||||
syn sync match shDoSync grouphere shDo "\<do\>"
|
||||
syn sync match shDoSync groupthere shDo "\<done\>"
|
||||
syn sync match shIfSync grouphere shIf "\<if\>"
|
||||
syn sync match shIfSync groupthere shIf "\<fi\>"
|
||||
syn sync match specIfSync grouphere specIf "%ifarch\|%ifos\|%ifnos"
|
||||
syn sync match specIfSync groupthere specIf "%endIf"
|
||||
syn sync match shForSync grouphere shFor "\<for\>"
|
||||
syn sync match shForSync groupthere shFor "\<in\>"
|
||||
syn sync match shCaseEsacSync grouphere shCaseEsac "\<case\>"
|
||||
syn sync match shCaseEsacSync groupthere shCaseEsac "\<esac\>"
|
||||
|
||||
" Define the default highlighting.
|
||||
" For version 5.7 and earlier: only when not done already
|
||||
" For version 5.8 and later: only when an item doesn't have highlighting yet
|
||||
if version >= 508 || !exists("did_spec_syntax_inits")
|
||||
if version < 508
|
||||
let did_spec_syntax_inits = 1
|
||||
command -nargs=+ HiLink hi link <args>
|
||||
else
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
endif
|
||||
|
||||
"main types color definitions
|
||||
HiLink specSection Structure
|
||||
HiLink specSectionMacro Macro
|
||||
HiLink specWWWlink PreProc
|
||||
HiLink specOpts Operator
|
||||
|
||||
"yes, it's ugly, but white is sooo cool
|
||||
if &background == "dark"
|
||||
hi def specGlobalMacro ctermfg=white
|
||||
else
|
||||
HiLink specGlobalMacro Identifier
|
||||
endif
|
||||
|
||||
"sh colors
|
||||
HiLink shComment Comment
|
||||
HiLink shIf Statement
|
||||
HiLink shOperator Special
|
||||
HiLink shQuote1 String
|
||||
HiLink shQuote2 String
|
||||
HiLink shQuoteDelim Statement
|
||||
|
||||
"spec colors
|
||||
HiLink specBlock Function
|
||||
HiLink specColon Special
|
||||
HiLink specCommand Statement
|
||||
HiLink specCommandOpts specOpts
|
||||
HiLink specCommandSpecial Special
|
||||
HiLink specComment Comment
|
||||
HiLink specConfigure specCommand
|
||||
HiLink specDate String
|
||||
HiLink specDescriptionOpts specOpts
|
||||
HiLink specEmail specWWWlink
|
||||
HiLink specError Error
|
||||
HiLink specFilesDirective specSectionMacro
|
||||
HiLink specFilesOpts specOpts
|
||||
HiLink specLicense String
|
||||
HiLink specMacroNameLocal specGlobalMacro
|
||||
HiLink specMacroNameOther specGlobalMacro
|
||||
HiLink specManpageFile NONE
|
||||
HiLink specMonth specDate
|
||||
HiLink specNoNumberHilite NONE
|
||||
HiLink specNumber Number
|
||||
HiLink specPackageOpts specOpts
|
||||
HiLink specPercent Special
|
||||
HiLink specSpecialChar Special
|
||||
HiLink specSpecialVariables specGlobalMacro
|
||||
HiLink specSpecialVariablesNames specGlobalMacro
|
||||
HiLink specTarCommand specCommand
|
||||
HiLink specURL specWWWlink
|
||||
HiLink specURLMacro specWWWlink
|
||||
HiLink specVariables Identifier
|
||||
HiLink specWeekday specDate
|
||||
HiLink specListedFilesBin Statement
|
||||
HiLink specListedFilesDoc Statement
|
||||
HiLink specListedFilesEtc Statement
|
||||
HiLink specListedFilesLib Statement
|
||||
HiLink specListedFilesPrefix Statement
|
||||
HiLink specListedFilesShare Statement
|
||||
|
||||
delcommand HiLink
|
||||
endif
|
||||
|
||||
let b:current_syntax = "spec"
|
||||
|
||||
" vim: ts=8
|
64
tests/netrw-plugin-delete-command-broken/Makefile
Normal file
64
tests/netrw-plugin-delete-command-broken/Makefile
Normal file
@ -0,0 +1,64 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of netrw-plugin-delete-command-broken
|
||||
# Description: Test for netrw plugin: delete command broken
|
||||
# Author: Petr Splichal <psplicha@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2009 Red Hat, Inc. All rights reserved.
|
||||
#
|
||||
# This copyrighted material is made available to anyone wishing
|
||||
# to use, modify, copy, or redistribute it subject to the terms
|
||||
# and conditions of the GNU General Public License version 2.
|
||||
#
|
||||
# This program is distributed in the hope that it will be
|
||||
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
# PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public
|
||||
# License along with this program; if not, write to the Free
|
||||
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
# Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
export TEST=/CoreOS/vim/Regression/netrw-plugin-delete-command-broken
|
||||
export TESTVERSION=1.0
|
||||
|
||||
BUILT_FILES=
|
||||
|
||||
FILES=$(METADATA) runtest.sh Makefile PURPOSE
|
||||
|
||||
.PHONY: all install download clean
|
||||
|
||||
run: $(FILES) build
|
||||
./runtest.sh
|
||||
|
||||
build: $(BUILT_FILES)
|
||||
chmod a+x runtest.sh
|
||||
|
||||
clean:
|
||||
rm -f *~ $(BUILT_FILES)
|
||||
|
||||
|
||||
include /usr/share/rhts/lib/rhts-make.include
|
||||
|
||||
$(METADATA): Makefile
|
||||
@echo "Owner: Petr Splichal <psplicha@redhat.com>" > $(METADATA)
|
||||
@echo "Name: $(TEST)" >> $(METADATA)
|
||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||
@echo "Description: Test for netrw plugin: delete command broken" >> $(METADATA)
|
||||
@echo "Type: Regression" >> $(METADATA)
|
||||
@echo "TestTime: 5m" >> $(METADATA)
|
||||
@echo "RunFor: vim" >> $(METADATA)
|
||||
@echo "Requires: vim" >> $(METADATA)
|
||||
@echo "Priority: Normal" >> $(METADATA)
|
||||
@echo "License: GPLv2" >> $(METADATA)
|
||||
@echo "Confidential: no" >> $(METADATA)
|
||||
@echo "Destructive: no" >> $(METADATA)
|
||||
@echo "Requires: vim-enhanced" >> $(METADATA)
|
||||
|
||||
rhts-lint $(METADATA)
|
9
tests/netrw-plugin-delete-command-broken/PURPOSE
Normal file
9
tests/netrw-plugin-delete-command-broken/PURPOSE
Normal file
@ -0,0 +1,9 @@
|
||||
PURPOSE of netrw-plugin-delete-command-broken
|
||||
Description: Test for netrw plugin: delete command broken
|
||||
Author: Petr Splichal <psplicha@redhat.com>
|
||||
Summary: netrw plugin: delete command broken
|
||||
|
||||
Description:
|
||||
|
||||
Regression to to verify the delete command of netrw plugin
|
||||
successfully deletes files or directories.
|
64
tests/netrw-plugin-delete-command-broken/runtest.sh
Executable file
64
tests/netrw-plugin-delete-command-broken/runtest.sh
Executable file
@ -0,0 +1,64 @@
|
||||
#!/bin/bash
|
||||
# vim: dict=/usr/share/rhts-library/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /CoreOS/vim/Regression/netrw-plugin-delete-command-broken
|
||||
# Description: Test for netrw plugin: delete command broken
|
||||
# Author: Petr Splichal <psplicha@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2009 Red Hat, Inc. All rights reserved.
|
||||
#
|
||||
# This copyrighted material is made available to anyone wishing
|
||||
# to use, modify, copy, or redistribute it subject to the terms
|
||||
# and conditions of the GNU General Public License version 2.
|
||||
#
|
||||
# This program is distributed in the hope that it will be
|
||||
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
# PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public
|
||||
# License along with this program; if not, write to the Free
|
||||
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
# Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
# Include rhts environment
|
||||
. /usr/bin/rhts-environment.sh
|
||||
. /usr/share/rhts-library/rhtslib.sh
|
||||
|
||||
PACKAGE="vim-enhanced"
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlAssertRpm $PACKAGE
|
||||
rlRun "TmpDir=\`mktemp -d\`" 0 "Creating tmp directory"
|
||||
rlRun "pushd $TmpDir"
|
||||
# create test file & dir
|
||||
rlRun "touch testfile" 0 "Creating test file"
|
||||
rlRun "mkdir testdir" 0 "Creating test directory"
|
||||
rlAssertExists "testfile"
|
||||
rlAssertExists "testdir"
|
||||
# create vim scripts
|
||||
rlRun "echo '/testfile
Dy
:q' > scriptfile" \
|
||||
0 "Creating file delete script"
|
||||
rlRun "echo '/testdir
Dy
:q' > scriptdir" \
|
||||
0 "Creating directory delete script"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlRun "vim . -s scriptfile" 0 "Deleting file using netrw"
|
||||
rlAssertNotExists "testfile"
|
||||
rlRun "vim . -s scriptdir" 0 "Deleting directory using netrw"
|
||||
rlAssertNotExists "testdir"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
23
tests/tests.yml
Normal file
23
tests/tests.yml
Normal file
@ -0,0 +1,23 @@
|
||||
---
|
||||
# This first play always runs on the local staging system
|
||||
- hosts: localhost
|
||||
roles:
|
||||
- role: standard-test-beakerlib
|
||||
tags:
|
||||
- classic
|
||||
- container
|
||||
tests:
|
||||
- netrw-plugin-delete-command-broken
|
||||
- vim-in-ex-mode-incorrectly-gives-an-eol-error
|
||||
required_packages:
|
||||
- vim-minimal
|
||||
- vim-enhanced
|
||||
|
||||
# Tests for Atomic Host
|
||||
- hosts: localhost
|
||||
roles:
|
||||
- role: standard-test-beakerlib
|
||||
tags:
|
||||
- atomic
|
||||
tests:
|
||||
- vim-in-ex-mode-incorrectly-gives-an-eol-error
|
63
tests/vim-in-ex-mode-incorrectly-gives-an-eol-error/Makefile
Normal file
63
tests/vim-in-ex-mode-incorrectly-gives-an-eol-error/Makefile
Normal file
@ -0,0 +1,63 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of /CoreOS/vim/Regression/vim-in-ex-mode-incorrectly-gives-an-eol-error
|
||||
# Description: Test for vim in ex mode incorrectly gives an eol error
|
||||
# Author: David Kutalek <dkutalek@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2010 Red Hat, Inc. All rights reserved.
|
||||
#
|
||||
# This copyrighted material is made available to anyone wishing
|
||||
# to use, modify, copy, or redistribute it subject to the terms
|
||||
# and conditions of the GNU General Public License version 2.
|
||||
#
|
||||
# This program is distributed in the hope that it will be
|
||||
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
# PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public
|
||||
# License along with this program; if not, write to the Free
|
||||
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
# Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
export TEST=/CoreOS/vim/Regression/vim-in-ex-mode-incorrectly-gives-an-eol-error
|
||||
export TESTVERSION=1.0
|
||||
|
||||
BUILT_FILES=
|
||||
|
||||
FILES=$(METADATA) runtest.sh Makefile PURPOSE exdoublequote expounddoublequote
|
||||
|
||||
.PHONY: all install download clean
|
||||
|
||||
run: $(FILES) build
|
||||
./runtest.sh
|
||||
|
||||
build: $(BUILT_FILES)
|
||||
chmod a+x runtest.sh
|
||||
|
||||
clean:
|
||||
rm -f *~ $(BUILT_FILES)
|
||||
|
||||
|
||||
include /usr/share/rhts/lib/rhts-make.include
|
||||
|
||||
$(METADATA): Makefile
|
||||
@echo "Owner: David Kutalek <dkutalek@redhat.com>" > $(METADATA)
|
||||
@echo "Name: $(TEST)" >> $(METADATA)
|
||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||
@echo "Description: Test for vim in ex mode incorrectly gives an eol error" >> $(METADATA)
|
||||
@echo "Type: Regression" >> $(METADATA)
|
||||
@echo "TestTime: 5m" >> $(METADATA)
|
||||
@echo "RunFor: vim" >> $(METADATA)
|
||||
@echo "Requires: vim vim-minimal" >> $(METADATA)
|
||||
@echo "Priority: Normal" >> $(METADATA)
|
||||
@echo "License: GPLv2" >> $(METADATA)
|
||||
@echo "Confidential: no" >> $(METADATA)
|
||||
@echo "Destructive: no" >> $(METADATA)
|
||||
|
||||
rhts-lint $(METADATA)
|
@ -0,0 +1,3 @@
|
||||
PURPOSE of /CoreOS/vim/Regression/vim-in-ex-mode-incorrectly-gives-an-eol-error
|
||||
Description: Test for vim in ex mode incorrectly gives an eol error
|
||||
Author: David Kutalek <dkutalek@redhat.com>
|
@ -0,0 +1,2 @@
|
||||
" comment
|
||||
q
|
@ -0,0 +1,2 @@
|
||||
#" comment
|
||||
q
|
46
tests/vim-in-ex-mode-incorrectly-gives-an-eol-error/runtest.sh
Executable file
46
tests/vim-in-ex-mode-incorrectly-gives-an-eol-error/runtest.sh
Executable file
@ -0,0 +1,46 @@
|
||||
#!/bin/bash
|
||||
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /CoreOS/vim/Regression/vim-in-ex-mode-incorrectly-gives-an-eol-error
|
||||
# Description: Test for vim in ex mode incorrectly gives an eol error
|
||||
# Author: David Kutalek <dkutalek@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2010 Red Hat, Inc. All rights reserved.
|
||||
#
|
||||
# This copyrighted material is made available to anyone wishing
|
||||
# to use, modify, copy, or redistribute it subject to the terms
|
||||
# and conditions of the GNU General Public License version 2.
|
||||
#
|
||||
# This program is distributed in the hope that it will be
|
||||
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
# PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public
|
||||
# License along with this program; if not, write to the Free
|
||||
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
# Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
# Include rhts environment
|
||||
. /usr/bin/rhts-environment.sh
|
||||
. /usr/lib/beakerlib/beakerlib.sh
|
||||
|
||||
PACKAGE="vim"
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlAssertRpm vim-minimal
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlRun "ex -u NONE ~/.bash_profile < ./exdoublequote"
|
||||
rlRun "ex -u NONE ~/.bash_profile < ./expounddoublequote"
|
||||
rlPhaseEnd
|
||||
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
126
vi_help.txt
Normal file
126
vi_help.txt
Normal file
@ -0,0 +1,126 @@
|
||||
*vi-help.txt* For Vim version 7.1. Last change: 2008 Mar 03
|
||||
|
||||
VIM - minimal help file
|
||||
(NOTE: This is a minimal help file and many tags won't work. Use 'vim' or
|
||||
'gvim' to read the complete help docs.)
|
||||
k
|
||||
Move around: Use the cursor keys, or "h" to go left, h l
|
||||
"j" to go down, "k" to go up, "l" to go right. j
|
||||
Close this window: Use ":q<Enter>".
|
||||
Get out of Vim: Use ":qa!<Enter>" (careful, all changes are lost!).
|
||||
|
||||
Jump to a subject: Position the cursor on a tag between |bars| and hit CTRL-].
|
||||
Jump back: Type CTRL-T or CTRL-O (repeat to go further back).
|
||||
|
||||
Get specific help: It is possible to go directly to whatever you want help
|
||||
on, by giving an argument to the ":help" command |:help|.
|
||||
It is possible to further specify the context:
|
||||
*vi-help-context*
|
||||
WHAT PREPEND EXAMPLE ~
|
||||
Normal mode command (nothing) :help x
|
||||
Insert mode command i_ :help i_<Esc>
|
||||
Command-line command : :help :quit
|
||||
Command-line editing c_ :help c_<Del>
|
||||
Vim command argument - :help -r
|
||||
Option ' :help 'textwidth'
|
||||
Search for help: Type ":help word", then hit CTRL-D to see matching
|
||||
help entries for "word".
|
||||
|
||||
VIM stands for Vi IMproved. Most of VIM was made by Bram Moolenaar, but only
|
||||
through the help of many others. See |vi-credits|.
|
||||
------------------------------------------------------------------------------
|
||||
3. Credits *vi-credits* *vi-author* *vi-Bram* *vi-Moolenaar*
|
||||
|
||||
Most of Vim was written by Bram Moolenaar <Bram@vim.org>.
|
||||
|
||||
Parts of the documentation come from several Vi manuals, written by:
|
||||
W.N. Joy
|
||||
Alan P.W. Hewett
|
||||
Mark Horton
|
||||
|
||||
The Vim editor is based on Stevie and includes (ideas from) other software,
|
||||
worked on by the people mentioned here. Other people helped by sending me
|
||||
patches, suggestions and giving feedback about what is good and bad in Vim.
|
||||
|
||||
Vim would never have become what it is now, without the help of these people!
|
||||
|
||||
Ron Aaron Win32 GUI changes
|
||||
Zoltan Arpadffy work on VMS port
|
||||
Tony Andrews Stevie
|
||||
Gert van Antwerpen changes for DJGPP on MS-DOS
|
||||
Berkeley DB(3) ideas for swap file implementation
|
||||
Keith Bostic Nvi
|
||||
Walter Briscoe Makefile updates, various patches
|
||||
Ralf Brown SPAWNO library for MS-DOS
|
||||
Robert Colon many useful remarks
|
||||
Marcin Dalecki GTK+ GUI port, toolbar icons, gettext()
|
||||
Kayhan Demirel sent me news in Uganda
|
||||
Chris & John Downey xvi (ideas for multi-windows version)
|
||||
Henk Elbers first VMS port
|
||||
Daniel Elstner GTK+ 2 port
|
||||
Eric Fischer Mac port, 'cindent', and other improvements
|
||||
Benji Fisher Answering lots of user questions
|
||||
Bill Foster Athena GUI port
|
||||
Loic Grenie xvim (ideas for multi windows version)
|
||||
Sven Guckes Vim promotor and previous WWW page maintainer
|
||||
Darren Hiebert Exuberant ctags
|
||||
Jason Hildebrand GTK+ 2 port
|
||||
Bruce Hunsaker improvements for VMS port
|
||||
Andy Kahn Cscope support, GTK+ GUI port
|
||||
Oezguer Kesim Maintainer of Vim Mailing Lists
|
||||
Axel Kielhorn work on the Macintosh port
|
||||
Steve Kirkendall Elvis
|
||||
Roger Knobbe original port to Windows NT
|
||||
Sergey Laskavy Vim's help from Moscow
|
||||
Felix von Leitner Maintainer of Vim Mailing Lists
|
||||
David Leonard Port of Python extensions to Unix
|
||||
Avner Lottem Edit in right-to-left windows
|
||||
Flemming Madsen X11 client-server, various features and patches
|
||||
MicroSoft Gave me a copy of DevStudio to compile Vim with
|
||||
Paul Moore Python interface extensions, many patches
|
||||
Katsuhito Nagano Work on multi-byte versions
|
||||
Sung-Hyun Nam Work on multi-byte versions
|
||||
Vince Negri Win32 GUI and generic console enhancements
|
||||
Steve Oualline Author of the first Vim book |frombook|
|
||||
George V. Reilly Win32 port, Win32 GUI start-off
|
||||
Stephen Riehm bug collector
|
||||
Stefan Roemer various patches and help to users
|
||||
Ralf Schandl IBM OS/390 port
|
||||
Olaf Seibert DICE and BeBox version, regexp improvements
|
||||
Mortaza Shiran Farsi patches
|
||||
Peter da Silva termlib
|
||||
Paul Slootman OS/2 port
|
||||
Henry Spencer regular expressions
|
||||
Dany St-Amant Macintosh port
|
||||
Tim Thompson Stevie
|
||||
G. R. (Fred) Walter Stevie
|
||||
Sven Verdoolaege Perl interface
|
||||
Robert Webb Command-line completion, GUI versions, and
|
||||
lots of patches
|
||||
Ingo Wilken Tcl interface
|
||||
Mike Williams PostScript printing
|
||||
Juergen Weigert Lattice version, AUX improvements, UNIX and
|
||||
MS-DOS ports, autoconf
|
||||
Stefan 'Sec' Zehl Maintainer of vim.org
|
||||
|
||||
I wish to thank all the people that sent me bug reports and suggestions. The
|
||||
list is too long to mention them all here. Vim would not be the same without
|
||||
the ideas from all these people: They keep Vim alive!
|
||||
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*vi-doc-file-list* *V_ct*
|
||||
BASIC:
|
||||
|copying| About copyrights
|
||||
|iccf| Helping poor children in Uganda
|
||||
|sponsor| Sponsor Vim development, become a registered Vim user
|
||||
|www| Vim on the World Wide Web
|
||||
|bugs| Where to send bug reports
|
||||
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
Now that you've jumped here with CTRL-] or a double mouse click, you can use
|
||||
CTRL-T, CTRL-O, g<RightMouse>, or <C-RightMouse> to go back to where you were.
|
||||
------------------------------------------------------------------------------
|
||||
vim:tw=78:fo=tcq2:isk=!-~,^*,^\|,^\":ts=8:ft=help:norl:
|
399
vim-7.0-hunspell.patch
Normal file
399
vim-7.0-hunspell.patch
Normal file
@ -0,0 +1,399 @@
|
||||
diff -ru vim70.orig/src/Makefile vim70.hunspell/src/Makefile
|
||||
--- vim70.orig/src/Makefile 2006-12-15 12:29:41.000000000 +0000
|
||||
+++ vim70.hunspell/src/Makefile 2006-12-14 11:11:20.000000000 +0000
|
||||
@@ -1287,7 +1287,7 @@
|
||||
PFLAGS = $(PROTO_FLAGS) -DPROTO $(LINT_CFLAGS)
|
||||
|
||||
ALL_LIB_DIRS = $(GUI_LIBS_DIR) $(X_LIBS_DIR)
|
||||
-ALL_LIBS = $(GUI_LIBS1) $(GUI_X_LIBS) $(GUI_LIBS2) $(X_PRE_LIBS) $(X_LIBS) $(X_EXTRA_LIBS) $(LIBS) $(EXTRA_LIBS) $(MZSCHEME_LIBS) $(PERL_LIBS) $(PYTHON_LIBS) $(TCL_LIBS) $(RUBY_LIBS) $(PROFILE_LIBS)
|
||||
+ALL_LIBS = $(GUI_LIBS1) $(GUI_X_LIBS) $(GUI_LIBS2) $(X_PRE_LIBS) $(X_LIBS) $(X_EXTRA_LIBS) $(LIBS) $(EXTRA_LIBS) $(MZSCHEME_LIBS) $(PERL_LIBS) $(PYTHON_LIBS) $(TCL_LIBS) $(RUBY_LIBS) $(PROFILE_LIBS) -lhunspell-1.1
|
||||
|
||||
# abbreviations
|
||||
DEST_BIN = $(DESTDIR)$(BINDIR)
|
||||
diff -ru vim70.orig/src/spell.c vim70.hunspell/src/spell.c
|
||||
--- vim70.orig/src/spell.c 2006-12-15 12:29:44.000000000 +0000
|
||||
+++ vim70.hunspell/src/spell.c 2006-12-15 12:27:49.000000000 +0000
|
||||
@@ -319,6 +319,8 @@
|
||||
# include <time.h> /* for time_t */
|
||||
#endif
|
||||
|
||||
+#include "hunspell/hunspell.h"
|
||||
+
|
||||
#define MAXWLEN 250 /* Assume max. word len is this many bytes.
|
||||
Some places assume a word length fits in a
|
||||
byte, thus it can't be above 255. */
|
||||
@@ -428,6 +430,8 @@
|
||||
#define SP_FORMERROR -2 /* format error in spell file */
|
||||
#define SP_OTHERERROR -3 /* other error while reading spell file */
|
||||
|
||||
+#define MAXREGIONS 20
|
||||
+
|
||||
/*
|
||||
* Structure used to store words and other info for one language, loaded from
|
||||
* a .spl file.
|
||||
@@ -450,6 +454,10 @@
|
||||
char_u *sl_name; /* language name "en", "en.rare", "nl", etc. */
|
||||
char_u *sl_fname; /* name of .spl file */
|
||||
int sl_add; /* TRUE if it's a .add file. */
|
||||
+ int sl_ishunspell; /* TRUE if it's an unconverted hunspell aff/dic combination. */
|
||||
+ Hunhandle *sl_hunspell;
|
||||
+ vimconv_T sl_tohunconv;
|
||||
+ vimconv_T sl_fromhunconv;
|
||||
|
||||
char_u *sl_fbyts; /* case-folded word bytes */
|
||||
idx_T *sl_fidxs; /* case-folded word indexes */
|
||||
@@ -460,7 +468,7 @@
|
||||
|
||||
char_u *sl_info; /* infotext string or NULL */
|
||||
|
||||
- char_u sl_regions[17]; /* table with up to 8 region names plus NUL */
|
||||
+ char_u sl_regions[MAXREGIONS * 2 + 1]; /* table with up to 8 region names plus NUL */
|
||||
|
||||
char_u *sl_midword; /* MIDWORD string or NULL */
|
||||
|
||||
@@ -997,6 +1005,36 @@
|
||||
static char_u *repl_from = NULL;
|
||||
static char_u *repl_to = NULL;
|
||||
|
||||
+static void
|
||||
+ensurehunspellinit(lp)
|
||||
+ slang_T *lp;
|
||||
+{
|
||||
+ if (!lp->sl_hunspell)
|
||||
+ {
|
||||
+ char_u *dic = lp->sl_fname;
|
||||
+ char_u *aff = vim_strnsave(dic, strlen(dic));
|
||||
+
|
||||
+ vim_strncpy(aff + strlen(aff) - 3, "aff", 3);
|
||||
+
|
||||
+ lp->sl_hunspell = Hunspell_create(aff, dic);
|
||||
+
|
||||
+ vim_free(aff);
|
||||
+
|
||||
+ if (convert_setup(&lp->sl_tohunconv, spell_enc(),
|
||||
+ Hunspell_get_dic_encoding(lp->sl_hunspell)) == FAIL)
|
||||
+ {
|
||||
+ lp->sl_tohunconv.vc_fail = TRUE;
|
||||
+ }
|
||||
+
|
||||
+ if (convert_setup(&lp->sl_fromhunconv,
|
||||
+ Hunspell_get_dic_encoding(lp->sl_hunspell), spell_enc()) == FAIL)
|
||||
+ {
|
||||
+ lp->sl_fromhunconv.vc_fail = TRUE;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+
|
||||
/*
|
||||
* Main spell-checking function.
|
||||
* "ptr" points to a character that could be the start of a word.
|
||||
@@ -1101,27 +1139,70 @@
|
||||
{
|
||||
mi.mi_lp = LANGP_ENTRY(wp->w_buffer->b_langp, lpi);
|
||||
|
||||
+ if (mi.mi_lp->lp_slang->sl_ishunspell)
|
||||
+ {
|
||||
+ slang_T *lp = mi.mi_lp->lp_slang;
|
||||
+ char_u *converted = 0;
|
||||
+ char_u *thisword;
|
||||
+ char_u *mi_end = mi.mi_end;
|
||||
+ char_u *mi_final = mi.mi_word + strlen(mi.mi_word);
|
||||
+
|
||||
+ while (1)
|
||||
+ {
|
||||
+ ensurehunspellinit(lp);
|
||||
+ if ((lp->sl_tohunconv.vc_fail == TRUE) || (lp->sl_fromhunconv.vc_fail == TRUE))
|
||||
+ break;
|
||||
+
|
||||
+ if (mi_end != mi.mi_word)
|
||||
+ {
|
||||
+ thisword = vim_strnsave(mi.mi_word, mi_end - mi.mi_word);
|
||||
+ converted = string_convert(&lp->sl_tohunconv, thisword, NULL);
|
||||
+ if (converted)
|
||||
+ {
|
||||
+ if (Hunspell_spell(lp->sl_hunspell, converted) != 0)
|
||||
+ {
|
||||
+ mi.mi_result = SP_OK;
|
||||
+ mi.mi_end = mi.mi_cend = mi.mi_word + strlen(thisword);
|
||||
+ }
|
||||
+ vim_free(converted);
|
||||
+ }
|
||||
+ vim_free(thisword);
|
||||
+ }
|
||||
+
|
||||
+ if (mi_end == mi_final)
|
||||
+ break;
|
||||
+
|
||||
+ do
|
||||
+ {
|
||||
+ mb_ptr_adv(mi_end);
|
||||
+ } while (*mi_end != NUL && spell_iswordp(mi_end, wp->w_buffer));
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
/* If reloading fails the language is still in the list but everything
|
||||
* has been cleared. */
|
||||
- if (mi.mi_lp->lp_slang->sl_fidxs == NULL)
|
||||
+ if (!mi.mi_lp->lp_slang->sl_ishunspell && mi.mi_lp->lp_slang->sl_fidxs == NULL)
|
||||
continue;
|
||||
|
||||
- /* Check for a matching word in case-folded words. */
|
||||
- find_word(&mi, FIND_FOLDWORD);
|
||||
+ if (!mi.mi_lp->lp_slang->sl_ishunspell)
|
||||
+ {
|
||||
+ /* Check for a matching word in case-folded words. */
|
||||
+ find_word(&mi, FIND_FOLDWORD);
|
||||
|
||||
- /* Check for a matching word in keep-case words. */
|
||||
- find_word(&mi, FIND_KEEPWORD);
|
||||
+ /* Check for a matching word in keep-case words. */
|
||||
+ find_word(&mi, FIND_KEEPWORD);
|
||||
|
||||
- /* Check for matching prefixes. */
|
||||
- find_prefix(&mi, FIND_FOLDWORD);
|
||||
+ /* Check for matching prefixes. */
|
||||
+ find_prefix(&mi, FIND_FOLDWORD);
|
||||
|
||||
- /* For a NOBREAK language, may want to use a word without a following
|
||||
- * word as a backup. */
|
||||
- if (mi.mi_lp->lp_slang->sl_nobreak && mi.mi_result == SP_BAD
|
||||
- && mi.mi_result2 != SP_BAD)
|
||||
- {
|
||||
- mi.mi_result = mi.mi_result2;
|
||||
- mi.mi_end = mi.mi_end2;
|
||||
+ /* For a NOBREAK language, may want to use a word without a following
|
||||
+ * word as a backup. */
|
||||
+ if (mi.mi_lp->lp_slang->sl_nobreak && mi.mi_result == SP_BAD
|
||||
+ && mi.mi_result2 != SP_BAD)
|
||||
+ {
|
||||
+ mi.mi_result = mi.mi_result2;
|
||||
+ mi.mi_end = mi.mi_end2;
|
||||
+ }
|
||||
}
|
||||
|
||||
/* Count the word in the first language where it's found to be OK. */
|
||||
@@ -2359,6 +2440,80 @@
|
||||
|
||||
if (r == FAIL)
|
||||
{
|
||||
+# define HUNSPELLDICT "/usr/share/myspell/"
|
||||
+ DIR *dirp = opendir(HUNSPELLDICT);
|
||||
+ if (dirp != NULL)
|
||||
+ {
|
||||
+ slang_T* thislang[MAXREGIONS] = {0};
|
||||
+ slang_T *lp = 0;
|
||||
+ struct dirent *dp;
|
||||
+ int i = 0;
|
||||
+
|
||||
+ while ((dp = readdir(dirp)) != NULL)
|
||||
+ {
|
||||
+ char_u final_name[MAXPATHL];
|
||||
+ char_u spf_name[MAXPATHL];
|
||||
+ char_u thisregion[3] = {0};
|
||||
+ char *resolvedlink = final_name;
|
||||
+ int j, regionpos;
|
||||
+
|
||||
+ if (strncmp(dp->d_name, lang, strlen(lang)) != 0)
|
||||
+ continue;
|
||||
+
|
||||
+ if ((strlen(dp->d_name) <= 4) || (dp->d_name[strlen(lang)] != '_'))
|
||||
+ continue;
|
||||
+
|
||||
+ if (strncmp(".dic", dp->d_name + strlen(dp->d_name) - 4, 4) != 0)
|
||||
+ continue;
|
||||
+
|
||||
+ vim_strncpy(spf_name, HUNSPELLDICT, strlen(HUNSPELLDICT));
|
||||
+ vim_strncpy(spf_name + strlen(HUNSPELLDICT), dp->d_name, strlen(HUNSPELLDICT));
|
||||
+
|
||||
+ if (realpath(spf_name, resolvedlink) != resolvedlink)
|
||||
+ continue;
|
||||
+
|
||||
+ thisregion[0] = tolower(dp->d_name[strlen(lang)+1]);
|
||||
+ thisregion[1] = tolower(dp->d_name[strlen(lang)+1+1]);
|
||||
+
|
||||
+ r = OK;
|
||||
+
|
||||
+ for (j = 0; j < MAXREGIONS; ++j)
|
||||
+ {
|
||||
+ if (thislang[j] && (strcmp(thislang[j]->sl_fname, final_name) == 0))
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ if (j < MAXREGIONS)
|
||||
+ lp = thislang[j];
|
||||
+ else
|
||||
+ {
|
||||
+ lp = slang_alloc(lang);
|
||||
+ lp->sl_ishunspell = TRUE;
|
||||
+
|
||||
+ lp->sl_fname = vim_strsave(resolvedlink);
|
||||
+
|
||||
+ lp->sl_next = first_lang;
|
||||
+ first_lang = lp;
|
||||
+ thislang[i] = lp;
|
||||
+ }
|
||||
+
|
||||
+ regionpos = 0;
|
||||
+ while (lp->sl_regions[regionpos] != 0) ++regionpos;
|
||||
+
|
||||
+ //silently lose regions which won't fit in
|
||||
+ if (regionpos == MAXREGIONS * 2)
|
||||
+ continue;
|
||||
+
|
||||
+ vim_strncpy(lp->sl_regions + regionpos, thisregion, 2);
|
||||
+
|
||||
+ ++i;
|
||||
+ }
|
||||
+ closedir(dirp);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (r == FAIL)
|
||||
+ {
|
||||
smsg((char_u *)_("Warning: Cannot find word list \"%s.%s.spl\" or \"%s.ascii.spl\""),
|
||||
lang, spell_enc(), lang);
|
||||
}
|
||||
@@ -2429,6 +2584,9 @@
|
||||
slang_free(lp)
|
||||
slang_T *lp;
|
||||
{
|
||||
+ Hunspell_destroy(lp->sl_hunspell);
|
||||
+ convert_setup(&lp->sl_tohunconv, NULL, NULL);
|
||||
+ convert_setup(&lp->sl_fromhunconv, NULL, NULL);
|
||||
vim_free(lp->sl_name);
|
||||
vim_free(lp->sl_fname);
|
||||
slang_clear(lp);
|
||||
@@ -2974,7 +3132,7 @@
|
||||
{
|
||||
int i;
|
||||
|
||||
- if (len > 16)
|
||||
+ if (len > MAXREGIONS*2)
|
||||
return SP_FORMERROR;
|
||||
for (i = 0; i < len; ++i)
|
||||
lp->sl_regions[i] = getc(fd); /* <regionname> */
|
||||
@@ -4112,6 +4270,7 @@
|
||||
/* loop over comma separated language names. */
|
||||
for (splp = buf->b_p_spl; *splp != NUL; )
|
||||
{
|
||||
+ int hunspellregionunsupported;
|
||||
/* Get one language name. */
|
||||
copy_option_part(&splp, lang, MAXWLEN, ",");
|
||||
|
||||
@@ -4182,6 +4341,7 @@
|
||||
/*
|
||||
* Loop over the languages, there can be several files for "lang".
|
||||
*/
|
||||
+ hunspellregionunsupported = 0;
|
||||
for (slang = first_lang; slang != NULL; slang = slang->sl_next)
|
||||
if (filename ? fullpathcmp(lang, slang->sl_fname, FALSE) == FPC_SAME
|
||||
: STRICMP(lang, slang->sl_name) == 0)
|
||||
@@ -4199,6 +4359,11 @@
|
||||
/* This addition file is for other regions. */
|
||||
region_mask = 0;
|
||||
}
|
||||
+ else if (slang->sl_ishunspell)
|
||||
+ {
|
||||
+ region_mask = 0;
|
||||
+ hunspellregionunsupported++;
|
||||
+ }
|
||||
else
|
||||
/* This is probably an error. Give a warning and
|
||||
* accept the words anyway. */
|
||||
@@ -4207,7 +4372,10 @@
|
||||
region);
|
||||
}
|
||||
else
|
||||
+ {
|
||||
+ hunspellregionunsupported--;
|
||||
region_mask = 1 << c;
|
||||
+ }
|
||||
}
|
||||
|
||||
if (region_mask != 0)
|
||||
@@ -4225,6 +4393,9 @@
|
||||
nobreak = TRUE;
|
||||
}
|
||||
}
|
||||
+
|
||||
+ if (region && hunspellregionunsupported >= 1)
|
||||
+ smsg((char_u *) _("Warning: region %s not supported"), region);
|
||||
}
|
||||
|
||||
/* round 0: load int_wordlist, if possible.
|
||||
@@ -4832,7 +5003,7 @@
|
||||
char_u *si_info; /* info text chars or NULL */
|
||||
int si_region_count; /* number of regions supported (1 when there
|
||||
are no regions) */
|
||||
- char_u si_region_name[16]; /* region names; used only if
|
||||
+ char_u si_region_name[MAXREGIONS*2]; /* region names; used only if
|
||||
* si_region_count > 1) */
|
||||
|
||||
garray_T si_rep; /* list of fromto_T entries from REP lines */
|
||||
@@ -7093,7 +7264,7 @@
|
||||
else
|
||||
{
|
||||
line += 8;
|
||||
- if (STRLEN(line) > 16)
|
||||
+ if (STRLEN(line) > MAXREGIONS)
|
||||
smsg((char_u *)_("Too many regions in %s line %d: %s"),
|
||||
fname, lnum, line);
|
||||
else
|
||||
@@ -8973,7 +9144,7 @@
|
||||
char_u wfname[MAXPATHL];
|
||||
char_u **innames;
|
||||
int incount;
|
||||
- afffile_T *(afile[8]);
|
||||
+ afffile_T *(afile[MAXREGIONS]);
|
||||
int i;
|
||||
int len;
|
||||
struct stat st;
|
||||
@@ -9040,8 +9211,8 @@
|
||||
EMSG(_(e_invarg)); /* need at least output and input names */
|
||||
else if (vim_strchr(gettail(wfname), '_') != NULL)
|
||||
EMSG(_("E751: Output file name must not have region name"));
|
||||
- else if (incount > 8)
|
||||
- EMSG(_("E754: Only up to 8 regions supported"));
|
||||
+ else if (incount > MAXREGIONS)
|
||||
+ EMSG2(_("E754: Only up to %d regions supported"), MAXREGIONS);
|
||||
else
|
||||
{
|
||||
/* Check for overwriting before doing things that may take a lot of
|
||||
@@ -11097,6 +11268,36 @@
|
||||
{
|
||||
lp = LANGP_ENTRY(curbuf->b_langp, lpi);
|
||||
|
||||
+ if (lp->lp_slang->sl_ishunspell)
|
||||
+ {
|
||||
+ slang_T *slp = lp->lp_slang;
|
||||
+ char **slst;
|
||||
+ char_u *converted = 0;
|
||||
+
|
||||
+ ensurehunspellinit(slp);
|
||||
+
|
||||
+ converted = string_convert(&slp->sl_tohunconv, su->su_fbadword, NULL);
|
||||
+ if (converted)
|
||||
+ {
|
||||
+ int suggests;
|
||||
+ suggests = Hunspell_suggest(slp->sl_hunspell, &slst, converted);
|
||||
+ if (suggests > 0)
|
||||
+ {
|
||||
+ int i;
|
||||
+ char_u *suggest;
|
||||
+ for (i = 0; i < suggests; ++i)
|
||||
+ {
|
||||
+ suggest = string_convert(&slp->sl_fromhunconv, slst[i], NULL);
|
||||
+ add_suggestion(su, &su->su_ga, suggest, su->su_badlen, i, 0, FALSE,
|
||||
+ slp, FALSE);
|
||||
+ vim_free(suggest);
|
||||
+ }
|
||||
+ free(slst);
|
||||
+ }
|
||||
+ vim_free(converted);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
/* If reloading a spell file fails it's still in the list but
|
||||
* everything has been cleared. */
|
||||
if (lp->lp_slang->sl_fbyts == NULL)
|
64
vim-7.0-specedit.patch
Normal file
64
vim-7.0-specedit.patch
Normal file
@ -0,0 +1,64 @@
|
||||
--- vim70/runtime/ftplugin/spec.vim.rh1 2006-05-10 19:37:45.000000000 +0200
|
||||
+++ vim70/runtime/ftplugin/spec.vim 2006-11-13 12:21:32.000000000 +0100
|
||||
@@ -18,11 +18,18 @@
|
||||
|
||||
if !exists("*s:SpecChangelog")
|
||||
function s:SpecChangelog(format)
|
||||
+ let save_time = v:lc_time
|
||||
if strlen(a:format) == 0
|
||||
if !exists("g:spec_chglog_format")
|
||||
- let email = input("Email address: ")
|
||||
- let g:spec_chglog_format = "%a %b %d %Y " . l:email
|
||||
- echo "\r"
|
||||
+ if !exists("g:packager")
|
||||
+ let email = input("Email address: ")
|
||||
+ let g:spec_chglog_format = "%a %b %d %Y " . l:email
|
||||
+ echo "\r"
|
||||
+ else
|
||||
+ let email = g:packager
|
||||
+ let g:spec_chglog_format = "%a %b %d %Y " . l:email
|
||||
+ echo "\r"
|
||||
+ endif
|
||||
endif
|
||||
let format = g:spec_chglog_format
|
||||
else
|
||||
@@ -58,7 +65,7 @@
|
||||
let line = line+1
|
||||
endwhile
|
||||
if (nameline != -1 && verline != -1 && relline != -1)
|
||||
- let include_release_info = exists("g:spec_chglog_release_info")
|
||||
+ let include_release_info = 1
|
||||
let name = s:ParseRpmVars(name, nameline)
|
||||
let ver = s:ParseRpmVars(ver, verline)
|
||||
let rel = s:ParseRpmVars(rel, relline)
|
||||
@@ -79,8 +86,10 @@
|
||||
endif
|
||||
endif
|
||||
if (chgline != -1)
|
||||
+ execute "language time C"
|
||||
let parsed_format = "* ".strftime(format)
|
||||
- let release_info = "+ ".name."-".ver."-".rel
|
||||
+ execute "language time " . save_time
|
||||
+ let release_info = ver."-".rel
|
||||
let wrong_format = 0
|
||||
let wrong_release = 0
|
||||
let insert_line = 0
|
||||
@@ -97,15 +106,14 @@
|
||||
execute relline
|
||||
normal
|
||||
let rel = substitute(strpart(getline(relline),8), '^[ ]*\([^ ]\+\)[ ]*$','\1','')
|
||||
- let release_info = "+ ".name."-".ver."-".rel
|
||||
+ let release_info = ver."-".rel
|
||||
endif
|
||||
endif
|
||||
let n = 0
|
||||
- call append(chgline+n, parsed_format)
|
||||
if include_release_info
|
||||
- let n = n + 1
|
||||
- call append(chgline+n, release_info)
|
||||
+ let parsed_format = parsed_format." ".release_info
|
||||
endif
|
||||
+ call append(chgline+n, parsed_format)
|
||||
let n = n + 1
|
||||
call append(chgline+n,"- ")
|
||||
let n = n + 1
|
12
vim-8.0-rhbz1365258.patch
Normal file
12
vim-8.0-rhbz1365258.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -up vim80/runtime/syntax/fstab.vim.1365258 vim80/runtime/syntax/fstab.vim
|
||||
--- vim80/runtime/syntax/fstab.vim.1365258 2016-12-15 10:56:25.822410344 +0100
|
||||
+++ vim80/runtime/syntax/fstab.vim 2016-12-15 10:56:52.161519612 +0100
|
||||
@@ -36,6 +36,8 @@ syn match fsOperator /[,=:#]/
|
||||
syn cluster fsDeviceCluster contains=fsOperator,fsDeviceKeyword,fsDeviceError
|
||||
syn match fsDeviceError /\%([^a-zA-Z0-9_\/#@:\.-]\|^\w\{-}\ze\W\)/ contained
|
||||
syn keyword fsDeviceKeyword contained none proc linproc tmpfs devpts devtmpfs sysfs usbfs
|
||||
+syn keyword fsDeviceKeyword contained PARTLABEL nextgroup=fsDeviceLabel
|
||||
+syn keyword fsDeviceKeyword contained PARTUUID nextgroup=fsDeviceUUID
|
||||
syn keyword fsDeviceKeyword contained LABEL nextgroup=fsDeviceLabel
|
||||
syn keyword fsDeviceKeyword contained UUID nextgroup=fsDeviceUUID
|
||||
syn keyword fsDeviceKeyword contained sshfs nextgroup=fsDeviceSshfs
|
51
vim-cve3796.patch
Normal file
51
vim-cve3796.patch
Normal file
@ -0,0 +1,51 @@
|
||||
diff --git a/src/normal.c b/src/normal.c
|
||||
index be0e75e..7d62e20 100644
|
||||
--- a/src/normal.c
|
||||
+++ b/src/normal.c
|
||||
@@ -7147,19 +7147,23 @@ nv_replace(cmdarg_T *cap)
|
||||
{
|
||||
/*
|
||||
* Get ptr again, because u_save and/or showmatch() will have
|
||||
- * released the line. At the same time we let know that the
|
||||
- * line will be changed.
|
||||
+ * released the line. This may also happen in ins_copychar().
|
||||
+ * At the same time we let know that the line will be changed.
|
||||
*/
|
||||
- ptr = ml_get_buf(curbuf, curwin->w_cursor.lnum, TRUE);
|
||||
if (cap->nchar == Ctrl_E || cap->nchar == Ctrl_Y)
|
||||
{
|
||||
int c = ins_copychar(curwin->w_cursor.lnum
|
||||
+ (cap->nchar == Ctrl_Y ? -1 : 1));
|
||||
+
|
||||
+ ptr = ml_get_buf(curbuf, curwin->w_cursor.lnum, TRUE);
|
||||
if (c != NUL)
|
||||
ptr[curwin->w_cursor.col] = c;
|
||||
}
|
||||
else
|
||||
+ {
|
||||
+ ptr = ml_get_buf(curbuf, curwin->w_cursor.lnum, TRUE);
|
||||
ptr[curwin->w_cursor.col] = cap->nchar;
|
||||
+ }
|
||||
if (p_sm && msg_silent == 0)
|
||||
showmatch(cap->nchar);
|
||||
++curwin->w_cursor.col;
|
||||
diff --git a/src/testdir/test_edit.vim b/src/testdir/test_edit.vim
|
||||
index 7278bcd..8818805 100644
|
||||
--- a/src/testdir/test_edit.vim
|
||||
+++ b/src/testdir/test_edit.vim
|
||||
@@ -1387,3 +1387,15 @@ func Test_edit_quit()
|
||||
only
|
||||
endfunc
|
||||
|
||||
+" Test for getting the character of the line below after "p"
|
||||
+func Test_edit_put_CTRL_E()
|
||||
+ set encoding=latin1
|
||||
+ new
|
||||
+ let @" = ''
|
||||
+ sil! norm orggRx
|
||||
+ sil! norm pr
|
||||
+ call assert_equal(['r', 'r'], getline(1, 2))
|
||||
+ bwipe!
|
||||
+ set encoding=utf-8
|
||||
+endfunc
|
||||
+
|
12
vim.spec
12
vim.spec
@ -24,7 +24,7 @@ Summary: The VIM editor
|
||||
URL: http://www.vim.org/
|
||||
Name: vim
|
||||
Version: %{baseversion}.%{patchlevel}
|
||||
Release: 19%{?dist}.4
|
||||
Release: 20%{?dist}
|
||||
License: Vim and MIT
|
||||
Source0: ftp://ftp.vim.org/pub/vim/unix/vim-%{baseversion}-%{patchlevel}.tar.bz2
|
||||
Source1: vim.sh
|
||||
@ -100,7 +100,7 @@ Patch3032: 0001-patch-8.2.4218-illegal-memory-access-with-bracketed-.patch
|
||||
Patch3033: 0001-patch-8.2.4253-using-freed-memory-when-substitute-wi.patch
|
||||
# CVE-2022-0361 vim: Heap-based Buffer Overflow in GitHub repository
|
||||
Patch3034: 0001-patch-8.2.4215-illegal-memory-access-when-copying-li.patch
|
||||
# CVE-2022-1154 vim: use after free in utf_ptr2char
|
||||
# 2073391 - CVE-2022-1154 vim: use after free in utf_ptr2char
|
||||
Patch3035: 0001-patch-8.2.4646-using-buffer-line-after-it-has-been-f.patch
|
||||
# CVE-2022-1621 vim: heap buffer overflow
|
||||
Patch3036: 0001-patch-8.2.4919-can-add-invalid-bytes-with-spellgood.patch
|
||||
@ -847,19 +847,19 @@ touch %{buildroot}/%{_datadir}/%{name}/vimfiles/doc/tags
|
||||
%{_datadir}/icons/locolor/*/apps/*
|
||||
|
||||
%changelog
|
||||
* Tue Jun 14 2022 Zdenek Dohnal <zdohnal@redhat.com> - 2:8.0.1763-19.4
|
||||
* Tue Jun 14 2022 Zdenek Dohnal <zdohnal@redhat.com> - 2:8.0.1763-20
|
||||
- fix issue reported by covscan
|
||||
|
||||
* Mon Jun 13 2022 Zdenek Dohnal <zdohnal@redhat.com> - 2:8.0.1763-19.3
|
||||
* Mon Jun 13 2022 Zdenek Dohnal <zdohnal@redhat.com> - 2:8.0.1763-20
|
||||
- CVE-2022-1785 vim: Out-of-bounds Write
|
||||
- CVE-2022-1897 vim: out-of-bounds write in vim_regsub_both() in regexp.c
|
||||
- CVE-2022-1927 vim: buffer over-read in utf_ptr2char() in mbyte.c
|
||||
|
||||
* Wed May 25 2022 Zdenek Dohnal <zdohnal@redhat.com> - 2:8.0.1763-19.2
|
||||
* Tue May 14 2022 Zdenek Dohnal <zdohnal@redhat.com> - 2:8.0.1763-20
|
||||
- CVE-2022-1621 vim: heap buffer overflow
|
||||
- CVE-2022-1629 vim: buffer over-read
|
||||
|
||||
* Sat Apr 09 2022 Zdenek Dohnal <zdohnal@redhat.com> - 2:8.0.1763-19.1
|
||||
* Sat Apr 09 2022 Zdenek Dohnal <zdohnal@redhat.com> - 2:8.0.1763-20
|
||||
- CVE-2022-1154 vim: use after free in utf_ptr2char
|
||||
|
||||
* Tue Feb 08 2022 Zdenek Dohnal <zdohnal@redhat.com> - 2:8.0.1763-19
|
||||
|
387
zip.vim
Normal file
387
zip.vim
Normal file
@ -0,0 +1,387 @@
|
||||
" zip.vim: Handles browsing zipfiles
|
||||
" AUTOLOAD PORTION
|
||||
" Date: Jul 30, 2008
|
||||
" Version: 22
|
||||
" Maintainer: Charles E Campbell, Jr <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
|
||||
" License: Vim License (see vim's :help license)
|
||||
" Copyright: Copyright (C) 2005-2008 Charles E. Campbell, Jr. {{{1
|
||||
" Permission is hereby granted to use and distribute this code,
|
||||
" with or without modifications, provided that this copyright
|
||||
" notice is copied with it. Like anything else that's free,
|
||||
" zip.vim and zipPlugin.vim are provided *as is* and comes with
|
||||
" no warranty of any kind, either expressed or implied. By using
|
||||
" this plugin, you agree that in no event will the copyright
|
||||
" holder be liable for any damages resulting from the use
|
||||
" of this software.
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Load Once: {{{1
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
if &cp || exists("g:loaded_zip") || v:version < 700
|
||||
finish
|
||||
endif
|
||||
|
||||
let g:loaded_zip = "v22"
|
||||
let s:zipfile_escape = ' ?&;\'
|
||||
let s:ERROR = 2
|
||||
let s:WARNING = 1
|
||||
let s:NOTE = 0
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Global Values: {{{1
|
||||
if !exists("g:zip_shq")
|
||||
if &shq != ""
|
||||
let g:zip_shq= &shq
|
||||
elseif has("unix")
|
||||
let g:zip_shq= "'"
|
||||
else
|
||||
let g:zip_shq= '"'
|
||||
endif
|
||||
endif
|
||||
if !exists("g:zip_zipcmd")
|
||||
let g:zip_zipcmd= "zip"
|
||||
endif
|
||||
if !exists("g:zip_unzipcmd")
|
||||
let g:zip_unzipcmd= "unzip"
|
||||
endif
|
||||
|
||||
" ----------------
|
||||
" Functions: {{{1
|
||||
" ----------------
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" zip#Browse: {{{2
|
||||
fun! zip#Browse(zipfile)
|
||||
" call Dfunc("zip#Browse(zipfile<".a:zipfile.">)")
|
||||
let repkeep= &report
|
||||
set report=10
|
||||
|
||||
" sanity checks
|
||||
if !exists("*fnameescape")
|
||||
if &verbose > 1
|
||||
echoerr "the zip plugin is not available (your vim doens't support fnameescape())"
|
||||
endif
|
||||
return
|
||||
endif
|
||||
if !executable(g:zip_unzipcmd)
|
||||
redraw!
|
||||
echohl Error | echo "***error*** (zip#Browse) unzip not available on your system"
|
||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
let &report= repkeep
|
||||
" call Dret("zip#Browse")
|
||||
return
|
||||
endif
|
||||
if !filereadable(a:zipfile)
|
||||
if a:zipfile !~# '^\a\+://'
|
||||
" if its an url, don't complain, let url-handlers such as vim do its thing
|
||||
redraw!
|
||||
echohl Error | echo "***error*** (zip#Browse) File not readable<".a:zipfile.">" | echohl None
|
||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
endif
|
||||
let &report= repkeep
|
||||
" call Dret("zip#Browse : file<".a:zipfile."> not readable")
|
||||
return
|
||||
endif
|
||||
" call Decho("passed sanity checks")
|
||||
if &ma != 1
|
||||
set ma
|
||||
endif
|
||||
let b:zipfile= a:zipfile
|
||||
|
||||
setlocal noswapfile
|
||||
setlocal buftype=nofile
|
||||
setlocal bufhidden=hide
|
||||
setlocal nobuflisted
|
||||
setlocal nowrap
|
||||
set ft=tar
|
||||
|
||||
" give header
|
||||
let lastline= line("$")
|
||||
call setline(lastline+1,'" zip.vim version '.g:loaded_zip)
|
||||
call setline(lastline+2,'" Browsing zipfile '.a:zipfile)
|
||||
call setline(lastline+3,'" Select a file with cursor and press ENTER')
|
||||
$put =''
|
||||
0d
|
||||
$
|
||||
|
||||
" call Decho("exe silent r! ".g:zip_unzipcmd." -l -- ".s:Escape(a:zipfile,1))
|
||||
exe "silent r! ".g:zip_unzipcmd." -l -- ".s:Escape(a:zipfile,1)
|
||||
if v:shell_error != 0
|
||||
redraw!
|
||||
echohl WarningMsg | echo "***warning*** (zip#Browse) ".fnameescape(a:zipfile)." is not a zip file" | echohl None
|
||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
silent %d
|
||||
let eikeep= &ei
|
||||
set ei=BufReadCmd,FileReadCmd
|
||||
exe "r ".fnameescape(a:zipfile)
|
||||
let &ei= eikeep
|
||||
1d
|
||||
" call Dret("zip#Browse")
|
||||
return
|
||||
endif
|
||||
" call Decho("line 6: ".getline(6))
|
||||
let namecol= stridx(getline(6),'Name') + 1
|
||||
" call Decho("namecol=".namecol)
|
||||
4,$g/^\s*----/d
|
||||
4,$g/^\s*\a/d
|
||||
$d
|
||||
if namecol > 0
|
||||
exe 'silent 4,$s/^.*\%'.namecol.'c//'
|
||||
endif
|
||||
|
||||
setlocal noma nomod ro
|
||||
noremap <silent> <buffer> <cr> :call <SID>ZipBrowseSelect()<cr>
|
||||
|
||||
let &report= repkeep
|
||||
" call Dret("zip#Browse")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" ZipBrowseSelect: {{{2
|
||||
fun! s:ZipBrowseSelect()
|
||||
" call Dfunc("ZipBrowseSelect() zipfile<".b:zipfile."> curfile<".expand("%").">")
|
||||
let repkeep= &report
|
||||
set report=10
|
||||
let fname= getline(".")
|
||||
|
||||
" sanity check
|
||||
if fname =~ '^"'
|
||||
let &report= repkeep
|
||||
" call Dret("ZipBrowseSelect")
|
||||
return
|
||||
endif
|
||||
if fname =~ '/$'
|
||||
redraw!
|
||||
echohl Error | echo "***error*** (zip#Browse) Please specify a file, not a directory" | echohl None
|
||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
let &report= repkeep
|
||||
" call Dret("ZipBrowseSelect")
|
||||
return
|
||||
endif
|
||||
|
||||
" call Decho("fname<".fname.">")
|
||||
|
||||
" get zipfile to the new-window
|
||||
let zipfile = b:zipfile
|
||||
let curfile= expand("%")
|
||||
" call Decho("zipfile<".zipfile.">")
|
||||
" call Decho("curfile<".curfile.">")
|
||||
|
||||
new
|
||||
if !exists("g:zip_nomax") || g:zip_nomax == 0
|
||||
wincmd _
|
||||
endif
|
||||
let s:zipfile_{winnr()}= curfile
|
||||
" call Decho("exe e ".fnameescape("zipfile:".zipfile.'::'.fname))
|
||||
exe "e ".fnameescape("zipfile:".zipfile.'::'.fname)
|
||||
filetype detect
|
||||
|
||||
let &report= repkeep
|
||||
" call Dret("ZipBrowseSelect : s:zipfile_".winnr()."<".s:zipfile_{winnr()}.">")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" zip#Read: {{{2
|
||||
fun! zip#Read(fname,mode)
|
||||
" call Dfunc("zip#Read(fname<".a:fname.">,mode=".a:mode.")")
|
||||
let repkeep= &report
|
||||
set report=10
|
||||
|
||||
if has("unix")
|
||||
let zipfile = substitute(a:fname,'zipfile:\(.\{-}\)::[^\\].*$','\1','')
|
||||
let fname = substitute(a:fname,'zipfile:.\{-}::\([^\\].*\)$','\1','')
|
||||
else
|
||||
let zipfile = substitute(a:fname,'^.\{-}zipfile:\(.\{-}\)::[^\\].*$','\1','')
|
||||
let fname = substitute(a:fname,'^.\{-}zipfile:.\{-}::\([^\\].*\)$','\1','')
|
||||
let fname = substitute(fname, '[', '[[]', 'g')
|
||||
endif
|
||||
" call Decho("zipfile<".zipfile.">")
|
||||
" call Decho("fname <".fname.">")
|
||||
|
||||
" call Decho("exe r! ".g:zip_unzipcmd." -p -- ".s:Escape(zipfile,1)." ".s:Escape(fname,1))
|
||||
exe "silent r! ".g:zip_unzipcmd." -p -- ".s:Escape(zipfile,1)." ".s:Escape(fname,1)
|
||||
|
||||
" cleanup
|
||||
0d
|
||||
set nomod
|
||||
|
||||
let &report= repkeep
|
||||
" call Dret("zip#Read")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" zip#Write: {{{2
|
||||
fun! zip#Write(fname)
|
||||
" call Dfunc("zip#Write(fname<".a:fname.">) zipfile_".winnr()."<".s:zipfile_{winnr()}.">")
|
||||
let repkeep= &report
|
||||
set report=10
|
||||
|
||||
" sanity checks
|
||||
if !executable(g:zip_zipcmd)
|
||||
redraw!
|
||||
echohl Error | echo "***error*** (zip#Write) sorry, your system doesn't appear to have the zip pgm" | echohl None
|
||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
let &report= repkeep
|
||||
" call Dret("zip#Write")
|
||||
return
|
||||
endif
|
||||
if !exists("*mkdir")
|
||||
redraw!
|
||||
echohl Error | echo "***error*** (zip#Write) sorry, mkdir() doesn't work on your system" | echohl None
|
||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
let &report= repkeep
|
||||
" call Dret("zip#Write")
|
||||
return
|
||||
endif
|
||||
|
||||
let curdir= getcwd()
|
||||
let tmpdir= tempname()
|
||||
" call Decho("orig tempname<".tmpdir.">")
|
||||
if tmpdir =~ '\.'
|
||||
let tmpdir= substitute(tmpdir,'\.[^.]*$','','e')
|
||||
endif
|
||||
" call Decho("tmpdir<".tmpdir.">")
|
||||
call mkdir(tmpdir,"p")
|
||||
|
||||
" attempt to change to the indicated directory
|
||||
if s:ChgDir(tmpdir,s:ERROR,"(zip#Write) cannot cd to temporary directory")
|
||||
let &report= repkeep
|
||||
" call Dret("zip#Write")
|
||||
return
|
||||
endif
|
||||
" call Decho("current directory now: ".getcwd())
|
||||
|
||||
" place temporary files under .../_ZIPVIM_/
|
||||
if isdirectory("_ZIPVIM_")
|
||||
call s:Rmdir("_ZIPVIM_")
|
||||
endif
|
||||
call mkdir("_ZIPVIM_")
|
||||
cd _ZIPVIM_
|
||||
" call Decho("current directory now: ".getcwd())
|
||||
|
||||
if has("unix")
|
||||
let zipfile = substitute(a:fname,'zipfile:\(.\{-}\)::[^\\].*$','\1','')
|
||||
let fname = substitute(a:fname,'zipfile:.\{-}::\([^\\].*\)$','\1','')
|
||||
else
|
||||
let zipfile = substitute(a:fname,'^.\{-}zipfile:\(.\{-}\)::[^\\].*$','\1','')
|
||||
let fname = substitute(a:fname,'^.\{-}zipfile:.\{-}::\([^\\].*\)$','\1','')
|
||||
endif
|
||||
" call Decho("zipfile<".zipfile.">")
|
||||
" call Decho("fname <".fname.">")
|
||||
|
||||
if fname =~ '/'
|
||||
let dirpath = substitute(fname,'/[^/]\+$','','e')
|
||||
if executable("cygpath")
|
||||
let dirpath = substitute(system("cygpath ".s:Escape(dirpath,0)),'\n','','e')
|
||||
endif
|
||||
" call Decho("mkdir(dirpath<".dirpath.">,p)")
|
||||
call mkdir(dirpath,"p")
|
||||
endif
|
||||
if zipfile !~ '/'
|
||||
let zipfile= curdir.'/'.zipfile
|
||||
endif
|
||||
" call Decho("zipfile<".zipfile."> fname<".fname.">")
|
||||
|
||||
exe "w! ".fnameescape(fname)
|
||||
if executable("cygpath")
|
||||
let zipfile = substitute(system("cygpath ".s:Escape(zipfile,0)),'\n','','e')
|
||||
endif
|
||||
|
||||
if (has("win32") || has("win95") || has("win64") || has("win16")) && &shell !~? 'sh$'
|
||||
let fname = substitute(fname, '[', '[[]', 'g')
|
||||
endif
|
||||
|
||||
" call Decho(g:zip_zipcmd." -u ".s:Escape(fnamemodify(zipfile,":p"),0)." ".s:Escape(fname,0))
|
||||
call system(g:zip_zipcmd." -u ".s:Escape(fnamemodify(zipfile,":p"),0)." ".s:Escape(fname,0))
|
||||
if v:shell_error != 0
|
||||
redraw!
|
||||
echohl Error | echo "***error*** (zip#Write) sorry, unable to update ".zipfile." with ".fname | echohl None
|
||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
|
||||
elseif s:zipfile_{winnr()} =~ '^\a\+://'
|
||||
" support writing zipfiles across a network
|
||||
let netzipfile= s:zipfile_{winnr()}
|
||||
" call Decho("handle writing <".zipfile."> across network as <".netzipfile.">")
|
||||
1split|enew
|
||||
let binkeep= &binary
|
||||
let eikeep = &ei
|
||||
set binary ei=all
|
||||
exe "e! ".fnameescape(zipfile)
|
||||
call netrw#NetWrite(netzipfile)
|
||||
let &ei = eikeep
|
||||
let &binary = binkeep
|
||||
q!
|
||||
unlet s:zipfile_{winnr()}
|
||||
endif
|
||||
|
||||
" cleanup and restore current directory
|
||||
cd ..
|
||||
call s:Rmdir("_ZIPVIM_")
|
||||
call s:ChgDir(curdir,s:WARNING,"(zip#Write) unable to return to ".curdir."!")
|
||||
call s:Rmdir(tmpdir)
|
||||
setlocal nomod
|
||||
|
||||
let &report= repkeep
|
||||
" call Dret("zip#Write")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" s:Escape: {{{2
|
||||
fun! s:Escape(fname,isfilt)
|
||||
" call Dfunc("QuoteFileDir(fname<".a:fname."> isfilt=".a:isfilt.")")
|
||||
if exists("*shellescape")
|
||||
if a:isfilt
|
||||
let qnameq= shellescape(a:fname,1)
|
||||
else
|
||||
let qnameq= shellescape(a:fname)
|
||||
endif
|
||||
else
|
||||
let qnameq= g:zip_shq.escape(a:fname,g:zip_shq).g:zip_shq
|
||||
endif
|
||||
" call Dret("QuoteFileDir <".qnameq.">")
|
||||
return qnameq
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" ChgDir: {{{2
|
||||
fun! s:ChgDir(newdir,errlvl,errmsg)
|
||||
" call Dfunc("ChgDir(newdir<".a:newdir."> errlvl=".a:errlvl." errmsg<".a:errmsg.">)")
|
||||
|
||||
try
|
||||
exe "cd ".fnameescape(a:newdir)
|
||||
catch /^Vim\%((\a\+)\)\=:E344/
|
||||
redraw!
|
||||
if a:errlvl == s:NOTE
|
||||
echo "***note*** ".a:errmsg
|
||||
elseif a:errlvl == s:WARNING
|
||||
echohl WarningMsg | echo "***warning*** ".a:errmsg | echohl NONE
|
||||
elseif a:errlvl == s:ERROR
|
||||
echohl Error | echo "***error*** ".a:errmsg | echohl NONE
|
||||
endif
|
||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
" call Dret("ChgDir 1")
|
||||
return 1
|
||||
endtry
|
||||
|
||||
" call Dret("ChgDir 0")
|
||||
return 0
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" s:Rmdir: {{{2
|
||||
fun! s:Rmdir(fname)
|
||||
" call Dfunc("Rmdir(fname<".a:fname.">)")
|
||||
if (has("win32") || has("win95") || has("win64") || has("win16")) && &shell !~? 'sh$'
|
||||
call system("rmdir /S/Q ".s:Escape(a:fname,0))
|
||||
else
|
||||
call system("/bin/rm -rf ".s:Escape(a:fname,0))
|
||||
endif
|
||||
" call Dret("Rmdir")
|
||||
endfun
|
||||
|
||||
" ------------------------------------------------------------------------
|
||||
" Modelines And Restoration: {{{1
|
||||
let &cpo= s:keepcpo
|
||||
unlet s:keepcpo
|
||||
" vim:ts=8 fdm=marker
|
Loading…
Reference in New Issue
Block a user