mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-07 15:37:14 +02:00
Merge remote-tracking branch 'vim/master'
This commit is contained in:
@@ -317,6 +317,8 @@ SRC_DOS = \
|
||||
src/if_ole.h \
|
||||
src/if_ole.idl \
|
||||
src/if_perl_msvc/stdbool.h \
|
||||
src/iscygpty.c \
|
||||
src/iscygpty.h \
|
||||
src/iid_ole.c \
|
||||
src/os_dos.h \
|
||||
src/os_w32dll.c \
|
||||
|
||||
@@ -2058,7 +2058,7 @@ json_encode({expr}) String encode JSON
|
||||
keys({dict}) List keys in {dict}
|
||||
len({expr}) Number the length of {expr}
|
||||
libcall({lib}, {func}, {arg}) String call {func} in library {lib} with {arg}
|
||||
libcallnr({lib}, {func}, {arg}) Number idem, but return a Number
|
||||
libcallnr({lib}, {func}, {arg}) Number idem, but return a Number
|
||||
line({expr}) Number line nr of cursor, last line or mark
|
||||
line2byte({lnum}) Number byte count of line {lnum}
|
||||
lispindent({lnum}) Number Lisp indent for line {lnum}
|
||||
@@ -2120,7 +2120,7 @@ remote_peek({serverid} [, {retvar}])
|
||||
remote_read({serverid}) String read reply string
|
||||
remote_send({server}, {string} [, {idvar}])
|
||||
String send key sequence
|
||||
remove({list}, {idx} [, {end}]) any remove items {idx}-{end} from {list}
|
||||
remove({list}, {idx} [, {end}]) any remove items {idx}-{end} from {list}
|
||||
remove({dict}, {key}) any remove entry {key} from {dict}
|
||||
rename({from}, {to}) Number rename (move) file from {from} to {to}
|
||||
repeat({expr}, {count}) String repeat {expr} {count} times
|
||||
@@ -2208,7 +2208,7 @@ synconcealed({lnum}, {col}) List info about concealing
|
||||
synstack({lnum}, {col}) List stack of syntax IDs at {lnum} and {col}
|
||||
system({expr} [, {input}]) String output of shell command/filter {expr}
|
||||
systemlist({expr} [, {input}]) List output of shell command/filter {expr}
|
||||
tabpagebuflist([{arg}]) List list of buffer numbers in tab page
|
||||
tabpagebuflist([{arg}]) List list of buffer numbers in tab page
|
||||
tabpagenr([{arg}]) Number number of current or last tab page
|
||||
tabpagewinnr({tabarg}[, {arg}]) Number number of current window in tab page
|
||||
taglist({expr}) List list of tags matching {expr}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*filetype.txt* For Vim version 7.4. Last change: 2016 May 24
|
||||
*filetype.txt* For Vim version 7.4. Last change: 2016 Jun 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -579,6 +579,11 @@ CTRL-] Jump to the manual page for the word under the cursor.
|
||||
CTRL-T Jump back to the previous manual page.
|
||||
q Same as ":quit"
|
||||
|
||||
To use a vertical split instead of horizontal: >
|
||||
let g:ft_man_open_mode = 'vert'
|
||||
To use a new tab: >
|
||||
let g:ft_man_open_mode = 'tab'
|
||||
|
||||
To enable folding use this: >
|
||||
let g:ft_man_folding_enable = 1
|
||||
If you do not like the default folding, use an autocommand to add your desired
|
||||
|
||||
@@ -129,6 +129,7 @@ The available subcommands are:
|
||||
6 or e: Find this egrep pattern
|
||||
7 or f: Find this file
|
||||
8 or i: Find files #including this file
|
||||
9 or a: Find places where this symbol is assigned a value
|
||||
|
||||
For all types, except 4 and 6, leading white space for {name} is
|
||||
removed. For 4 and 6 there is exactly one space between {querytype}
|
||||
@@ -255,13 +256,13 @@ started will have no effect!
|
||||
{not available when compiled without the |+quickfix| feature}
|
||||
'cscopequickfix' specifies whether to use quickfix window to show cscope
|
||||
results. This is a list of comma-separated values. Each item consists of
|
||||
|cscope-find| command (s, g, d, c, t, e, f or i) and flag (+, - or 0).
|
||||
|cscope-find| command (s, g, d, c, t, e, f, i or a) and flag (+, - or 0).
|
||||
'+' indicates that results must be appended to quickfix window,
|
||||
'-' implies previous results clearance, '0' or command absence - don't use
|
||||
quickfix. Search is performed from start until first command occurrence.
|
||||
The default value is "" (don't use quickfix anyway). The following value
|
||||
seems to be useful: >
|
||||
:set cscopequickfix=s-,c-,d-,i-,t-,e-
|
||||
:set cscopequickfix=s-,c-,d-,i-,t-,e-,a-
|
||||
<
|
||||
*cscopetag* *cst*
|
||||
If 'cscopetag' is set, the commands ":tag" and CTRL-] as well as "vim -t"
|
||||
@@ -422,6 +423,7 @@ Cscope Home Page (http://cscope.sourceforge.net/): >
|
||||
nmap <C-_>f :cs find f <C-R>=expand("<cfile>")<CR><CR>
|
||||
nmap <C-_>i :cs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
|
||||
nmap <C-_>d :cs find d <C-R>=expand("<cword>")<CR><CR>
|
||||
nmap <C-_>a :cs find a <C-R>=expand("<cword>")<CR><CR>
|
||||
|
||||
" Using 'CTRL-spacebar' then a search type makes the vim window
|
||||
" split horizontally, with search result displayed in
|
||||
@@ -435,6 +437,7 @@ Cscope Home Page (http://cscope.sourceforge.net/): >
|
||||
nmap <C-Space>f :scs find f <C-R>=expand("<cfile>")<CR><CR>
|
||||
nmap <C-Space>i :scs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
|
||||
nmap <C-Space>d :scs find d <C-R>=expand("<cword>")<CR><CR>
|
||||
nmap <C-Space>a :scs find a <C-R>=expand("<cword>")<CR><CR>
|
||||
|
||||
" Hitting CTRL-space *twice* before the search type does a vertical
|
||||
" split instead of a horizontal one
|
||||
@@ -453,6 +456,8 @@ Cscope Home Page (http://cscope.sourceforge.net/): >
|
||||
\:vert scs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
|
||||
nmap <C-Space><C-Space>d
|
||||
\:vert scs find d <C-R>=expand("<cword>")<CR><CR>
|
||||
nmap <C-Space><C-Space>a
|
||||
\:vert scs find a <C-R>=expand("<cword>")<CR><CR>
|
||||
|
||||
==============================================================================
|
||||
7. Cscope availability and information *cscope-info*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 7.4. Last change: 2016 Jun 08
|
||||
*options.txt* For Vim version 7.4. Last change: 2016 Jun 19
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -8822,7 +8822,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
'writedelay' 'wd' number (default 0)
|
||||
global
|
||||
{not in Vi}
|
||||
The number of microseconds to wait for each character sent to the
|
||||
The number of milliseconds to wait for each character sent to the
|
||||
screen. When non-zero, characters are sent to the terminal one by
|
||||
one. For MS-DOS pcterm this does not work. For debugging purposes.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 7.4. Last change: 2016 Jun 16
|
||||
*todo.txt* For Vim version 7.4. Last change: 2016 Jun 25
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -34,14 +34,14 @@ not be repeated below, unless there is extra information.
|
||||
*known-bugs*
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
:clist! +10 list next 10 errors
|
||||
|
||||
Further implement 'barline' in viminfo:
|
||||
- Use timestamp for more items: locations, marks.
|
||||
|
||||
Problem with setqflist([]): grep 4 times, ":colder 3", setqflist([]) will
|
||||
clear the next list, not the current one. Ramel Eshed, Jun 8.
|
||||
|
||||
Patch: Fix drawing background with &termguicolors #805 (Jacob Niehus)
|
||||
|
||||
+channel:
|
||||
- GUI cursor blinking interrupted when the job output goes to a buffer that is
|
||||
in a window. (Ramel Eshed, 2016 Jun 9)
|
||||
@@ -62,7 +62,8 @@ Later
|
||||
With xterm could use -S{pty}.
|
||||
|
||||
Quickfix improvements for background building and grepping:
|
||||
(Yegappan might do some of this)
|
||||
Patch from Yegappan, 2016 Jun 17.
|
||||
Need to reset values when starting a new list.
|
||||
- Move 'efm' parsing to a separate function. If 'efm' is the same as last
|
||||
time re-use the fmt_first list.
|
||||
- Do not clear "dir_stack", "directory" and "file_stack", "currfile" when
|
||||
@@ -143,12 +144,12 @@ Add tests for using number larger than number of lines in buffer.
|
||||
|
||||
Invalid behavior with NULL list. (Nikolai Pavlov, #768)
|
||||
|
||||
&t_ut not used with 'termguicolors' is set. (Jacob Niehus, 2016 May 14, #804)
|
||||
Patch to fix this, Jacob Niehus, 2016 May 14, #805)
|
||||
|
||||
For current Windows build .pdb file is missing. (Gabriele Fava, 2016 May 11)
|
||||
5)
|
||||
|
||||
'completeopt' noinsert breaks redo register (Shougo, 2016 Jun 18, #874)
|
||||
Patch to fix this: #875
|
||||
|
||||
Patch to support expression argument to sort() instead of a function name.
|
||||
Yasuhiro Matsumoto, 2013 May 31.
|
||||
Or should we add a more general mechanism, like a lambda() function?
|
||||
@@ -291,6 +292,7 @@ Remove SPACE_IN_FILENAME ? What could possibly go wrong?
|
||||
|
||||
When command names are very long :command output is difficult to read. Use a
|
||||
maximum for the column width? (#871)
|
||||
Patcy by varmanishant, 2016 Jun 18, #876
|
||||
|
||||
Patch to change GUI behavior: instead of changing the window size change the
|
||||
lines/columns when menu/toolbar/etc. is added/removed. (Ychin, 2016 Mar 20,
|
||||
|
||||
+28
-41
@@ -2,15 +2,15 @@
|
||||
" Language: shell (sh) Korn shell (ksh) bash (sh)
|
||||
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
|
||||
" Previous Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int>
|
||||
" Last Change: May 02, 2016
|
||||
" Version: 151
|
||||
" Last Change: Jun 10, 2016
|
||||
" Version: 152
|
||||
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH
|
||||
" For options and settings, please use: :help ft-sh-syntax
|
||||
" This file includes many ideas from Eric Brunet (eric.brunet@ens.fr)
|
||||
|
||||
" For version 5.x: Clear all syntax items {{{1
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
if version < 600
|
||||
if v:version < 600
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax")
|
||||
finish
|
||||
@@ -173,7 +173,7 @@ if exists("b:is_kornshell") || exists("b:is_bash")
|
||||
|
||||
" Touch: {{{1
|
||||
" =====
|
||||
syn match shTouch '\<touch\>[^;#]*' skipwhite nextgroup=shTouchList contains=shTouchCmd
|
||||
syn match shTouch '\<touch\>[^;#]*' skipwhite nextgroup=shComment contains=shTouchCmd
|
||||
syn match shTouchCmd '\<touch\>' contained
|
||||
endif
|
||||
|
||||
@@ -333,9 +333,10 @@ endif
|
||||
"================================
|
||||
syn match shNumber "\<\d\+\>#\="
|
||||
syn match shNumber "-\=\.\=\d\+\>#\="
|
||||
syn match shCtrlSeq "\\\d\d\d\|\\[abcfnrtv0]" contained
|
||||
syn match shCtrlSeq "\\\d\d\d\|\\[abcfnrtv0]" contained
|
||||
if exists("b:is_bash")
|
||||
syn match shSpecial "\\\o\o\o\|\\x\x\x\|\\c[^"]\|\\[abefnrtv]" contained
|
||||
syn match shSpecial "[^\\]\(\\\\\)*\zs\\\o\o\o\|\\x\x\x\|\\c[^"]\|\\[abefnrtv]" contained
|
||||
syn match shSpecial "^\(\\\\\)*\zs\\\o\o\o\|\\x\x\x\|\\c[^"]\|\\[abefnrtv]" contained
|
||||
endif
|
||||
if exists("b:is_bash")
|
||||
syn region shExSingleQuote matchgroup=shQuote start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial,shSpecial
|
||||
@@ -346,11 +347,13 @@ elseif !exists("g:sh_no_error")
|
||||
endif
|
||||
syn region shSingleQuote matchgroup=shQuote start=+'+ end=+'+ contains=@Spell
|
||||
syn region shDoubleQuote matchgroup=shQuote start=+\%(\%(\\\\\)*\\\)\@<!"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell
|
||||
syn match shStringSpecial "[^[:print:] \t]" contained
|
||||
syn match shStringSpecial "\%(\\\\\)*\\[\\"'`$()#]"
|
||||
syn match shSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]"
|
||||
syn match shStringSpecial "[^[:print:] \t]" contained
|
||||
syn match shStringSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]"
|
||||
syn match shSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shBkslshSnglQuote,shBkslshDblQuote
|
||||
syn match shSpecial "^\%(\\\\\)*\\[\\"'`$()#]"
|
||||
syn match shMoreSpecial "\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shMoreSpecial contained
|
||||
syn match shMoreSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shMoreSpecial contained
|
||||
syn region shBkslshSnglQuote contained matchgroup=shQuote start=+'+ end=+'+ contains=@Spell
|
||||
syn region shBkslshDblQuote contained matchgroup=shQuote start=+"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell
|
||||
|
||||
" Comments: {{{1
|
||||
"==========
|
||||
@@ -363,31 +366,21 @@ syn match shQuickComment contained "#.*$"
|
||||
|
||||
" Here Documents: {{{1
|
||||
" =========================================
|
||||
if version < 600
|
||||
syn region shHereDoc matchgroup=shHereDoc01 start="<<\s*\**END[a-zA-Z_0-9]*\**" matchgroup=shHereDoc01 end="^END[a-zA-Z_0-9]*$" contains=@shDblQuoteList
|
||||
syn region shHereDoc matchgroup=shHereDoc02 start="<<-\s*\**END[a-zA-Z_0-9]*\**" matchgroup=shHereDoc02 end="^\s*END[a-zA-Z_0-9]*$" contains=@shDblQuoteList
|
||||
syn region shHereDoc matchgroup=shHereDoc03 start="<<\s*\**EOF\**" matchgroup=shHereDoc03 end="^EOF$" contains=@shDblQuoteList
|
||||
syn region shHereDoc matchgroup=shHereDoc04 start="<<-\s*\**EOF\**" matchgroup=shHereDoc04 end="^\s*EOF$" contains=@shDblQuoteList
|
||||
syn region shHereDoc matchgroup=shHereDoc05 start="<<\s*\**\.\**" matchgroup=shHereDoc05 end="^\.$" contains=@shDblQuoteList
|
||||
syn region shHereDoc matchgroup=shHereDoc06 start="<<-\s*\**\.\**" matchgroup=shHereDoc06 end="^\s*\.$" contains=@shDblQuoteList
|
||||
|
||||
else
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc07 start="<<\s*\\\=\z([^ \t|]\+\)" matchgroup=shHereDoc07 end="^\z1\s*$" contains=@shDblQuoteList
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc08 start="<<\s*\"\z([^ \t|]\+\)\"" matchgroup=shHereDoc08 end="^\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc09 start="<<-\s*\z([^ \t|]\+\)" matchgroup=shHereDoc09 end="^\s*\z1\s*$" contains=@shDblQuoteList
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc10 start="<<-\s*'\z([^ \t|]\+\)'" matchgroup=shHereDoc10 end="^\s*\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc11 start="<<\s*'\z([^ \t|]\+\)'" matchgroup=shHereDoc11 end="^\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc12 start="<<-\s*\"\z([^ \t|]\+\)\"" matchgroup=shHereDoc12 end="^\s*\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc13 start="<<\s*\\\_$\_s*\z([^ \t|]\+\)" matchgroup=shHereDoc13 end="^\z1\s*$" contains=@shDblQuoteList
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc14 start="<<\s*\\\_$\_s*'\z([^ \t|]\+\)'" matchgroup=shHereDoc14 end="^\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc15 start="<<\s*\\\_$\_s*\"\z([^ \t|]\+\)\"" matchgroup=shHereDoc15 end="^\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc16 start="<<-\s*\\\_$\_s*\z([^ \t|]\+\)" matchgroup=shHereDoc16 end="^\s*\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc17 start="<<-\s*\\\_$\_s*\\\z([^ \t|]\+\)" matchgroup=shHereDoc17 end="^\s*\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc18 start="<<-\s*\\\_$\_s*'\z([^ \t|]\+\)'" matchgroup=shHereDoc18 end="^\s*\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc19 start="<<-\s*\\\_$\_s*\"\z([^ \t|]\+\)\"" matchgroup=shHereDoc19 end="^\s*\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc20 start="<<\\\z([^ \t|]\+\)" matchgroup=shHereDoc20 end="^\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc21 start="<<-\s*\\\z([^ \t|]\+\)" matchgroup=shHereDoc21 end="^\s*\z1\s*$"
|
||||
endif
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc01 start="<<\s*\\\=\z([^ \t|]\+\)" matchgroup=shHereDoc01 end="^\z1\s*$" contains=@shDblQuoteList
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc02 start="<<\s*\"\z([^ \t|]\+\)\"" matchgroup=shHereDoc02 end="^\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc03 start="<<-\s*\z([^ \t|]\+\)" matchgroup=shHereDoc03 end="^\s*\z1\s*$" contains=@shDblQuoteList
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc04 start="<<-\s*'\z([^ \t|]\+\)'" matchgroup=shHereDoc04 end="^\s*\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc05 start="<<\s*'\z([^ \t|]\+\)'" matchgroup=shHereDoc05 end="^\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc06 start="<<-\s*\"\z([^ \t|]\+\)\"" matchgroup=shHereDoc06 end="^\s*\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc07 start="<<\s*\\\_$\_s*\z([^ \t|]\+\)" matchgroup=shHereDoc07 end="^\z1\s*$" contains=@shDblQuoteList
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc08 start="<<\s*\\\_$\_s*'\z([^ \t|]\+\)'" matchgroup=shHereDoc08 end="^\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc09 start="<<\s*\\\_$\_s*\"\z([^ \t|]\+\)\"" matchgroup=shHereDoc09 end="^\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc10 start="<<-\s*\\\_$\_s*\z([^ \t|]\+\)" matchgroup=shHereDoc10 end="^\s*\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc11 start="<<-\s*\\\_$\_s*\\\z([^ \t|]\+\)" matchgroup=shHereDoc11 end="^\s*\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc12 start="<<-\s*\\\_$\_s*'\z([^ \t|]\+\)'" matchgroup=shHereDoc12 end="^\s*\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc13 start="<<-\s*\\\_$\_s*\"\z([^ \t|]\+\)\"" matchgroup=shHereDoc13 end="^\s*\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc14 start="<<\\\z([^ \t|]\+\)" matchgroup=shHereDoc14 end="^\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc15 start="<<-\s*\\\z([^ \t|]\+\)" matchgroup=shHereDoc15 end="^\s*\z1\s*$"
|
||||
|
||||
" Here Strings: {{{1
|
||||
" =============
|
||||
@@ -702,12 +695,6 @@ hi def link shHereDoc12 shRedir
|
||||
hi def link shHereDoc13 shRedir
|
||||
hi def link shHereDoc14 shRedir
|
||||
hi def link shHereDoc15 shRedir
|
||||
hi def link shHereDoc16 shRedir
|
||||
hi def link shHereDoc17 shRedir
|
||||
hi def link shHereDoc18 shRedir
|
||||
hi def link shHereDoc19 shRedir
|
||||
hi def link shHereDoc20 shRedir
|
||||
hi def link shHereDoc21 shRedir
|
||||
|
||||
" Delete shell folding commands {{{1
|
||||
" =============================
|
||||
|
||||
+25
-11
@@ -1,8 +1,8 @@
|
||||
" Vim syntax file
|
||||
" Language: TeX
|
||||
" Maintainer: Charles E. Campbell <NdrchipO@ScampbellPfamily.AbizM>
|
||||
" Last Change: May 02, 2016
|
||||
" Version: 95
|
||||
" Last Change: Jun 17, 2016
|
||||
" Version: 97
|
||||
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX
|
||||
"
|
||||
" Notes: {{{1
|
||||
@@ -83,15 +83,16 @@ else
|
||||
let s:tex_conceal= g:tex_conceal
|
||||
endif
|
||||
if !exists("g:tex_superscripts")
|
||||
let s:tex_superscripts= "[0-9a-zA-W.,:;+-<>/()=]"
|
||||
let s:tex_superscripts= '[0-9a-zA-W.,:;+-<>/()=]'
|
||||
else
|
||||
let s:tex_superscripts= g:tex_superscripts
|
||||
endif
|
||||
if !exists("g:tex_subscripts")
|
||||
let s:tex_subscripts= "[0-9aehijklmnoprstuvx,+-/().]"
|
||||
let s:tex_subscripts= '[0-9aehijklmnoprstuvx,+-/().]'
|
||||
else
|
||||
let s:tex_subscripts= g:tex_subscripts
|
||||
endif
|
||||
echomsg "s:tex_subscripts=".s:tex_subscripts
|
||||
|
||||
" Determine whether or not to use "*.sty" mode {{{1
|
||||
" The user may override the normal determination by setting
|
||||
@@ -206,16 +207,16 @@ endif
|
||||
" Try to flag {} and () mismatches: {{{1
|
||||
if s:tex_fast =~# 'm'
|
||||
if !s:tex_no_error
|
||||
syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchGroup,texError
|
||||
syn region texMatcher matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchGroup,texError,@NoSpell
|
||||
syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchGroup,texError
|
||||
syn region texMatcher matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchGroup,texError,@NoSpell
|
||||
else
|
||||
syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchGroup
|
||||
syn region texMatcher matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchGroup
|
||||
syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchGroup
|
||||
syn region texMatcher matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchGroup
|
||||
endif
|
||||
if !s:tex_nospell
|
||||
syn region texParen start="(" end=")" transparent contains=@texMatchGroup,@Spell
|
||||
syn region texParen start="(" end=")" transparent contains=@texMatchGroup,@Spell
|
||||
else
|
||||
syn region texParen start="(" end=")" transparent contains=@texMatchGroup
|
||||
syn region texParen start="(" end=")" transparent contains=@texMatchGroup
|
||||
endif
|
||||
endif
|
||||
if !s:tex_no_error
|
||||
@@ -266,7 +267,7 @@ syn match texLigature "\\\([ijolL]\|ae\|oe\|ss\|AA\|AE\|OE\)$"
|
||||
syn match texBeginEnd "\\begin\>\|\\end\>" nextgroup=texBeginEndName
|
||||
if s:tex_fast =~# 'm'
|
||||
syn region texBeginEndName matchgroup=Delimiter start="{" end="}" contained nextgroup=texBeginEndModifier contains=texComment
|
||||
syn region texBeginEndModifier matchgroup=Delimiter start="\[" end="]" contained contains=texComment,@NoSpell
|
||||
syn region texBeginEndModifier matchgroup=Delimiter start="\[" end="]" contained contains=texComment,@texMathZones,@NoSpell
|
||||
endif
|
||||
|
||||
" \documentclass, \documentstyle, \usepackage: {{{1
|
||||
@@ -1136,9 +1137,21 @@ if has("conceal") && &enc == 'utf-8'
|
||||
call s:SuperSub('texSubscript','_','9','₉')
|
||||
call s:SuperSub('texSubscript','_','a','ₐ')
|
||||
call s:SuperSub('texSubscript','_','e','ₑ')
|
||||
call s:SuperSub('texSubscript','_','h','ₕ')
|
||||
call s:SuperSub('texSubscript','_','i','ᵢ')
|
||||
call s:SuperSub('texSubscript','_','j','ⱼ')
|
||||
call s:SuperSub('texSubscript','_','k','ₖ')
|
||||
call s:SuperSub('texSubscript','_','l','ₗ')
|
||||
call s:SuperSub('texSubscript','_','m','ₘ')
|
||||
call s:SuperSub('texSubscript','_','n','ₙ')
|
||||
call s:SuperSub('texSubscript','_','o','ₒ')
|
||||
call s:SuperSub('texSubscript','_','p','ₚ')
|
||||
call s:SuperSub('texSubscript','_','r','ᵣ')
|
||||
call s:SuperSub('texSubscript','_','s','ₛ')
|
||||
call s:SuperSub('texSubscript','_','t','ₜ')
|
||||
call s:SuperSub('texSubscript','_','u','ᵤ')
|
||||
call s:SuperSub('texSubscript','_','v','ᵥ')
|
||||
call s:SuperSub('texSubscript','_','x','ₓ')
|
||||
call s:SuperSub('texSubscript','_',',','︐')
|
||||
call s:SuperSub('texSubscript','_','+','₊')
|
||||
call s:SuperSub('texSubscript','_','-','₋')
|
||||
@@ -1154,6 +1167,7 @@ if has("conceal") && &enc == 'utf-8'
|
||||
call s:SuperSub('texSubscript','_','\\phi\>' ,'ᵩ')
|
||||
call s:SuperSub('texSubscript','_','\\gamma\>','ᵧ')
|
||||
call s:SuperSub('texSubscript','_','\\chi\>' ,'ᵪ')
|
||||
|
||||
delfun s:SuperSub
|
||||
endif
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" An example for a vimrc file.
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last change: 2016 Apr 05
|
||||
" Last change: 2016 Jun 21
|
||||
"
|
||||
" To use it, copy it to
|
||||
" for Unix and OS/2: ~/.vimrc
|
||||
@@ -111,4 +111,6 @@ endif
|
||||
"
|
||||
" The matchit plugin makes the % command work better, but it is not backwards
|
||||
" compatible.
|
||||
packadd matchit
|
||||
if has('syntax') && has('eval')
|
||||
packadd matchit
|
||||
endif
|
||||
|
||||
@@ -592,6 +592,7 @@ endif
|
||||
|
||||
LIB = -lkernel32 -luser32 -lgdi32 -ladvapi32 -lcomdlg32 -lcomctl32 -lversion
|
||||
GUIOBJ = $(OUTDIR)/gui.o $(OUTDIR)/gui_w32.o $(OUTDIR)/gui_beval.o $(OUTDIR)/os_w32exe.o
|
||||
CUIOBJ = $(OUTDIR)/iscygpty.o
|
||||
OBJ = \
|
||||
$(OUTDIR)/blowfish.o \
|
||||
$(OUTDIR)/buffer.o \
|
||||
@@ -727,6 +728,7 @@ OBJ += $(GUIOBJ)
|
||||
LFLAGS += -mwindows
|
||||
OUTDIR = gobj$(DEBUG_SUFFIX)$(MZSCHEME_SUFFIX)$(ARCH)
|
||||
else
|
||||
OBJ += $(CUIOBJ)
|
||||
TARGET := vim$(DEBUG_SUFFIX).exe
|
||||
OUTDIR = obj$(DEBUG_SUFFIX)$(MZSCHEME_SUFFIX)$(ARCH)
|
||||
endif
|
||||
@@ -842,6 +844,7 @@ endif
|
||||
INCL = vim.h feature.h os_win32.h os_dos.h ascii.h keymap.h term.h macros.h \
|
||||
structs.h regexp.h option.h ex_cmds.h proto.h globals.h farsi.h \
|
||||
gui.h
|
||||
CUI_INCL = iscygpty.h
|
||||
|
||||
$(OUTDIR)/if_python.o : if_python.c if_py_both.h $(INCL)
|
||||
$(CC) -c $(CFLAGS) $(PYTHONINC) $(PYTHON_HOME_DEF) $< -o $@
|
||||
@@ -887,6 +890,12 @@ if_perl.c: if_perl.xs typemap
|
||||
$(XSUBPP) -prototypes -typemap \
|
||||
$(PERLTYPEMAP) if_perl.xs > $@
|
||||
|
||||
$(OUTDIR)/iscygpty.o: iscygpty.c $(CUI_INCL)
|
||||
$(CC) -c $(CFLAGS) iscygpty.c -o $(OUTDIR)/iscygpty.o -D_WIN32_WINNT=0x0600 -DUSE_DYNFILEID -DENABLE_STUB_IMPL
|
||||
|
||||
$(OUTDIR)/main.o: main.c $(INCL) $(CUI_INCL)
|
||||
$(CC) -c $(CFLAGS) main.c -o $(OUTDIR)/main.o
|
||||
|
||||
$(OUTDIR)/netbeans.o: netbeans.c $(INCL) $(NBDEBUG_INCL) $(NBDEBUG_SRC)
|
||||
$(CC) -c $(CFLAGS) netbeans.c -o $(OUTDIR)/netbeans.o
|
||||
|
||||
|
||||
+8
-3
@@ -655,6 +655,8 @@ GUI_LIB = \
|
||||
/machine:$(CPU)
|
||||
!else
|
||||
SUBSYSTEM = console
|
||||
CUI_INCL = iscygpty.h
|
||||
CUI_OBJ = $(OUTDIR)\iscygpty.obj
|
||||
!endif
|
||||
|
||||
!if "$(SUBSYSTEM_VER)" != ""
|
||||
@@ -1026,12 +1028,12 @@ all: $(VIM).exe \
|
||||
tee/tee.exe \
|
||||
GvimExt/gvimext.dll
|
||||
|
||||
$(VIM).exe: $(OUTDIR) $(OBJ) $(GUI_OBJ) $(OLE_OBJ) $(OLE_IDL) $(MZSCHEME_OBJ) \
|
||||
$(VIM).exe: $(OUTDIR) $(OBJ) $(GUI_OBJ) $(CUI_OBJ) $(OLE_OBJ) $(OLE_IDL) $(MZSCHEME_OBJ) \
|
||||
$(LUA_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(PYTHON3_OBJ) $(RUBY_OBJ) $(TCL_OBJ) \
|
||||
$(CSCOPE_OBJ) $(NETBEANS_OBJ) $(CHANNEL_OBJ) $(XPM_OBJ) \
|
||||
version.c version.h
|
||||
$(CC) $(CFLAGS) version.c
|
||||
$(link) $(LINKARGS1) -out:$(VIM).exe $(OBJ) $(GUI_OBJ) $(OLE_OBJ) \
|
||||
$(link) $(LINKARGS1) -out:$(VIM).exe $(OBJ) $(GUI_OBJ) $(CUI_OBJ) $(OLE_OBJ) \
|
||||
$(LUA_OBJ) $(MZSCHEME_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(PYTHON3_OBJ) $(RUBY_OBJ) \
|
||||
$(TCL_OBJ) $(CSCOPE_OBJ) $(NETBEANS_OBJ) $(CHANNEL_OBJ) \
|
||||
$(XPM_OBJ) $(OUTDIR)\version.obj $(LINKARGS2)
|
||||
@@ -1223,9 +1225,12 @@ $(OUTDIR)/if_ruby.obj: $(OUTDIR) if_ruby.c $(INCL)
|
||||
$(OUTDIR)/if_tcl.obj: $(OUTDIR) if_tcl.c $(INCL)
|
||||
$(CC) $(CFLAGS) $(TCL_INC) if_tcl.c
|
||||
|
||||
$(OUTDIR)/iscygpty.obj: $(OUTDIR) iscygpty.c $(CUI_INCL)
|
||||
$(CC) $(CFLAGS) iscygpty.c -D_WIN32_WINNT=0x0600 -DUSE_DYNFILEID -DENABLE_STUB_IMPL
|
||||
|
||||
$(OUTDIR)/json.obj: $(OUTDIR) json.c $(INCL)
|
||||
|
||||
$(OUTDIR)/main.obj: $(OUTDIR) main.c $(INCL)
|
||||
$(OUTDIR)/main.obj: $(OUTDIR) main.c $(INCL) $(CUI_INCL)
|
||||
|
||||
$(OUTDIR)/mark.obj: $(OUTDIR) mark.c $(INCL)
|
||||
|
||||
|
||||
+3
-1
@@ -2013,7 +2013,7 @@ test1 \
|
||||
test2 test3 test4 test5 test6 test7 test8 test9 \
|
||||
test11 test12 test13 test14 test15 test16 test17 test18 test19 \
|
||||
test20 test21 test22 test23 test24 test25 test26 test27 test28 test29 \
|
||||
test30 test31 test32 test33 test34 test35 test36 test37 test38 test39 \
|
||||
test30 test31 test32 test33 test34 test36 test37 test38 test39 \
|
||||
test40 test41 test42 test43 test44 test45 test46 test47 test48 test49 \
|
||||
test50 test51 test52 test53 test54 test55 test56 test57 test58 test59 \
|
||||
test60 test61 test62 test63 test64 test65 test66 test67 test68 test69 \
|
||||
@@ -2048,6 +2048,7 @@ test_arglist \
|
||||
test_help_tagjump \
|
||||
test_history \
|
||||
test_increment \
|
||||
test_increment_dbcs \
|
||||
test_join \
|
||||
test_json \
|
||||
test_langmap \
|
||||
@@ -2061,6 +2062,7 @@ test_arglist \
|
||||
test_packadd \
|
||||
test_partial \
|
||||
test_perl \
|
||||
test_popup \
|
||||
test_quickfix \
|
||||
test_regexp_latin \
|
||||
test_regexp_utf8 \
|
||||
|
||||
+24
-20
@@ -263,7 +263,10 @@ strerror_win32(int eno)
|
||||
char_u *ptr;
|
||||
|
||||
if (msgbuf)
|
||||
{
|
||||
LocalFree(msgbuf);
|
||||
msgbuf = NULL;
|
||||
}
|
||||
FormatMessage(
|
||||
FORMAT_MESSAGE_ALLOCATE_BUFFER |
|
||||
FORMAT_MESSAGE_FROM_SYSTEM |
|
||||
@@ -274,21 +277,22 @@ strerror_win32(int eno)
|
||||
(LPTSTR) &msgbuf,
|
||||
0,
|
||||
NULL);
|
||||
/* chomp \r or \n */
|
||||
for (ptr = (char_u *)msgbuf; *ptr; ptr++)
|
||||
switch (*ptr)
|
||||
{
|
||||
case '\r':
|
||||
STRMOVE(ptr, ptr + 1);
|
||||
ptr--;
|
||||
break;
|
||||
case '\n':
|
||||
if (*(ptr + 1) == '\0')
|
||||
*ptr = '\0';
|
||||
else
|
||||
*ptr = ' ';
|
||||
break;
|
||||
}
|
||||
if (msgbuf != NULL)
|
||||
/* chomp \r or \n */
|
||||
for (ptr = (char_u *)msgbuf; *ptr; ptr++)
|
||||
switch (*ptr)
|
||||
{
|
||||
case '\r':
|
||||
STRMOVE(ptr, ptr + 1);
|
||||
ptr--;
|
||||
break;
|
||||
case '\n':
|
||||
if (*(ptr + 1) == '\0')
|
||||
*ptr = '\0';
|
||||
else
|
||||
*ptr = ' ';
|
||||
break;
|
||||
}
|
||||
return msgbuf;
|
||||
}
|
||||
#endif
|
||||
@@ -1457,7 +1461,7 @@ channel_write_in(channel_T *channel)
|
||||
}
|
||||
|
||||
/*
|
||||
* Handle buffer "buf" beeing freed, remove it from any channels.
|
||||
* Handle buffer "buf" being freed, remove it from any channels.
|
||||
*/
|
||||
void
|
||||
channel_buffer_free(buf_T *buf)
|
||||
@@ -2215,7 +2219,7 @@ channel_exe_cmd(channel_T *channel, int part, typval_T *argv)
|
||||
}
|
||||
else if (p_verbose > 2)
|
||||
{
|
||||
ch_errors(channel, "Receved unknown command: %s", (char *)cmd);
|
||||
ch_errors(channel, "Received unknown command: %s", (char *)cmd);
|
||||
EMSG2("E905: received unknown command: %s", cmd);
|
||||
}
|
||||
}
|
||||
@@ -3211,7 +3215,7 @@ channel_read_json_block(
|
||||
{
|
||||
more = channel_parse_json(channel, part);
|
||||
|
||||
/* search for messsage "id" */
|
||||
/* search for message "id" */
|
||||
if (channel_get_json(channel, part, id, rettv) == OK)
|
||||
{
|
||||
chanpart->ch_block_id = 0;
|
||||
@@ -3451,7 +3455,7 @@ channel_send(channel_T *channel, int part, char_u *buf, char *fun)
|
||||
/*
|
||||
* Common for "ch_sendexpr()" and "ch_sendraw()".
|
||||
* Returns the channel if the caller should read the response.
|
||||
* Sets "part_read" to the the read fd.
|
||||
* Sets "part_read" to the read fd.
|
||||
* Otherwise returns NULL.
|
||||
*/
|
||||
channel_T *
|
||||
@@ -4324,7 +4328,7 @@ job_free_contents(job_T *job)
|
||||
{
|
||||
/* The link from the channel to the job doesn't count as a reference,
|
||||
* thus don't decrement the refcount of the job. The reference from
|
||||
* the job to the channel does count the refrence, decrement it and
|
||||
* the job to the channel does count the reference, decrement it and
|
||||
* NULL the reference. We don't set ch_job_killed, unreferencing the
|
||||
* job doesn't mean it stops running. */
|
||||
job->jv_channel->ch_job = NULL;
|
||||
|
||||
+5
-1
@@ -649,7 +649,11 @@ edit(
|
||||
if (update_Insstart_orig)
|
||||
Insstart_orig = Insstart;
|
||||
|
||||
if (stop_insert_mode)
|
||||
if (stop_insert_mode
|
||||
#ifdef FEAT_INS_EXPAND
|
||||
&& !pum_visible()
|
||||
#endif
|
||||
)
|
||||
{
|
||||
/* ":stopinsert" used or 'insertmode' reset */
|
||||
count = 0;
|
||||
|
||||
+1
-1
@@ -2850,7 +2850,7 @@ write_viminfo_barlines(vir_T *virp, FILE *fp_out)
|
||||
* Return the current time in seconds. Calls time(), unless test_settime()
|
||||
* was used.
|
||||
*/
|
||||
time_t
|
||||
time_T
|
||||
vim_time(void)
|
||||
{
|
||||
# ifdef FEAT_EVAL
|
||||
|
||||
+2
-2
@@ -1612,7 +1612,7 @@ EXTERN int xsmp_icefd INIT(= -1); /* The actual connection */
|
||||
#endif
|
||||
|
||||
/* For undo we need to know the lowest time possible. */
|
||||
EXTERN time_t starttime;
|
||||
EXTERN time_T starttime;
|
||||
|
||||
#ifdef STARTUPTIME
|
||||
EXTERN FILE *time_fd INIT(= NULL); /* where to write startup timing */
|
||||
@@ -1644,7 +1644,7 @@ EXTERN int did_add_timer INIT(= FALSE);
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_EVAL
|
||||
EXTERN time_t time_for_testing INIT(= 0);
|
||||
EXTERN time_T time_for_testing INIT(= 0);
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
+120
-128
@@ -82,10 +82,10 @@
|
||||
* if_perl.h, because we get all sorts of name clashes then.
|
||||
*/
|
||||
#ifndef PROTO
|
||||
#ifndef __MINGW32__
|
||||
# include "proto/if_perl.pro"
|
||||
# include "proto/if_perlsfio.pro"
|
||||
#endif
|
||||
# ifndef __MINGW32__
|
||||
# include "proto/if_perl.pro"
|
||||
# include "proto/if_perlsfio.pro"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Perl compatibility stuff. This should ensure compatibility with older
|
||||
@@ -93,10 +93,10 @@
|
||||
*/
|
||||
|
||||
#ifndef PERL_VERSION
|
||||
# include <patchlevel.h>
|
||||
# define PERL_REVISION 5
|
||||
# define PERL_VERSION PATCHLEVEL
|
||||
# define PERL_SUBVERSION SUBVERSION
|
||||
# include <patchlevel.h>
|
||||
# define PERL_REVISION 5
|
||||
# define PERL_VERSION PATCHLEVEL
|
||||
# define PERL_SUBVERSION SUBVERSION
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -127,22 +127,14 @@
|
||||
#endif
|
||||
|
||||
#ifndef pTHX
|
||||
# define pTHX void
|
||||
# define pTHX_
|
||||
# define pTHX void
|
||||
# define pTHX_
|
||||
#endif
|
||||
|
||||
#ifndef EXTERN_C
|
||||
# define EXTERN_C
|
||||
#endif
|
||||
|
||||
#if (PERL_REVISION == 5) && (PERL_VERSION >= 14) && defined(_MSC_VER)
|
||||
/* Using PL_errgv to get the error message after perl_eval_sv() causes a crash
|
||||
* with MSVC and Perl version 5.14. */
|
||||
# define CHECK_EVAL_ERR(len) SvPV(perl_get_sv("@", GV_ADD), (len));
|
||||
#else
|
||||
# define CHECK_EVAL_ERR(len) SvPV(GvSV(PL_errgv), (len));
|
||||
#endif
|
||||
|
||||
/* Compatibility hacks over */
|
||||
|
||||
static PerlInterpreter *perl_interp = NULL;
|
||||
@@ -155,30 +147,30 @@ EXTERN_C void boot_DynaLoader(pTHX_ CV*);
|
||||
*/
|
||||
#if defined(DYNAMIC_PERL) || defined(PROTO)
|
||||
|
||||
#ifndef DYNAMIC_PERL /* just generating prototypes */
|
||||
#ifdef WIN3264
|
||||
# ifndef DYNAMIC_PERL /* just generating prototypes */
|
||||
# ifdef WIN3264
|
||||
typedef int HANDLE;
|
||||
#endif
|
||||
# endif
|
||||
typedef int XSINIT_t;
|
||||
typedef int XSUBADDR_t;
|
||||
#endif
|
||||
#ifndef USE_ITHREADS
|
||||
# endif
|
||||
# ifndef USE_ITHREADS
|
||||
typedef int perl_key;
|
||||
#endif
|
||||
# endif
|
||||
|
||||
#ifndef WIN3264
|
||||
#include <dlfcn.h>
|
||||
#define HANDLE void*
|
||||
#define PERL_PROC void*
|
||||
#define load_dll(n) dlopen((n), RTLD_LAZY|RTLD_GLOBAL)
|
||||
#define symbol_from_dll dlsym
|
||||
#define close_dll dlclose
|
||||
#else
|
||||
#define PERL_PROC FARPROC
|
||||
#define load_dll vimLoadLib
|
||||
#define symbol_from_dll GetProcAddress
|
||||
#define close_dll FreeLibrary
|
||||
#endif
|
||||
# ifndef WIN3264
|
||||
# include <dlfcn.h>
|
||||
# define HANDLE void*
|
||||
# define PERL_PROC void*
|
||||
# define load_dll(n) dlopen((n), RTLD_LAZY|RTLD_GLOBAL)
|
||||
# define symbol_from_dll dlsym
|
||||
# define close_dll dlclose
|
||||
# else
|
||||
# define PERL_PROC FARPROC
|
||||
# define load_dll vimLoadLib
|
||||
# define symbol_from_dll GetProcAddress
|
||||
# define close_dll FreeLibrary
|
||||
# endif
|
||||
/*
|
||||
* Wrapper defines
|
||||
*/
|
||||
@@ -241,10 +233,10 @@ typedef int perl_key;
|
||||
# else
|
||||
# define Perl_sv_catpvn dll_Perl_sv_catpvn
|
||||
# endif
|
||||
#ifdef PERL589_OR_LATER
|
||||
# ifdef PERL589_OR_LATER
|
||||
# define Perl_sv_2iv_flags dll_Perl_sv_2iv_flags
|
||||
# define Perl_newXS_flags dll_Perl_newXS_flags
|
||||
#endif
|
||||
# endif
|
||||
# define Perl_sv_free dll_Perl_sv_free
|
||||
# if (PERL_REVISION == 5) && (PERL_VERSION >= 10)
|
||||
# define Perl_sv_free2 dll_Perl_sv_free2
|
||||
@@ -330,25 +322,25 @@ static int (*perl_run)(PerlInterpreter*);
|
||||
static int (*perl_parse)(PerlInterpreter*, XSINIT_t, int, char**, char**);
|
||||
static void* (*Perl_get_context)(void);
|
||||
static void (*Perl_croak)(pTHX_ const char*, ...) __attribute__noreturn__;
|
||||
#ifdef PERL5101_OR_LATER
|
||||
# ifdef PERL5101_OR_LATER
|
||||
/* Perl-5.18 has a different Perl_croak_xs_usage signature. */
|
||||
# if (PERL_REVISION == 5) && (PERL_VERSION >= 18)
|
||||
# if (PERL_REVISION == 5) && (PERL_VERSION >= 18)
|
||||
static void (*Perl_croak_xs_usage)(const CV *const, const char *const params)
|
||||
__attribute__noreturn__;
|
||||
# else
|
||||
# else
|
||||
static void (*Perl_croak_xs_usage)(pTHX_ const CV *const, const char *const params)
|
||||
__attribute__noreturn__;
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
static void (*Perl_croak_nocontext)(const char*, ...) __attribute__noreturn__;
|
||||
static I32 (*Perl_dowantarray)(pTHX);
|
||||
static void (*Perl_free_tmps)(pTHX);
|
||||
static HV* (*Perl_gv_stashpv)(pTHX_ const char*, I32);
|
||||
#if (PERL_REVISION == 5) && (PERL_VERSION >= 22)
|
||||
# if (PERL_REVISION == 5) && (PERL_VERSION >= 22)
|
||||
static I32* (*Perl_markstack_grow)(pTHX);
|
||||
#else
|
||||
# else
|
||||
static void (*Perl_markstack_grow)(pTHX);
|
||||
#endif
|
||||
# endif
|
||||
static MAGIC* (*Perl_mg_find)(pTHX_ SV*, int);
|
||||
static CV* (*Perl_newXS)(pTHX_ char*, XSUBADDR_t, char*);
|
||||
static SV* (*Perl_newSV)(pTHX_ STRLEN);
|
||||
@@ -363,50 +355,50 @@ static SV* (*Perl_call_method)(pTHX_ const char*, I32);
|
||||
static void (*Perl_pop_scope)(pTHX);
|
||||
static void (*Perl_push_scope)(pTHX);
|
||||
static void (*Perl_save_int)(pTHX_ int*);
|
||||
#if (PERL_REVISION == 5) && (PERL_VERSION >= 20)
|
||||
# if (PERL_REVISION == 5) && (PERL_VERSION >= 20)
|
||||
static void (*Perl_save_strlen)(pTHX_ STRLEN* ptr);
|
||||
#endif
|
||||
# endif
|
||||
static SV** (*Perl_stack_grow)(pTHX_ SV**, SV**p, int);
|
||||
static SV** (*Perl_set_context)(void*);
|
||||
#if (PERL_REVISION == 5) && (PERL_VERSION >= 14)
|
||||
# if (PERL_REVISION == 5) && (PERL_VERSION >= 14)
|
||||
static bool (*Perl_sv_2bool_flags)(pTHX_ SV*, I32);
|
||||
# if (PERL_REVISION == 5) && (PERL_VERSION < 22)
|
||||
# if (PERL_REVISION == 5) && (PERL_VERSION < 22)
|
||||
static void (*Perl_xs_apiversion_bootcheck)(pTHX_ SV *module, const char *api_p, STRLEN api_len);
|
||||
# endif
|
||||
#else
|
||||
# endif
|
||||
# else
|
||||
static bool (*Perl_sv_2bool)(pTHX_ SV*);
|
||||
#endif
|
||||
# endif
|
||||
static IV (*Perl_sv_2iv)(pTHX_ SV*);
|
||||
static SV* (*Perl_sv_2mortal)(pTHX_ SV*);
|
||||
#if (PERL_REVISION == 5) && (PERL_VERSION >= 8)
|
||||
# if (PERL_REVISION == 5) && (PERL_VERSION >= 8)
|
||||
static char* (*Perl_sv_2pv_flags)(pTHX_ SV*, STRLEN*, I32);
|
||||
static char* (*Perl_sv_2pv_nolen)(pTHX_ SV*);
|
||||
#else
|
||||
# else
|
||||
static char* (*Perl_sv_2pv)(pTHX_ SV*, STRLEN*);
|
||||
#endif
|
||||
# endif
|
||||
static SV* (*Perl_sv_bless)(pTHX_ SV*, HV*);
|
||||
#if (PERL_REVISION == 5) && (PERL_VERSION >= 8)
|
||||
# if (PERL_REVISION == 5) && (PERL_VERSION >= 8)
|
||||
static void (*Perl_sv_catpvn_flags)(pTHX_ SV* , const char*, STRLEN, I32);
|
||||
#else
|
||||
# else
|
||||
static void (*Perl_sv_catpvn)(pTHX_ SV*, const char*, STRLEN);
|
||||
#endif
|
||||
#ifdef PERL589_OR_LATER
|
||||
# endif
|
||||
# ifdef PERL589_OR_LATER
|
||||
static IV (*Perl_sv_2iv_flags)(pTHX_ SV* sv, I32 flags);
|
||||
static CV * (*Perl_newXS_flags)(pTHX_ const char *name, XSUBADDR_t subaddr, const char *const filename, const char *const proto, U32 flags);
|
||||
#endif
|
||||
# endif
|
||||
static void (*Perl_sv_free)(pTHX_ SV*);
|
||||
static int (*Perl_sv_isa)(pTHX_ SV*, const char*);
|
||||
static void (*Perl_sv_magic)(pTHX_ SV*, SV*, int, const char*, I32);
|
||||
static void (*Perl_sv_setiv)(pTHX_ SV*, IV);
|
||||
static void (*Perl_sv_setpv)(pTHX_ SV*, const char*);
|
||||
static void (*Perl_sv_setpvn)(pTHX_ SV*, const char*, STRLEN);
|
||||
#if (PERL_REVISION == 5) && (PERL_VERSION >= 8)
|
||||
# if (PERL_REVISION == 5) && (PERL_VERSION >= 8)
|
||||
static void (*Perl_sv_setsv_flags)(pTHX_ SV*, SV*, I32);
|
||||
#else
|
||||
# else
|
||||
static void (*Perl_sv_setsv)(pTHX_ SV*, SV*);
|
||||
#endif
|
||||
# endif
|
||||
static bool (*Perl_sv_upgrade)(pTHX_ SV*, U32);
|
||||
#if (PERL_REVISION == 5) && (PERL_VERSION < 10)
|
||||
# if (PERL_REVISION == 5) && (PERL_VERSION < 10)
|
||||
static SV*** (*Perl_Tstack_sp_ptr)(register PerlInterpreter*);
|
||||
static OP** (*Perl_Top_ptr)(register PerlInterpreter*);
|
||||
static SV*** (*Perl_Tstack_base_ptr)(register PerlInterpreter*);
|
||||
@@ -418,18 +410,18 @@ static I32** (*Perl_Tmarkstack_max_ptr)(register PerlInterpreter*);
|
||||
static SV** (*Perl_TSv_ptr)(register PerlInterpreter*);
|
||||
static XPV** (*Perl_TXpv_ptr)(register PerlInterpreter*);
|
||||
static STRLEN* (*Perl_Tna_ptr)(register PerlInterpreter*);
|
||||
#else
|
||||
/* Perl-5.18 has a different Perl_sv_free2 signature. */
|
||||
# if (PERL_REVISION == 5) && (PERL_VERSION >= 18)
|
||||
static void (*Perl_sv_free2)(pTHX_ SV*, const U32);
|
||||
# else
|
||||
/* Perl-5.18 has a different Perl_sv_free2 signature. */
|
||||
# if (PERL_REVISION == 5) && (PERL_VERSION >= 18)
|
||||
static void (*Perl_sv_free2)(pTHX_ SV*, const U32);
|
||||
# else
|
||||
static void (*Perl_sv_free2)(pTHX_ SV*);
|
||||
# endif
|
||||
# endif
|
||||
static void (*Perl_sys_init)(int* argc, char*** argv);
|
||||
static void (*Perl_sys_term)(void);
|
||||
static void (*Perl_call_list)(pTHX_ I32, AV*);
|
||||
# if (PERL_REVISION == 5) && (PERL_VERSION >= 14)
|
||||
# else
|
||||
# if (PERL_REVISION == 5) && (PERL_VERSION >= 14)
|
||||
# else
|
||||
static SV** (*Perl_ISv_ptr)(register PerlInterpreter*);
|
||||
static SV*** (*Perl_Istack_max_ptr)(register PerlInterpreter*);
|
||||
static SV*** (*Perl_Istack_base_ptr)(register PerlInterpreter*);
|
||||
@@ -443,23 +435,23 @@ static SV*** (*Perl_Istack_sp_ptr)(register PerlInterpreter*);
|
||||
static OP** (*Perl_Iop_ptr)(register PerlInterpreter*);
|
||||
static I32* (*Perl_Iscopestack_ix_ptr)(register PerlInterpreter*);
|
||||
static AV** (*Perl_Iunitcheckav_ptr)(register PerlInterpreter*);
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
#if (PERL_REVISION == 5) && (PERL_VERSION >= 22)
|
||||
# if (PERL_REVISION == 5) && (PERL_VERSION >= 22)
|
||||
static I32 (*Perl_xs_handshake)(const U32, void *, const char *, ...);
|
||||
static void (*Perl_xs_boot_epilog)(pTHX_ const U32);
|
||||
#endif
|
||||
|
||||
#if (PERL_REVISION == 5) && (PERL_VERSION >= 14)
|
||||
# ifdef USE_ITHREADS
|
||||
static perl_key* dll_PL_thr_key;
|
||||
# endif
|
||||
#else
|
||||
|
||||
# if (PERL_REVISION == 5) && (PERL_VERSION >= 14)
|
||||
# ifdef USE_ITHREADS
|
||||
static perl_key* dll_PL_thr_key;
|
||||
# endif
|
||||
# else
|
||||
static GV** (*Perl_Idefgv_ptr)(register PerlInterpreter*);
|
||||
static GV** (*Perl_Ierrgv_ptr)(register PerlInterpreter*);
|
||||
static SV* (*Perl_Isv_yes_ptr)(register PerlInterpreter*);
|
||||
static perl_key* (*Perl_Gthr_key_ptr)_((pTHX));
|
||||
#endif
|
||||
# endif
|
||||
static void (*boot_DynaLoader)_((pTHX_ CV*));
|
||||
static HE * (*Perl_hv_iternext_flags)(pTHX_ HV *, I32);
|
||||
static I32 (*Perl_hv_iterinit)(pTHX_ HV *);
|
||||
@@ -468,13 +460,13 @@ static SV * (*Perl_hv_iterval)(pTHX_ HV *, HE *);
|
||||
static SV** (*Perl_av_fetch)(pTHX_ AV *, SSize_t, I32);
|
||||
static SSize_t (*Perl_av_len)(pTHX_ AV *);
|
||||
static NV (*Perl_sv_2nv_flags)(pTHX_ SV *const, const I32);
|
||||
#if defined(PERLIO_LAYERS) && !defined(USE_SFIO)
|
||||
# if defined(PERLIO_LAYERS) && !defined(USE_SFIO)
|
||||
static IV (*PerlIOBase_pushed)(pTHX_ PerlIO *, const char *, SV *, PerlIO_funcs *);
|
||||
static void (*PerlIO_define_layer)(pTHX_ PerlIO_funcs *);
|
||||
#endif
|
||||
#if (PERL_REVISION == 5) && (PERL_VERSION >= 24)
|
||||
# endif
|
||||
# if (PERL_REVISION == 5) && (PERL_VERSION >= 24)
|
||||
static void (*Perl_savetmps)(pTHX);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
/*
|
||||
* Table of name to function pointer of perl.
|
||||
@@ -491,12 +483,12 @@ static struct {
|
||||
{"perl_parse", (PERL_PROC*)&perl_parse},
|
||||
{"Perl_get_context", (PERL_PROC*)&Perl_get_context},
|
||||
{"Perl_croak", (PERL_PROC*)&Perl_croak},
|
||||
#ifdef PERL5101_OR_LATER
|
||||
# ifdef PERL5101_OR_LATER
|
||||
{"Perl_croak_xs_usage", (PERL_PROC*)&Perl_croak_xs_usage},
|
||||
#endif
|
||||
#ifdef PERL_IMPLICIT_CONTEXT
|
||||
# endif
|
||||
# ifdef PERL_IMPLICIT_CONTEXT
|
||||
{"Perl_croak_nocontext", (PERL_PROC*)&Perl_croak_nocontext},
|
||||
#endif
|
||||
# endif
|
||||
{"Perl_dowantarray", (PERL_PROC*)&Perl_dowantarray},
|
||||
{"Perl_free_tmps", (PERL_PROC*)&Perl_free_tmps},
|
||||
{"Perl_gv_stashpv", (PERL_PROC*)&Perl_gv_stashpv},
|
||||
@@ -515,50 +507,50 @@ static struct {
|
||||
{"Perl_pop_scope", (PERL_PROC*)&Perl_pop_scope},
|
||||
{"Perl_push_scope", (PERL_PROC*)&Perl_push_scope},
|
||||
{"Perl_save_int", (PERL_PROC*)&Perl_save_int},
|
||||
#if (PERL_REVISION == 5) && (PERL_VERSION >= 20)
|
||||
# if (PERL_REVISION == 5) && (PERL_VERSION >= 20)
|
||||
{"Perl_save_strlen", (PERL_PROC*)&Perl_save_strlen},
|
||||
#endif
|
||||
# endif
|
||||
{"Perl_stack_grow", (PERL_PROC*)&Perl_stack_grow},
|
||||
{"Perl_set_context", (PERL_PROC*)&Perl_set_context},
|
||||
#if (PERL_REVISION == 5) && (PERL_VERSION >= 14)
|
||||
# if (PERL_REVISION == 5) && (PERL_VERSION >= 14)
|
||||
{"Perl_sv_2bool_flags", (PERL_PROC*)&Perl_sv_2bool_flags},
|
||||
# if (PERL_REVISION == 5) && (PERL_VERSION < 22)
|
||||
# if (PERL_REVISION == 5) && (PERL_VERSION < 22)
|
||||
{"Perl_xs_apiversion_bootcheck",(PERL_PROC*)&Perl_xs_apiversion_bootcheck},
|
||||
# endif
|
||||
#else
|
||||
# endif
|
||||
# else
|
||||
{"Perl_sv_2bool", (PERL_PROC*)&Perl_sv_2bool},
|
||||
#endif
|
||||
# endif
|
||||
{"Perl_sv_2iv", (PERL_PROC*)&Perl_sv_2iv},
|
||||
{"Perl_sv_2mortal", (PERL_PROC*)&Perl_sv_2mortal},
|
||||
#if (PERL_REVISION == 5) && (PERL_VERSION >= 8)
|
||||
# if (PERL_REVISION == 5) && (PERL_VERSION >= 8)
|
||||
{"Perl_sv_2pv_flags", (PERL_PROC*)&Perl_sv_2pv_flags},
|
||||
{"Perl_sv_2pv_nolen", (PERL_PROC*)&Perl_sv_2pv_nolen},
|
||||
#else
|
||||
# else
|
||||
{"Perl_sv_2pv", (PERL_PROC*)&Perl_sv_2pv},
|
||||
#endif
|
||||
#ifdef PERL589_OR_LATER
|
||||
# endif
|
||||
# ifdef PERL589_OR_LATER
|
||||
{"Perl_sv_2iv_flags", (PERL_PROC*)&Perl_sv_2iv_flags},
|
||||
{"Perl_newXS_flags", (PERL_PROC*)&Perl_newXS_flags},
|
||||
#endif
|
||||
# endif
|
||||
{"Perl_sv_bless", (PERL_PROC*)&Perl_sv_bless},
|
||||
#if (PERL_REVISION == 5) && (PERL_VERSION >= 8)
|
||||
# if (PERL_REVISION == 5) && (PERL_VERSION >= 8)
|
||||
{"Perl_sv_catpvn_flags", (PERL_PROC*)&Perl_sv_catpvn_flags},
|
||||
#else
|
||||
# else
|
||||
{"Perl_sv_catpvn", (PERL_PROC*)&Perl_sv_catpvn},
|
||||
#endif
|
||||
# endif
|
||||
{"Perl_sv_free", (PERL_PROC*)&Perl_sv_free},
|
||||
{"Perl_sv_isa", (PERL_PROC*)&Perl_sv_isa},
|
||||
{"Perl_sv_magic", (PERL_PROC*)&Perl_sv_magic},
|
||||
{"Perl_sv_setiv", (PERL_PROC*)&Perl_sv_setiv},
|
||||
{"Perl_sv_setpv", (PERL_PROC*)&Perl_sv_setpv},
|
||||
{"Perl_sv_setpvn", (PERL_PROC*)&Perl_sv_setpvn},
|
||||
#if (PERL_REVISION == 5) && (PERL_VERSION >= 8)
|
||||
# if (PERL_REVISION == 5) && (PERL_VERSION >= 8)
|
||||
{"Perl_sv_setsv_flags", (PERL_PROC*)&Perl_sv_setsv_flags},
|
||||
#else
|
||||
# else
|
||||
{"Perl_sv_setsv", (PERL_PROC*)&Perl_sv_setsv},
|
||||
#endif
|
||||
# endif
|
||||
{"Perl_sv_upgrade", (PERL_PROC*)&Perl_sv_upgrade},
|
||||
#if (PERL_REVISION == 5) && (PERL_VERSION < 10)
|
||||
# if (PERL_REVISION == 5) && (PERL_VERSION < 10)
|
||||
{"Perl_Tstack_sp_ptr", (PERL_PROC*)&Perl_Tstack_sp_ptr},
|
||||
{"Perl_Top_ptr", (PERL_PROC*)&Perl_Top_ptr},
|
||||
{"Perl_Tstack_base_ptr", (PERL_PROC*)&Perl_Tstack_base_ptr},
|
||||
@@ -570,13 +562,13 @@ static struct {
|
||||
{"Perl_TSv_ptr", (PERL_PROC*)&Perl_TSv_ptr},
|
||||
{"Perl_TXpv_ptr", (PERL_PROC*)&Perl_TXpv_ptr},
|
||||
{"Perl_Tna_ptr", (PERL_PROC*)&Perl_Tna_ptr},
|
||||
#else
|
||||
# else
|
||||
{"Perl_sv_free2", (PERL_PROC*)&Perl_sv_free2},
|
||||
{"Perl_sys_init", (PERL_PROC*)&Perl_sys_init},
|
||||
{"Perl_sys_term", (PERL_PROC*)&Perl_sys_term},
|
||||
{"Perl_call_list", (PERL_PROC*)&Perl_call_list},
|
||||
# if (PERL_REVISION == 5) && (PERL_VERSION >= 14)
|
||||
# else
|
||||
# if (PERL_REVISION == 5) && (PERL_VERSION >= 14)
|
||||
# else
|
||||
{"Perl_ISv_ptr", (PERL_PROC*)&Perl_ISv_ptr},
|
||||
{"Perl_Istack_max_ptr", (PERL_PROC*)&Perl_Istack_max_ptr},
|
||||
{"Perl_Istack_base_ptr", (PERL_PROC*)&Perl_Istack_base_ptr},
|
||||
@@ -590,22 +582,22 @@ static struct {
|
||||
{"Perl_Iop_ptr", (PERL_PROC*)&Perl_Iop_ptr},
|
||||
{"Perl_Iscopestack_ix_ptr", (PERL_PROC*)&Perl_Iscopestack_ix_ptr},
|
||||
{"Perl_Iunitcheckav_ptr", (PERL_PROC*)&Perl_Iunitcheckav_ptr},
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
#if (PERL_REVISION == 5) && (PERL_VERSION >= 22)
|
||||
# if (PERL_REVISION == 5) && (PERL_VERSION >= 22)
|
||||
{"Perl_xs_handshake", (PERL_PROC*)&Perl_xs_handshake},
|
||||
{"Perl_xs_boot_epilog", (PERL_PROC*)&Perl_xs_boot_epilog},
|
||||
#endif
|
||||
#if (PERL_REVISION == 5) && (PERL_VERSION >= 14)
|
||||
# endif
|
||||
# if (PERL_REVISION == 5) && (PERL_VERSION >= 14)
|
||||
# ifdef USE_ITHREADS
|
||||
{"PL_thr_key", (PERL_PROC*)&dll_PL_thr_key},
|
||||
# endif
|
||||
#else
|
||||
# else
|
||||
{"Perl_Idefgv_ptr", (PERL_PROC*)&Perl_Idefgv_ptr},
|
||||
{"Perl_Ierrgv_ptr", (PERL_PROC*)&Perl_Ierrgv_ptr},
|
||||
{"Perl_Isv_yes_ptr", (PERL_PROC*)&Perl_Isv_yes_ptr},
|
||||
{"Perl_Gthr_key_ptr", (PERL_PROC*)&Perl_Gthr_key_ptr},
|
||||
#endif
|
||||
# endif
|
||||
{"boot_DynaLoader", (PERL_PROC*)&boot_DynaLoader},
|
||||
{"Perl_hv_iternext_flags", (PERL_PROC*)&Perl_hv_iternext_flags},
|
||||
{"Perl_hv_iterinit", (PERL_PROC*)&Perl_hv_iterinit},
|
||||
@@ -614,20 +606,20 @@ static struct {
|
||||
{"Perl_av_fetch", (PERL_PROC*)&Perl_av_fetch},
|
||||
{"Perl_av_len", (PERL_PROC*)&Perl_av_len},
|
||||
{"Perl_sv_2nv_flags", (PERL_PROC*)&Perl_sv_2nv_flags},
|
||||
#if defined(PERLIO_LAYERS) && !defined(USE_SFIO)
|
||||
# if defined(PERLIO_LAYERS) && !defined(USE_SFIO)
|
||||
{"PerlIOBase_pushed", (PERL_PROC*)&PerlIOBase_pushed},
|
||||
{"PerlIO_define_layer", (PERL_PROC*)&PerlIO_define_layer},
|
||||
#endif
|
||||
#if (PERL_REVISION == 5) && (PERL_VERSION >= 24)
|
||||
# endif
|
||||
# if (PERL_REVISION == 5) && (PERL_VERSION >= 24)
|
||||
{"Perl_savetmps", (PERL_PROC*)&Perl_savetmps},
|
||||
#endif
|
||||
# endif
|
||||
{"", NULL},
|
||||
};
|
||||
|
||||
/* Work around for perl-5.18.
|
||||
* For now, only the definitions of S_SvREFCNT_dec are needed in
|
||||
* "perl\lib\CORE\inline.h". */
|
||||
#if (PERL_REVISION == 5) && (PERL_VERSION >= 18)
|
||||
# if (PERL_REVISION == 5) && (PERL_VERSION >= 18)
|
||||
static void
|
||||
S_SvREFCNT_dec(pTHX_ SV *sv)
|
||||
{
|
||||
@@ -639,7 +631,7 @@ S_SvREFCNT_dec(pTHX_ SV *sv)
|
||||
Perl_sv_free2(aTHX_ sv, rc);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
/*
|
||||
* Make all runtime-links of perl.
|
||||
@@ -854,7 +846,7 @@ perl_buf_free(buf_T *bp)
|
||||
I32 cur_val(pTHX_ IV iv, SV *sv);
|
||||
# else
|
||||
I32 cur_val(IV iv, SV *sv);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
/*
|
||||
* Handler for the magic variables $main::curwin and $main::curbuf.
|
||||
@@ -985,7 +977,7 @@ ex_perl(exarg_T *eap)
|
||||
|
||||
SvREFCNT_dec(sv);
|
||||
|
||||
err = CHECK_EVAL_ERR(length);
|
||||
err = SvPV(GvSV(PL_errgv), length);
|
||||
|
||||
FREETMPS;
|
||||
LEAVE;
|
||||
@@ -1274,7 +1266,7 @@ do_perleval(char_u *str, typval_T *rettv)
|
||||
if (sv) {
|
||||
perl_to_vim(sv, rettv);
|
||||
ref_map_free();
|
||||
err = CHECK_EVAL_ERR(err_len);
|
||||
err = SvPV(GvSV(PL_errgv), err_len);
|
||||
}
|
||||
PUTBACK;
|
||||
FREETMPS;
|
||||
@@ -1318,7 +1310,7 @@ ex_perldo(exarg_T *eap)
|
||||
sv_catpvn(sv, "}", 1);
|
||||
perl_eval_sv(sv, G_DISCARD | G_NOARGS);
|
||||
SvREFCNT_dec(sv);
|
||||
str = CHECK_EVAL_ERR(length);
|
||||
str = SvPV(GvSV(PL_errgv), length);
|
||||
if (length)
|
||||
goto err;
|
||||
|
||||
@@ -1332,7 +1324,7 @@ ex_perldo(exarg_T *eap)
|
||||
sv_setpv(GvSV(PL_defgv), (char *)ml_get(i));
|
||||
PUSHMARK(sp);
|
||||
perl_call_pv("VIM::perldo", G_SCALAR | G_EVAL);
|
||||
str = CHECK_EVAL_ERR(length);
|
||||
str = SvPV(GvSV(PL_errgv), length);
|
||||
if (length)
|
||||
break;
|
||||
SPAGAIN;
|
||||
|
||||
+181
@@ -0,0 +1,181 @@
|
||||
/*
|
||||
* iscygpty.c -- part of ptycheck
|
||||
* https://github.com/k-takata/ptycheck
|
||||
*
|
||||
* Copyright (c) 2015-2016 K.Takata
|
||||
*
|
||||
* You can redistribute it and/or modify it under the terms of either
|
||||
* the MIT license (as described below) or the Vim license.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <ctype.h>
|
||||
#include <io.h>
|
||||
#include <wchar.h>
|
||||
#include <windows.h>
|
||||
|
||||
#ifdef USE_FILEEXTD
|
||||
/* VC 7.1 or earlier doesn't support SAL. */
|
||||
# if !defined(_MSC_VER) || (_MSC_VER < 1400)
|
||||
# define __out
|
||||
# define __in
|
||||
# define __in_opt
|
||||
# endif
|
||||
/* Win32 FileID API Library:
|
||||
* http://www.microsoft.com/en-us/download/details.aspx?id=22599
|
||||
* Needed for WinXP. */
|
||||
# include <fileextd.h>
|
||||
#else /* USE_FILEEXTD */
|
||||
/* VC 8 or earlier. */
|
||||
# if defined(_MSC_VER) && (_MSC_VER < 1500)
|
||||
# ifdef ENABLE_STUB_IMPL
|
||||
# define STUB_IMPL
|
||||
# else
|
||||
# error "Win32 FileID API Library is required for VC2005 or earlier."
|
||||
# endif
|
||||
# endif
|
||||
#endif /* USE_FILEEXTD */
|
||||
|
||||
|
||||
#include "iscygpty.h"
|
||||
|
||||
//#define USE_DYNFILEID
|
||||
#ifdef USE_DYNFILEID
|
||||
typedef BOOL (WINAPI *pfnGetFileInformationByHandleEx)(
|
||||
HANDLE hFile,
|
||||
FILE_INFO_BY_HANDLE_CLASS FileInformationClass,
|
||||
LPVOID lpFileInformation,
|
||||
DWORD dwBufferSize
|
||||
);
|
||||
static pfnGetFileInformationByHandleEx pGetFileInformationByHandleEx = NULL;
|
||||
|
||||
# ifndef USE_FILEEXTD
|
||||
static BOOL WINAPI stub_GetFileInformationByHandleEx(
|
||||
HANDLE hFile,
|
||||
FILE_INFO_BY_HANDLE_CLASS FileInformationClass,
|
||||
LPVOID lpFileInformation,
|
||||
DWORD dwBufferSize
|
||||
)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
# endif
|
||||
|
||||
static void setup_fileid_api(void)
|
||||
{
|
||||
if (pGetFileInformationByHandleEx != NULL) {
|
||||
return;
|
||||
}
|
||||
pGetFileInformationByHandleEx = (pfnGetFileInformationByHandleEx)
|
||||
GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")),
|
||||
"GetFileInformationByHandleEx");
|
||||
if (pGetFileInformationByHandleEx == NULL) {
|
||||
# ifdef USE_FILEEXTD
|
||||
pGetFileInformationByHandleEx = GetFileInformationByHandleEx;
|
||||
# else
|
||||
pGetFileInformationByHandleEx = stub_GetFileInformationByHandleEx;
|
||||
# endif
|
||||
}
|
||||
}
|
||||
#else
|
||||
# define pGetFileInformationByHandleEx GetFileInformationByHandleEx
|
||||
# define setup_fileid_api()
|
||||
#endif
|
||||
|
||||
|
||||
#define is_wprefix(s, prefix) \
|
||||
(wcsncmp((s), (prefix), sizeof(prefix) / sizeof(WCHAR) - 1) == 0)
|
||||
|
||||
/* Check if the fd is a cygwin/msys's pty. */
|
||||
int is_cygpty(int fd)
|
||||
{
|
||||
#ifdef STUB_IMPL
|
||||
return 0;
|
||||
#else
|
||||
HANDLE h;
|
||||
int size = sizeof(FILE_NAME_INFO) + sizeof(WCHAR) * MAX_PATH;
|
||||
FILE_NAME_INFO *nameinfo;
|
||||
WCHAR *p = NULL;
|
||||
|
||||
setup_fileid_api();
|
||||
|
||||
h = (HANDLE) _get_osfhandle(fd);
|
||||
if (h == INVALID_HANDLE_VALUE) {
|
||||
return 0;
|
||||
}
|
||||
/* Cygwin/msys's pty is a pipe. */
|
||||
if (GetFileType(h) != FILE_TYPE_PIPE) {
|
||||
return 0;
|
||||
}
|
||||
nameinfo = malloc(size);
|
||||
if (nameinfo == NULL) {
|
||||
return 0;
|
||||
}
|
||||
/* Check the name of the pipe:
|
||||
* '\{cygwin,msys}-XXXXXXXXXXXXXXXX-ptyN-{from,to}-master' */
|
||||
if (pGetFileInformationByHandleEx(h, FileNameInfo, nameinfo, size)) {
|
||||
nameinfo->FileName[nameinfo->FileNameLength / sizeof(WCHAR)] = L'\0';
|
||||
p = nameinfo->FileName;
|
||||
if (is_wprefix(p, L"\\cygwin-")) { /* Cygwin */
|
||||
p += 8;
|
||||
} else if (is_wprefix(p, L"\\msys-")) { /* MSYS and MSYS2 */
|
||||
p += 6;
|
||||
} else {
|
||||
p = NULL;
|
||||
}
|
||||
if (p != NULL) {
|
||||
while (*p && isxdigit(*p)) /* Skip 16-digit hexadecimal. */
|
||||
++p;
|
||||
if (is_wprefix(p, L"-pty")) {
|
||||
p += 4;
|
||||
} else {
|
||||
p = NULL;
|
||||
}
|
||||
}
|
||||
if (p != NULL) {
|
||||
while (*p && isdigit(*p)) /* Skip pty number. */
|
||||
++p;
|
||||
if (is_wprefix(p, L"-from-master")) {
|
||||
//p += 12;
|
||||
} else if (is_wprefix(p, L"-to-master")) {
|
||||
//p += 10;
|
||||
} else {
|
||||
p = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
free(nameinfo);
|
||||
return (p != NULL);
|
||||
#endif /* STUB_IMPL */
|
||||
}
|
||||
|
||||
/* Check if at least one cygwin/msys pty is used. */
|
||||
int is_cygpty_used(void)
|
||||
{
|
||||
int fd, ret = 0;
|
||||
|
||||
for (fd = 0; fd < 3; fd++) {
|
||||
ret |= is_cygpty(fd);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* vim: set ts=4 sw=4: */
|
||||
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* iscygpty.h -- part of ptycheck
|
||||
* https://github.com/k-takata/ptycheck
|
||||
*
|
||||
* Copyright (c) 2015-2016 K.Takata
|
||||
*
|
||||
* You can redistribute it and/or modify it under the terms of either
|
||||
* the MIT license (as described below) or the Vim license.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _ISCYGPTY_H
|
||||
#define _ISCYGPTY_H
|
||||
|
||||
int is_cygpty(int fd);
|
||||
int is_cygpty_used(void);
|
||||
|
||||
#endif /* _ISCYGPTY_H */
|
||||
+11
@@ -19,6 +19,10 @@
|
||||
# include <limits.h>
|
||||
#endif
|
||||
|
||||
#if defined(WIN3264) && !defined(FEAT_GUI_W32)
|
||||
# include "iscygpty.h"
|
||||
#endif
|
||||
|
||||
/* Maximum number of commands from + or -c arguments. */
|
||||
#define MAX_ARG_CMDS 10
|
||||
|
||||
@@ -2631,6 +2635,13 @@ check_tty(mparm_T *parmp)
|
||||
mch_errmsg(_("Vim: Error: Failure to start gvim from NetBeans\n"));
|
||||
exit(1);
|
||||
}
|
||||
#endif
|
||||
#if defined(WIN3264) && !defined(FEAT_GUI_W32)
|
||||
if (is_cygpty_used())
|
||||
{
|
||||
mch_errmsg(_("Vim: Error: This version of Vim does not run in a Cygwin terminal\n"));
|
||||
exit(1);
|
||||
}
|
||||
#endif
|
||||
if (!parmp->stdout_isatty)
|
||||
mch_errmsg(_("Vim: Warning: Output is not to a terminal\n"));
|
||||
|
||||
+130
-14
@@ -1356,7 +1356,6 @@ static struct interval ambiguous[] =
|
||||
{0x2605, 0x2606},
|
||||
{0x2609, 0x2609},
|
||||
{0x260e, 0x260f},
|
||||
{0x2614, 0x2615},
|
||||
{0x261c, 0x261c},
|
||||
{0x261e, 0x261e},
|
||||
{0x2640, 0x2640},
|
||||
@@ -1367,15 +1366,20 @@ static struct interval ambiguous[] =
|
||||
{0x266c, 0x266d},
|
||||
{0x266f, 0x266f},
|
||||
{0x269e, 0x269f},
|
||||
{0x26be, 0x26bf},
|
||||
{0x26c4, 0x26cd},
|
||||
{0x26cf, 0x26e1},
|
||||
{0x26bf, 0x26bf},
|
||||
{0x26c6, 0x26cd},
|
||||
{0x26cf, 0x26d3},
|
||||
{0x26d5, 0x26e1},
|
||||
{0x26e3, 0x26e3},
|
||||
{0x26e8, 0x26ff},
|
||||
{0x26e8, 0x26e9},
|
||||
{0x26eb, 0x26f1},
|
||||
{0x26f4, 0x26f4},
|
||||
{0x26f6, 0x26f9},
|
||||
{0x26fb, 0x26fc},
|
||||
{0x26fe, 0x26ff},
|
||||
{0x273d, 0x273d},
|
||||
{0x2757, 0x2757},
|
||||
{0x2776, 0x277f},
|
||||
{0x2b55, 0x2b59},
|
||||
{0x2b56, 0x2b59},
|
||||
{0x3248, 0x324f},
|
||||
{0xe000, 0xf8ff},
|
||||
{0xfe00, 0xfe0f},
|
||||
@@ -1383,7 +1387,9 @@ static struct interval ambiguous[] =
|
||||
{0x1f100, 0x1f10a},
|
||||
{0x1f110, 0x1f12d},
|
||||
{0x1f130, 0x1f169},
|
||||
{0x1f170, 0x1f19a},
|
||||
{0x1f170, 0x1f18d},
|
||||
{0x1f18f, 0x1f190},
|
||||
{0x1f19b, 0x1f1ac},
|
||||
{0xe0100, 0xe01ef},
|
||||
{0xf0000, 0xffffd},
|
||||
{0x100000, 0x10fffd}
|
||||
@@ -1404,7 +1410,40 @@ utf_char2cells(int c)
|
||||
static struct interval doublewidth[] =
|
||||
{
|
||||
{0x1100, 0x115f},
|
||||
{0x231a, 0x231b},
|
||||
{0x2329, 0x232a},
|
||||
{0x23e9, 0x23ec},
|
||||
{0x23f0, 0x23f0},
|
||||
{0x23f3, 0x23f3},
|
||||
{0x25fd, 0x25fe},
|
||||
{0x2614, 0x2615},
|
||||
{0x2648, 0x2653},
|
||||
{0x267f, 0x267f},
|
||||
{0x2693, 0x2693},
|
||||
{0x26a1, 0x26a1},
|
||||
{0x26aa, 0x26ab},
|
||||
{0x26bd, 0x26be},
|
||||
{0x26c4, 0x26c5},
|
||||
{0x26ce, 0x26ce},
|
||||
{0x26d4, 0x26d4},
|
||||
{0x26ea, 0x26ea},
|
||||
{0x26f2, 0x26f3},
|
||||
{0x26f5, 0x26f5},
|
||||
{0x26fa, 0x26fa},
|
||||
{0x26fd, 0x26fd},
|
||||
{0x2705, 0x2705},
|
||||
{0x270a, 0x270b},
|
||||
{0x2728, 0x2728},
|
||||
{0x274c, 0x274c},
|
||||
{0x274e, 0x274e},
|
||||
{0x2753, 0x2755},
|
||||
{0x2757, 0x2757},
|
||||
{0x2795, 0x2797},
|
||||
{0x27b0, 0x27b0},
|
||||
{0x27bf, 0x27bf},
|
||||
{0x2b1b, 0x2b1c},
|
||||
{0x2b50, 0x2b50},
|
||||
{0x2b55, 0x2b55},
|
||||
{0x2e80, 0x2e99},
|
||||
{0x2e9b, 0x2ef3},
|
||||
{0x2f00, 0x2fd5},
|
||||
@@ -1431,11 +1470,49 @@ utf_char2cells(int c)
|
||||
{0xfe68, 0xfe6b},
|
||||
{0xff01, 0xff60},
|
||||
{0xffe0, 0xffe6},
|
||||
{0x16fe0, 0x16fe0},
|
||||
{0x17000, 0x187ec},
|
||||
{0x18800, 0x18af2},
|
||||
{0x1b000, 0x1b001},
|
||||
{0x1f004, 0x1f004},
|
||||
{0x1f0cf, 0x1f0cf},
|
||||
{0x1f18e, 0x1f18e},
|
||||
{0x1f191, 0x1f19a},
|
||||
{0x1f200, 0x1f202},
|
||||
{0x1f210, 0x1f23a},
|
||||
{0x1f210, 0x1f23b},
|
||||
{0x1f240, 0x1f248},
|
||||
{0x1f250, 0x1f251},
|
||||
{0x1f300, 0x1f320},
|
||||
{0x1f32d, 0x1f335},
|
||||
{0x1f337, 0x1f37c},
|
||||
{0x1f37e, 0x1f393},
|
||||
{0x1f3a0, 0x1f3ca},
|
||||
{0x1f3cf, 0x1f3d3},
|
||||
{0x1f3e0, 0x1f3f0},
|
||||
{0x1f3f4, 0x1f3f4},
|
||||
{0x1f3f8, 0x1f43e},
|
||||
{0x1f440, 0x1f440},
|
||||
{0x1f442, 0x1f4fc},
|
||||
{0x1f4ff, 0x1f53d},
|
||||
{0x1f54b, 0x1f54e},
|
||||
{0x1f550, 0x1f567},
|
||||
{0x1f57a, 0x1f57a},
|
||||
{0x1f595, 0x1f596},
|
||||
{0x1f5a4, 0x1f5a4},
|
||||
{0x1f5fb, 0x1f64f},
|
||||
{0x1f680, 0x1f6c5},
|
||||
{0x1f6cc, 0x1f6cc},
|
||||
{0x1f6d0, 0x1f6d2},
|
||||
{0x1f6eb, 0x1f6ec},
|
||||
{0x1f6f4, 0x1f6f6},
|
||||
{0x1f910, 0x1f91e},
|
||||
{0x1f920, 0x1f927},
|
||||
{0x1f930, 0x1f930},
|
||||
{0x1f933, 0x1f93e},
|
||||
{0x1f940, 0x1f94b},
|
||||
{0x1f950, 0x1f95e},
|
||||
{0x1f980, 0x1f991},
|
||||
{0x1f9c0, 0x1f9c0},
|
||||
{0x20000, 0x2fffd},
|
||||
{0x30000, 0x3fffd}
|
||||
};
|
||||
@@ -2234,6 +2311,7 @@ utf_iscomposing(int c)
|
||||
{0x0825, 0x0827},
|
||||
{0x0829, 0x082d},
|
||||
{0x0859, 0x085b},
|
||||
{0x08d4, 0x08e1},
|
||||
{0x08e3, 0x0903},
|
||||
{0x093a, 0x093c},
|
||||
{0x093e, 0x094f},
|
||||
@@ -2331,6 +2409,7 @@ utf_iscomposing(int c)
|
||||
{0x17b4, 0x17d3},
|
||||
{0x17dd, 0x17dd},
|
||||
{0x180b, 0x180d},
|
||||
{0x1885, 0x1886},
|
||||
{0x18a9, 0x18a9},
|
||||
{0x1920, 0x192b},
|
||||
{0x1930, 0x193b},
|
||||
@@ -2352,7 +2431,7 @@ utf_iscomposing(int c)
|
||||
{0x1cf2, 0x1cf4},
|
||||
{0x1cf8, 0x1cf9},
|
||||
{0x1dc0, 0x1df5},
|
||||
{0x1dfc, 0x1dff},
|
||||
{0x1dfb, 0x1dff},
|
||||
{0x20d0, 0x20f0},
|
||||
{0x2cef, 0x2cf1},
|
||||
{0x2d7f, 0x2d7f},
|
||||
@@ -2368,7 +2447,7 @@ utf_iscomposing(int c)
|
||||
{0xa80b, 0xa80b},
|
||||
{0xa823, 0xa827},
|
||||
{0xa880, 0xa881},
|
||||
{0xa8b4, 0xa8c4},
|
||||
{0xa8b4, 0xa8c5},
|
||||
{0xa8e0, 0xa8f1},
|
||||
{0xa926, 0xa92d},
|
||||
{0xa947, 0xa953},
|
||||
@@ -2411,6 +2490,7 @@ utf_iscomposing(int c)
|
||||
{0x111b3, 0x111c0},
|
||||
{0x111ca, 0x111cc},
|
||||
{0x1122c, 0x11237},
|
||||
{0x1123e, 0x1123e},
|
||||
{0x112df, 0x112ea},
|
||||
{0x11300, 0x11303},
|
||||
{0x1133c, 0x1133c},
|
||||
@@ -2421,6 +2501,7 @@ utf_iscomposing(int c)
|
||||
{0x11362, 0x11363},
|
||||
{0x11366, 0x1136c},
|
||||
{0x11370, 0x11374},
|
||||
{0x11435, 0x11446},
|
||||
{0x114b0, 0x114c3},
|
||||
{0x115af, 0x115b5},
|
||||
{0x115b8, 0x115c0},
|
||||
@@ -2428,6 +2509,10 @@ utf_iscomposing(int c)
|
||||
{0x11630, 0x11640},
|
||||
{0x116ab, 0x116b7},
|
||||
{0x1171d, 0x1172b},
|
||||
{0x11c2f, 0x11c36},
|
||||
{0x11c38, 0x11c3f},
|
||||
{0x11c92, 0x11ca7},
|
||||
{0x11ca9, 0x11cb6},
|
||||
{0x16af0, 0x16af4},
|
||||
{0x16b30, 0x16b36},
|
||||
{0x16f51, 0x16f7e},
|
||||
@@ -2445,7 +2530,13 @@ utf_iscomposing(int c)
|
||||
{0x1da84, 0x1da84},
|
||||
{0x1da9b, 0x1da9f},
|
||||
{0x1daa1, 0x1daaf},
|
||||
{0x1e000, 0x1e006},
|
||||
{0x1e008, 0x1e018},
|
||||
{0x1e01b, 0x1e021},
|
||||
{0x1e023, 0x1e024},
|
||||
{0x1e026, 0x1e02a},
|
||||
{0x1e8d0, 0x1e8d6},
|
||||
{0x1e944, 0x1e94a},
|
||||
{0xe0100, 0xe01ef}
|
||||
};
|
||||
|
||||
@@ -2844,6 +2935,14 @@ static convertStruct foldCase[] =
|
||||
{0x10a0,0x10c5,1,7264},
|
||||
{0x10c7,0x10cd,6,7264},
|
||||
{0x13f8,0x13fd,1,-8},
|
||||
{0x1c80,0x1c80,-1,-6222},
|
||||
{0x1c81,0x1c81,-1,-6221},
|
||||
{0x1c82,0x1c82,-1,-6212},
|
||||
{0x1c83,0x1c84,1,-6210},
|
||||
{0x1c85,0x1c85,-1,-6211},
|
||||
{0x1c86,0x1c86,-1,-6204},
|
||||
{0x1c87,0x1c87,-1,-6180},
|
||||
{0x1c88,0x1c88,-1,35267},
|
||||
{0x1e00,0x1e94,2,1},
|
||||
{0x1e9b,0x1e9b,-1,-58},
|
||||
{0x1e9e,0x1e9e,-1,-7615},
|
||||
@@ -2909,6 +3008,7 @@ static convertStruct foldCase[] =
|
||||
{0xa7ab,0xa7ab,-1,-42319},
|
||||
{0xa7ac,0xa7ac,-1,-42315},
|
||||
{0xa7ad,0xa7ad,-1,-42305},
|
||||
{0xa7ae,0xa7ae,-1,-42308},
|
||||
{0xa7b0,0xa7b0,-1,-42258},
|
||||
{0xa7b1,0xa7b1,-1,-42282},
|
||||
{0xa7b2,0xa7b2,-1,-42261},
|
||||
@@ -2917,8 +3017,10 @@ static convertStruct foldCase[] =
|
||||
{0xab70,0xabbf,1,-38864},
|
||||
{0xff21,0xff3a,1,32},
|
||||
{0x10400,0x10427,1,40},
|
||||
{0x104b0,0x104d3,1,40},
|
||||
{0x10c80,0x10cb2,1,64},
|
||||
{0x118a0,0x118bf,1,32}
|
||||
{0x118a0,0x118bf,1,32},
|
||||
{0x1e900,0x1e921,1,34}
|
||||
};
|
||||
|
||||
static int utf_convert(int a, convertStruct table[], int tableSize);
|
||||
@@ -3123,6 +3225,7 @@ static convertStruct toLower[] =
|
||||
{0xa7ab,0xa7ab,-1,-42319},
|
||||
{0xa7ac,0xa7ac,-1,-42315},
|
||||
{0xa7ad,0xa7ad,-1,-42305},
|
||||
{0xa7ae,0xa7ae,-1,-42308},
|
||||
{0xa7b0,0xa7b0,-1,-42258},
|
||||
{0xa7b1,0xa7b1,-1,-42282},
|
||||
{0xa7b2,0xa7b2,-1,-42261},
|
||||
@@ -3130,8 +3233,10 @@ static convertStruct toLower[] =
|
||||
{0xa7b4,0xa7b6,2,1},
|
||||
{0xff21,0xff3a,1,32},
|
||||
{0x10400,0x10427,1,40},
|
||||
{0x104b0,0x104d3,1,40},
|
||||
{0x10c80,0x10cb2,1,64},
|
||||
{0x118a0,0x118bf,1,32}
|
||||
{0x118a0,0x118bf,1,32},
|
||||
{0x1e900,0x1e921,1,34}
|
||||
};
|
||||
|
||||
static convertStruct toUpper[] =
|
||||
@@ -3196,6 +3301,7 @@ static convertStruct toUpper[] =
|
||||
{0x266,0x266,-1,42308},
|
||||
{0x268,0x268,-1,-209},
|
||||
{0x269,0x269,-1,-211},
|
||||
{0x26a,0x26a,-1,42308},
|
||||
{0x26b,0x26b,-1,10743},
|
||||
{0x26c,0x26c,-1,42305},
|
||||
{0x26f,0x26f,-1,-211},
|
||||
@@ -3244,6 +3350,14 @@ static convertStruct toUpper[] =
|
||||
{0x4d1,0x52f,2,-1},
|
||||
{0x561,0x586,1,-48},
|
||||
{0x13f8,0x13fd,1,-8},
|
||||
{0x1c80,0x1c80,-1,-6254},
|
||||
{0x1c81,0x1c81,-1,-6253},
|
||||
{0x1c82,0x1c82,-1,-6244},
|
||||
{0x1c83,0x1c84,1,-6242},
|
||||
{0x1c85,0x1c85,-1,-6243},
|
||||
{0x1c86,0x1c86,-1,-6236},
|
||||
{0x1c87,0x1c87,-1,-6181},
|
||||
{0x1c88,0x1c88,-1,35266},
|
||||
{0x1d79,0x1d79,-1,35332},
|
||||
{0x1d7d,0x1d7d,-1,3814},
|
||||
{0x1e01,0x1e95,2,-1},
|
||||
@@ -3302,8 +3416,10 @@ static convertStruct toUpper[] =
|
||||
{0xab70,0xabbf,1,-38864},
|
||||
{0xff41,0xff5a,1,-32},
|
||||
{0x10428,0x1044f,1,-40},
|
||||
{0x104d8,0x104fb,1,-40},
|
||||
{0x10cc0,0x10cf2,1,-64},
|
||||
{0x118c0,0x118df,1,-32}
|
||||
{0x118c0,0x118df,1,-32},
|
||||
{0x1e922,0x1e943,1,-34}
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
+11
-11
@@ -6076,12 +6076,12 @@ get4c(FILE *fd)
|
||||
}
|
||||
|
||||
/*
|
||||
* Read 8 bytes from "fd" and turn them into a time_t, MSB first.
|
||||
* Read 8 bytes from "fd" and turn them into a time_T, MSB first.
|
||||
*/
|
||||
time_t
|
||||
time_T
|
||||
get8ctime(FILE *fd)
|
||||
{
|
||||
time_t n = 0;
|
||||
time_T n = 0;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 8; ++i)
|
||||
@@ -6143,11 +6143,11 @@ put_bytes(FILE *fd, long_u nr, int len)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Write time_t to file "fd" in 8 bytes.
|
||||
* Write time_T to file "fd" in 8 bytes.
|
||||
* Returns FAIL when the write failed.
|
||||
*/
|
||||
int
|
||||
put_time(FILE *fd, time_t the_time)
|
||||
put_time(FILE *fd, time_T the_time)
|
||||
{
|
||||
char_u buf[8];
|
||||
|
||||
@@ -6156,26 +6156,26 @@ put_time(FILE *fd, time_t the_time)
|
||||
}
|
||||
|
||||
/*
|
||||
* Write time_t to "buf[8]".
|
||||
* Write time_T to "buf[8]".
|
||||
*/
|
||||
void
|
||||
time_to_bytes(time_t the_time, char_u *buf)
|
||||
time_to_bytes(time_T the_time, char_u *buf)
|
||||
{
|
||||
int c;
|
||||
int i;
|
||||
int bi = 0;
|
||||
time_t wtime = the_time;
|
||||
time_T wtime = the_time;
|
||||
|
||||
/* time_t can be up to 8 bytes in size, more than long_u, thus we
|
||||
/* time_T can be up to 8 bytes in size, more than long_u, thus we
|
||||
* can't use put_bytes() here.
|
||||
* Another problem is that ">>" may do an arithmetic shift that keeps the
|
||||
* sign. This happens for large values of wtime. A cast to long_u may
|
||||
* truncate if time_t is 8 bytes. So only use a cast when it is 4 bytes,
|
||||
* truncate if time_T is 8 bytes. So only use a cast when it is 4 bytes,
|
||||
* it's safe to assume that long_u is 4 bytes or more and when using 8
|
||||
* bytes the top bit won't be set. */
|
||||
for (i = 7; i >= 0; --i)
|
||||
{
|
||||
if (i + 1 > (int)sizeof(time_t))
|
||||
if (i + 1 > (int)sizeof(time_T))
|
||||
/* ">>" doesn't work well when shifting more bits than avail */
|
||||
buf[bi++] = 0;
|
||||
else
|
||||
|
||||
+2
-1
@@ -8096,7 +8096,8 @@ set_bool_option(
|
||||
need_start_insertmode = TRUE;
|
||||
stop_insert_mode = FALSE;
|
||||
}
|
||||
else
|
||||
/* only reset if it was set previously */
|
||||
else if (old_value)
|
||||
{
|
||||
need_start_insertmode = FALSE;
|
||||
stop_insert_mode = TRUE;
|
||||
|
||||
@@ -17,7 +17,7 @@ int viminfo_readline(vir_T *virp);
|
||||
char_u *viminfo_readstring(vir_T *virp, int off, int convert);
|
||||
void viminfo_writestring(FILE *fd, char_u *p);
|
||||
int barline_writestring(FILE *fd, char_u *s, int remaining_start);
|
||||
time_t vim_time(void);
|
||||
time_T vim_time(void);
|
||||
void do_fixdel(exarg_T *eap);
|
||||
void print_line_no_prefix(linenr_T lnum, int use_number, int list);
|
||||
void print_line(linenr_T lnum, int use_number, int list);
|
||||
|
||||
+3
-3
@@ -103,11 +103,11 @@ int emsgn(char_u *s, long n);
|
||||
int get2c(FILE *fd);
|
||||
int get3c(FILE *fd);
|
||||
int get4c(FILE *fd);
|
||||
time_t get8ctime(FILE *fd);
|
||||
time_T get8ctime(FILE *fd);
|
||||
char_u *read_string(FILE *fd, int cnt);
|
||||
int put_bytes(FILE *fd, long_u nr, int len);
|
||||
int put_time(FILE *fd, time_t the_time);
|
||||
void time_to_bytes(time_t the_time, char_u *buf);
|
||||
int put_time(FILE *fd, time_T the_time);
|
||||
void time_to_bytes(time_T the_time, char_u *buf);
|
||||
int has_non_ascii(char_u *s);
|
||||
void parse_queued_messages(void);
|
||||
/* vim: set ft=c : */
|
||||
|
||||
+3
-3
@@ -113,7 +113,7 @@ typedef struct xfilemark
|
||||
fmark_T fmark;
|
||||
char_u *fname; /* file name, used when fnum == 0 */
|
||||
#ifdef FEAT_VIMINFO
|
||||
time_t time_set;
|
||||
time_T time_set;
|
||||
#endif
|
||||
} xfmark_T;
|
||||
|
||||
@@ -358,7 +358,7 @@ struct u_header
|
||||
int uh_flags; /* see below */
|
||||
pos_T uh_namedm[NMARKS]; /* marks before undo/after redo */
|
||||
visualinfo_T uh_visual; /* Visual areas before undo/after redo */
|
||||
time_t uh_time; /* timestamp when the change was made */
|
||||
time_T uh_time; /* timestamp when the change was made */
|
||||
long uh_save_nr; /* set when the file was saved after the
|
||||
changes in this block */
|
||||
#ifdef U_DEBUG
|
||||
@@ -1819,7 +1819,7 @@ struct file_buffer
|
||||
long b_u_seq_last; /* last used undo sequence number */
|
||||
long b_u_save_nr_last; /* counter for last file write */
|
||||
long b_u_seq_cur; /* hu_seq of header below which we are now */
|
||||
time_t b_u_time_cur; /* uh_time of header below which we are now */
|
||||
time_T b_u_time_cur; /* uh_time of header below which we are now */
|
||||
long b_u_save_nr_cur; /* file write nr after which we are now */
|
||||
|
||||
/*
|
||||
|
||||
@@ -32,7 +32,6 @@ SCRIPTS_ALL = \
|
||||
test31.out \
|
||||
test33.out \
|
||||
test34.out \
|
||||
test35.out \
|
||||
test36.out \
|
||||
test37.out \
|
||||
test38.out \
|
||||
@@ -172,6 +171,7 @@ NEW_TESTS = test_arglist.res \
|
||||
test_hardcopy.res \
|
||||
test_history.res \
|
||||
test_increment.res \
|
||||
test_increment_dbcs.res \
|
||||
test_json.res \
|
||||
test_langmap.res \
|
||||
test_man.res \
|
||||
|
||||
@@ -10,7 +10,7 @@ Scripts = test1.out test2.out test3.out test4.out test5.out test6.out
|
||||
test18.out test19.out test20.out test21.out test22.out
|
||||
test23.out test24.out test25.out test26.out test27.out
|
||||
test28.out test29.out test30.out test31.out test32.out
|
||||
test33.out test34.out test35.out test36.out test37.out
|
||||
test33.out test34.out test36.out test37.out
|
||||
test38.out test39.out test40.out test41.out test42.out
|
||||
test43.out test44.out test45.out test46.out test47.out
|
||||
test48.out test49.out test74.out
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,21 +0,0 @@
|
||||
Test Ctrl-A and Ctrl-X, which increment and decrement decimal, hexadecimal,
|
||||
and octal numbers.
|
||||
|
||||
STARTTEST
|
||||
/^start-here
|
||||
:set nrformats=octal,hex
|
||||
j102ll64128$
|
||||
:set nrformats=octal
|
||||
0102l2w65129blx6lD
|
||||
:set nrformats=hex
|
||||
0101l257Txldt
|
||||
:set nrformats=
|
||||
0200l100w78k
|
||||
:$-3,$wq! test.out
|
||||
ENDTEST
|
||||
|
||||
start-here
|
||||
100 0x100 077 0
|
||||
100 0x100 077
|
||||
100 0x100 077 0xfF 0xFf
|
||||
100 0x100 077
|
||||
@@ -1,4 +0,0 @@
|
||||
0 0x0ff 0000 -1
|
||||
0 1x100 0777777
|
||||
-1 0x0 078 0xFE 0xfe
|
||||
-100 -100x100 000
|
||||
@@ -21,6 +21,7 @@ source test_matchstrpos.vim
|
||||
source test_menu.vim
|
||||
source test_messages.vim
|
||||
source test_partial.vim
|
||||
source test_popup.vim
|
||||
source test_reltime.vim
|
||||
source test_searchpos.vim
|
||||
source test_set.vim
|
||||
|
||||
@@ -735,5 +735,26 @@ func Test_normal_increment_02()
|
||||
call assert_equal([0, 2, 4, 0], getpos('.'))
|
||||
endfunc
|
||||
|
||||
" The test35 unified to this file.
|
||||
func Test_normal_increment_03()
|
||||
call setline(1, ["100 0x100 077 0",
|
||||
\ "100 0x100 077 ",
|
||||
\ "100 0x100 077 0xfF 0xFf",
|
||||
\ "100 0x100 077 "])
|
||||
set nrformats=octal,hex
|
||||
exec "norm! gg\<C-A>102\<C-X>\<C-A>l\<C-X>l\<C-A>64\<C-A>128\<C-X>$\<C-X>"
|
||||
set nrformats=octal
|
||||
exec "norm! j0\<C-A>102\<C-X>\<C-A>l\<C-X>2\<C-A>w65\<C-A>129\<C-X>blx6lD"
|
||||
set nrformats=hex
|
||||
exec "norm! j0101\<C-X>l257\<C-X>\<C-A>Txldt \<C-A> \<C-X> \<C-X>"
|
||||
set nrformats=
|
||||
exec "norm! j0200\<C-X>l100\<C-X>w78\<C-X>\<C-A>k"
|
||||
call assert_equal(["0 0x0ff 0000 -1",
|
||||
\ "0 1x100 0777777",
|
||||
\ "-1 0x0 078 0xFE 0xfe",
|
||||
\ "-100 -100x100 000 "], getline(1, '$'))
|
||||
call assert_equal([0, 3, 25, 0], getpos('.'))
|
||||
endfunc
|
||||
|
||||
|
||||
" vim: tabstop=2 shiftwidth=2 expandtab
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
" Tests for using Ctrl-A/Ctrl-X using DBCS.
|
||||
if !has('multi_byte')
|
||||
finish
|
||||
endif
|
||||
set encoding=cp932
|
||||
scriptencoding cp932
|
||||
|
||||
func SetUp()
|
||||
new
|
||||
set nrformats&
|
||||
endfunc
|
||||
|
||||
func TearDown()
|
||||
bwipe!
|
||||
endfunc
|
||||
|
||||
func Test_increment_dbcs_1()
|
||||
set nrformats+=alpha
|
||||
call setline(1, ["ŽR1"])
|
||||
exec "norm! 0\<C-A>"
|
||||
call assert_equal(["ŽR2"], getline(1, '$'))
|
||||
call assert_equal([0, 1, 3, 0], getpos('.'))
|
||||
|
||||
call setline(1, ["‚`‚a‚b0xDE‚e"])
|
||||
exec "norm! 0\<C-X>"
|
||||
call assert_equal(["‚`‚a‚b0xDD‚e"], getline(1, '$'))
|
||||
call assert_equal([0, 1, 10, 0], getpos('.'))
|
||||
endfunc
|
||||
|
||||
" vim: shiftwidth=2 expandtab
|
||||
@@ -0,0 +1,35 @@
|
||||
" Test for completion menu
|
||||
|
||||
inoremap <F5> <C-R>=ListMonths()<CR>
|
||||
let g:months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
|
||||
let g:setting = ''
|
||||
|
||||
func ListMonths()
|
||||
if g:setting != ''
|
||||
exe ":set" g:setting
|
||||
endif
|
||||
call complete(col('.'), g:months)
|
||||
return ''
|
||||
endfunc
|
||||
|
||||
func! Test_popup_completion_insertmode()
|
||||
new
|
||||
call feedkeys("a\<f5>\<down>\<enter>\<esc>", 'tx')
|
||||
call assert_equal('February', getline(1))
|
||||
%d
|
||||
let g:setting = 'noinsertmode'
|
||||
call feedkeys("a\<f5>\<down>\<enter>\<esc>", 'tx')
|
||||
call assert_equal('February', getline(1))
|
||||
call assert_false(pumvisible())
|
||||
%d
|
||||
let g:setting = ''
|
||||
call feedkeys("a\<f5>". repeat("\<c-n>",12)."\<enter>\<esc>", 'tx')
|
||||
call assert_equal('', getline(1))
|
||||
%d
|
||||
call feedkeys("a\<f5>\<c-p>\<enter>\<esc>", 'tx')
|
||||
call assert_equal('', getline(1))
|
||||
%d
|
||||
call feedkeys("a\<f5>\<c-p>\<c-p>\<enter>\<esc>", 'tx')
|
||||
call assert_equal('December', getline(1))
|
||||
bwipe!
|
||||
endfunc
|
||||
@@ -25,6 +25,9 @@ function! s:setup_commands(cchar)
|
||||
command! -nargs=* -bang Xnext <mods>cnext<bang> <args>
|
||||
command! -nargs=* Xexpr <mods>cexpr <args>
|
||||
command! -nargs=* Xvimgrep <mods>vimgrep <args>
|
||||
command! -nargs=* Xgrep <mods> grep <args>
|
||||
command! -nargs=* Xgrepadd <mods> grepadd <args>
|
||||
command! -nargs=* Xhelpgrep helpgrep <args>
|
||||
let g:Xgetlist = function('getqflist')
|
||||
let g:Xsetlist = function('setqflist')
|
||||
else
|
||||
@@ -45,6 +48,9 @@ function! s:setup_commands(cchar)
|
||||
command! -nargs=* -bang Xnext <mods>lnext<bang> <args>
|
||||
command! -nargs=* Xexpr <mods>lexpr <args>
|
||||
command! -nargs=* Xvimgrep <mods>lvimgrep <args>
|
||||
command! -nargs=* Xgrep <mods> lgrep <args>
|
||||
command! -nargs=* Xgrepadd <mods> lgrepadd <args>
|
||||
command! -nargs=* Xhelpgrep lhelpgrep <args>
|
||||
let g:Xgetlist = function('getloclist', [0])
|
||||
let g:Xsetlist = function('setloclist', [0])
|
||||
endif
|
||||
@@ -228,6 +234,9 @@ function XfileTests(cchar)
|
||||
\ l[0].lnum == 700 && l[0].col == 10 && l[0].text ==# 'Line 700' &&
|
||||
\ l[1].lnum == 800 && l[1].col == 15 && l[1].text ==# 'Line 800')
|
||||
|
||||
" Test with a non existent file
|
||||
call assert_fails('Xfile non_existent_file', 'E40')
|
||||
|
||||
" Run cfile/lfile from a modified buffer
|
||||
enew!
|
||||
silent! put ='Quickfix'
|
||||
@@ -317,11 +326,23 @@ function Test_nomem()
|
||||
|
||||
endfunc
|
||||
|
||||
function Test_helpgrep()
|
||||
helpgrep quickfix
|
||||
copen
|
||||
function! s:test_xhelpgrep(cchar)
|
||||
call s:setup_commands(a:cchar)
|
||||
Xhelpgrep quickfix
|
||||
Xopen
|
||||
if a:cchar == 'c'
|
||||
let title_text = ':helpgrep quickfix'
|
||||
else
|
||||
let title_text = ':lhelpgrep quickfix'
|
||||
endif
|
||||
call assert_true(w:quickfix_title =~ title_text, w:quickfix_title)
|
||||
" This wipes out the buffer, make sure that doesn't cause trouble.
|
||||
cclose
|
||||
Xclose
|
||||
endfunction
|
||||
|
||||
function Test_helpgrep()
|
||||
call s:test_xhelpgrep('c')
|
||||
call s:test_xhelpgrep('l')
|
||||
endfunc
|
||||
|
||||
func Test_errortitle()
|
||||
@@ -727,6 +748,47 @@ function! Test_efm_dirstack()
|
||||
call delete('habits1.txt')
|
||||
endfunction
|
||||
|
||||
" TODO:
|
||||
" Add tests for the following formats in 'errorformat'
|
||||
" %n %t %r %+ %- %O
|
||||
function! Test_efm2()
|
||||
let save_efm = &efm
|
||||
|
||||
" Test for invalid efm
|
||||
set efm=%L%M%N
|
||||
call assert_fails('cexpr "abc.txt:1:Hello world"', 'E376:')
|
||||
call assert_fails('lexpr "abc.txt:1:Hello world"', 'E376:')
|
||||
|
||||
" Test for %s format in efm
|
||||
set efm=%f:%s
|
||||
cexpr 'Xtestfile:Line search text'
|
||||
|
||||
let l = getqflist()
|
||||
call assert_equal(l[0].pattern, '^\VLine search text\$')
|
||||
call assert_equal(l[0].lnum, 0)
|
||||
|
||||
let lines=["[Xtestfile1]",
|
||||
\ "(1,17) error: ';' missing",
|
||||
\ "(21,2) warning: variable 'z' not defined",
|
||||
\ "(67,3) error: end of file found before string ended",
|
||||
\ "",
|
||||
\ "[Xtestfile2]",
|
||||
\ "",
|
||||
\ "[Xtestfile3]",
|
||||
\ "NEW compiler v1.1",
|
||||
\ "(2,2) warning: variable 'x' not defined",
|
||||
\ "(67,3) warning: 's' already defined"
|
||||
\]
|
||||
set efm=%+P[%f],(%l\\,%c)%*[\ ]%t%*[^:]:\ %m,%-Q
|
||||
cgetexpr lines
|
||||
let l = getqflist()
|
||||
call assert_equal(9, len(l))
|
||||
call assert_equal(21, l[2].lnum)
|
||||
call assert_equal(2, l[2].col)
|
||||
|
||||
let &efm = save_efm
|
||||
endfunction
|
||||
|
||||
function XquickfixChangedByAutocmd(cchar)
|
||||
call s:setup_commands(a:cchar)
|
||||
if a:cchar == 'c'
|
||||
@@ -972,16 +1034,19 @@ endfunction
|
||||
function XLongLinesTests(cchar)
|
||||
let l = g:Xgetlist()
|
||||
|
||||
call assert_equal(3, len(l))
|
||||
call assert_equal(4, len(l))
|
||||
call assert_equal(1, l[0].lnum)
|
||||
call assert_equal(1, l[0].col)
|
||||
call assert_equal(4070, len(l[0].text))
|
||||
call assert_equal(1975, len(l[0].text))
|
||||
call assert_equal(2, l[1].lnum)
|
||||
call assert_equal(1, l[1].col)
|
||||
call assert_equal(4070, len(l[1].text))
|
||||
call assert_equal(3, l[2].lnum)
|
||||
call assert_equal(1, l[2].col)
|
||||
call assert_equal(10, len(l[2].text))
|
||||
call assert_equal(4070, len(l[2].text))
|
||||
call assert_equal(4, l[3].lnum)
|
||||
call assert_equal(1, l[3].col)
|
||||
call assert_equal(10, len(l[3].text))
|
||||
|
||||
call g:Xsetlist([], 'r')
|
||||
endfunction
|
||||
@@ -1013,3 +1078,163 @@ function Test_long_lines()
|
||||
call s:long_lines_tests('c')
|
||||
call s:long_lines_tests('l')
|
||||
endfunction
|
||||
|
||||
function! s:create_test_file(filename)
|
||||
let l = []
|
||||
for i in range(1, 20)
|
||||
call add(l, 'Line' . i)
|
||||
endfor
|
||||
call writefile(l, a:filename)
|
||||
endfunction
|
||||
|
||||
function! Test_switchbuf()
|
||||
call s:create_test_file('Xqftestfile1')
|
||||
call s:create_test_file('Xqftestfile2')
|
||||
call s:create_test_file('Xqftestfile3')
|
||||
|
||||
new | only
|
||||
edit Xqftestfile1
|
||||
let file1_winid = win_getid()
|
||||
new Xqftestfile2
|
||||
let file2_winid = win_getid()
|
||||
cgetexpr ['Xqftestfile1:5:Line5',
|
||||
\ 'Xqftestfile1:6:Line6',
|
||||
\ 'Xqftestfile2:10:Line10',
|
||||
\ 'Xqftestfile2:11:Line11',
|
||||
\ 'Xqftestfile3:15:Line15',
|
||||
\ 'Xqftestfile3:16:Line16']
|
||||
|
||||
new
|
||||
let winid = win_getid()
|
||||
cfirst | cnext
|
||||
call assert_equal(winid, win_getid())
|
||||
cnext | cnext
|
||||
call assert_equal(winid, win_getid())
|
||||
cnext | cnext
|
||||
call assert_equal(winid, win_getid())
|
||||
enew
|
||||
|
||||
set switchbuf=useopen
|
||||
cfirst | cnext
|
||||
call assert_equal(file1_winid, win_getid())
|
||||
cnext | cnext
|
||||
call assert_equal(file2_winid, win_getid())
|
||||
cnext | cnext
|
||||
call assert_equal(file2_winid, win_getid())
|
||||
|
||||
enew | only
|
||||
set switchbuf=usetab
|
||||
tabedit Xqftestfile1
|
||||
tabedit Xqftestfile2
|
||||
tabfirst
|
||||
cfirst | cnext
|
||||
call assert_equal(2, tabpagenr())
|
||||
cnext | cnext
|
||||
call assert_equal(3, tabpagenr())
|
||||
cnext | cnext
|
||||
call assert_equal(3, tabpagenr())
|
||||
tabfirst | tabonly | enew
|
||||
|
||||
set switchbuf=split
|
||||
cfirst | cnext
|
||||
call assert_equal(1, winnr('$'))
|
||||
cnext | cnext
|
||||
call assert_equal(2, winnr('$'))
|
||||
cnext | cnext
|
||||
call assert_equal(3, winnr('$'))
|
||||
enew | only
|
||||
|
||||
set switchbuf=newtab
|
||||
cfirst | cnext
|
||||
call assert_equal(1, tabpagenr('$'))
|
||||
cnext | cnext
|
||||
call assert_equal(2, tabpagenr('$'))
|
||||
cnext | cnext
|
||||
call assert_equal(3, tabpagenr('$'))
|
||||
tabfirst | enew | tabonly | only
|
||||
|
||||
set switchbuf=
|
||||
edit Xqftestfile1
|
||||
let file1_winid = win_getid()
|
||||
new Xqftestfile2
|
||||
let file2_winid = win_getid()
|
||||
copen
|
||||
exe "normal 1G\<CR>"
|
||||
call assert_equal(file1_winid, win_getid())
|
||||
copen
|
||||
exe "normal 3G\<CR>"
|
||||
call assert_equal(file2_winid, win_getid())
|
||||
copen | only
|
||||
exe "normal 5G\<CR>"
|
||||
call assert_equal(2, winnr('$'))
|
||||
call assert_equal(1, bufwinnr('Xqftestfile3'))
|
||||
|
||||
enew | only
|
||||
|
||||
call delete('Xqftestfile1')
|
||||
call delete('Xqftestfile2')
|
||||
call delete('Xqftestfile3')
|
||||
endfunction
|
||||
|
||||
function! Xadjust_qflnum(cchar)
|
||||
call s:setup_commands(a:cchar)
|
||||
|
||||
enew | only
|
||||
|
||||
call s:create_test_file('Xqftestfile')
|
||||
edit Xqftestfile
|
||||
|
||||
Xgetexpr ['Xqftestfile:5:Line5',
|
||||
\ 'Xqftestfile:10:Line10',
|
||||
\ 'Xqftestfile:15:Line15',
|
||||
\ 'Xqftestfile:20:Line20']
|
||||
|
||||
6,14delete
|
||||
call append(6, ['Buffer', 'Window'])
|
||||
|
||||
let l = g:Xgetlist()
|
||||
|
||||
call assert_equal(5, l[0].lnum)
|
||||
call assert_equal(6, l[2].lnum)
|
||||
call assert_equal(13, l[3].lnum)
|
||||
|
||||
enew!
|
||||
call delete('Xqftestfile')
|
||||
endfunction
|
||||
|
||||
function! Test_adjust_lnum()
|
||||
call Xadjust_qflnum('c')
|
||||
call Xadjust_qflnum('l')
|
||||
endfunction
|
||||
|
||||
" Tests for the :grep/:lgrep and :grepadd/:lgrepadd commands
|
||||
function! s:test_xgrep(cchar)
|
||||
call s:setup_commands(a:cchar)
|
||||
|
||||
" The following lines are used for the grep test. Don't remove.
|
||||
" Grep_Test_Text: Match 1
|
||||
" Grep_Test_Text: Match 2
|
||||
" GrepAdd_Test_Text: Match 1
|
||||
" GrepAdd_Test_Text: Match 2
|
||||
enew! | only
|
||||
set makeef&vim
|
||||
silent Xgrep Grep_Test_Text: test_quickfix.vim
|
||||
call assert_true(len(g:Xgetlist()) == 3)
|
||||
Xopen
|
||||
call assert_true(w:quickfix_title =~ '^:grep')
|
||||
Xclose
|
||||
enew
|
||||
set makeef=Temp_File_##
|
||||
silent Xgrepadd GrepAdd_Test_Text: test_quickfix.vim
|
||||
call assert_true(len(g:Xgetlist()) == 6)
|
||||
endfunction
|
||||
|
||||
function! Test_grep()
|
||||
if !has('unix')
|
||||
" The grepprg may not be set on non-Unix systems
|
||||
return
|
||||
endif
|
||||
|
||||
call s:test_xgrep('c')
|
||||
call s:test_xgrep('l')
|
||||
endfunction
|
||||
|
||||
@@ -34,4 +34,37 @@ func Test_window_cmd_cmdwin_with_vsp()
|
||||
set ls&vim
|
||||
endfunc
|
||||
|
||||
function Test_window_cmd_wincmd_gf()
|
||||
let fname = 'test_gf.txt'
|
||||
let swp_fname = '.' . fname . '.swp'
|
||||
call writefile([], fname)
|
||||
call writefile([], swp_fname)
|
||||
function s:swap_exists()
|
||||
let v:swapchoice = s:swap_choice
|
||||
endfunc
|
||||
augroup test_window_cmd_wincmd_gf
|
||||
autocmd!
|
||||
exec "autocmd SwapExists " . fname . " call s:swap_exists()"
|
||||
augroup END
|
||||
|
||||
call setline(1, fname)
|
||||
" (E)dit anyway
|
||||
let s:swap_choice = 'e'
|
||||
wincmd gf
|
||||
call assert_equal(2, tabpagenr())
|
||||
call assert_equal(fname, bufname("%"))
|
||||
quit!
|
||||
|
||||
" (Q)uit
|
||||
let s:swap_choice = 'q'
|
||||
wincmd gf
|
||||
call assert_equal(1, tabpagenr())
|
||||
call assert_notequal(fname, bufname("%"))
|
||||
new | only!
|
||||
|
||||
call delete(fname)
|
||||
call delete(swp_fname)
|
||||
augroup! test_window_cmd_wincmd_gf
|
||||
endfunc
|
||||
|
||||
" vim: sw=2 et
|
||||
|
||||
@@ -768,6 +768,28 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1963,
|
||||
/**/
|
||||
1962,
|
||||
/**/
|
||||
1961,
|
||||
/**/
|
||||
1960,
|
||||
/**/
|
||||
1959,
|
||||
/**/
|
||||
1958,
|
||||
/**/
|
||||
1957,
|
||||
/**/
|
||||
1956,
|
||||
/**/
|
||||
1955,
|
||||
/**/
|
||||
1954,
|
||||
/**/
|
||||
1953,
|
||||
/**/
|
||||
1952,
|
||||
/**/
|
||||
|
||||
@@ -1764,6 +1764,17 @@ typedef struct timeval proftime_T;
|
||||
typedef int proftime_T; /* dummy for function prototypes */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* When compiling with 32 bit Perl time_t is 32 bits in the Perl code but 64
|
||||
* bits elsewhere. That causes memory corruption. Define time_T and use it
|
||||
* for global variables to avoid that.
|
||||
*/
|
||||
#ifdef WIN3264
|
||||
typedef __time64_t time_T;
|
||||
#else
|
||||
typedef time_t time_T;
|
||||
#endif
|
||||
|
||||
#ifdef _WIN64
|
||||
typedef __int64 sock_T;
|
||||
#else
|
||||
|
||||
+11
-3
@@ -475,6 +475,8 @@ wingotofile:
|
||||
ptr = grab_file_name(Prenum1, &lnum);
|
||||
if (ptr != NULL)
|
||||
{
|
||||
tabpage_T *oldtab = curtab;
|
||||
win_T *oldwin = curwin;
|
||||
# ifdef FEAT_GUI
|
||||
need_mouse_correct = TRUE;
|
||||
# endif
|
||||
@@ -482,9 +484,15 @@ wingotofile:
|
||||
if (win_split(0, 0) == OK)
|
||||
{
|
||||
RESET_BINDING(curwin);
|
||||
(void)do_ecmd(0, ptr, NULL, NULL, ECMD_LASTL,
|
||||
ECMD_HIDE, NULL);
|
||||
if (nchar == 'F' && lnum >= 0)
|
||||
if (do_ecmd(0, ptr, NULL, NULL, ECMD_LASTL,
|
||||
ECMD_HIDE, NULL) == FAIL)
|
||||
{
|
||||
/* Failed to open the file, close the window
|
||||
* opened for it. */
|
||||
win_close(curwin, FALSE);
|
||||
goto_tabpage_win(oldtab, oldwin);
|
||||
}
|
||||
else if (nchar == 'F' && lnum >= 0)
|
||||
{
|
||||
curwin->w_cursor.lnum = lnum;
|
||||
check_cursor_lnum();
|
||||
|
||||
Reference in New Issue
Block a user