Compare commits

...

26 Commits

Author SHA1 Message Date
Kazuki Sakamoto 6127f5c9eb MacVim Snapshot 120
Binary targets macOS 10.8+

- Vim patch 8.0.0142

Script interfaces have compatibility with these versions

- Lua 5.2
- Perl 5.16
- Python2 2.7
- Python3 3.6
- Ruby 2.0
2017-01-03 19:42:52 -08:00
Kazuki Sakamoto 921d522f70 Python 3.6 2017-01-02 18:16:50 -08:00
Kazuki Sakamoto a1a2788ffa Merge remote-tracking branch 'vim/master' 2017-01-02 18:16:44 -08:00
Bram Moolenaar 0cdb72aa38 patch 8.0.0142
Problem:    Normal colors are wrong with 'termguicolors'.
Solution:   Initialize to INVALCOLOR instead of zero. (Ben Jackson, closes
            #1344)
2017-01-02 21:37:40 +01:00
Bram Moolenaar bc2eada542 Updated runtime files. 2017-01-02 21:27:47 +01:00
Kazuki Sakamoto c6e15ba8e7 Merge remote-tracking branch 'vim/master' 2017-01-02 12:01:03 -08:00
Bram Moolenaar 269aec7e61 patch 8.0.0141
Problem:    Nested function test fails on AppVeyor.
Solution:   Disable the test on Windows for now.
2017-01-02 18:32:39 +01:00
Bram Moolenaar f8eb9c51e5 patch 8.0.0140
Problem:    Pasting inserted text in Visual mode does not work properly.
            (Matthew Malcomson)
Solution:   Stop Visual mode before stuffing the inserted text. (Christian
            Brabandt, from neovim #5709)
2017-01-02 17:31:24 +01:00
Bram Moolenaar 5e1e6d265d patch 8.0.0139
Problem:    Warning for unused argument.
Solution:   Add UNUSED.
2017-01-02 17:26:00 +01:00
Bram Moolenaar b094ff4b2b patch 8.0.0138
Problem:    Small build fails.
Solution:   Add #ifdef.
2017-01-02 16:16:39 +01:00
Bram Moolenaar 777b30f827 patch 8.0.0137
Problem:    When 'maxfuncdepth' is set above 200 the nesting is limited to
            200. (Brett Stahlman)
Solution:   Allow for Ex command recursion depending on 'maxfuncdepth'.
2017-01-02 15:26:27 +01:00
Bram Moolenaar 54b2bfa399 patch 8.0.0136
Problem:    When using indent folding and changing indent the wrong fold is
            opened. (Jonathan Fudger)
Solution:   Open the fold under the cursor a bit later. (Christian Brabandt)
2017-01-02 14:57:08 +01:00
Bram Moolenaar ded2782783 patch 8.0.0135
Problem:    An address relative to the current line, ":.,+3y", does not work
            properly on a closed fold. (Efraim Yawitz)
Solution:   Correct for including the closed fold. (Christian Brabandt)
2017-01-02 14:27:34 +01:00
Kazuki Sakamoto 4bf9153e6d Merge remote-tracking branch 'vim/master' 2016-12-15 01:41:13 -08:00
Bram Moolenaar c4bfedabe0 patch 8.0.0134
Problem:    Null pointer access reported by UBsan.
Solution:   Check curwin->w_buffer is not NULL. (Yegappan Lakshmanan)
2016-12-14 21:42:00 +01:00
Kazuki Sakamoto 7c0d06c170 Merge remote-tracking branch 'vim/master' 2016-12-11 20:33:11 -08:00
Bram Moolenaar fe38b494ff patch 8.0.0133
Problem:    "2;'(" causes ml_get errors in an empty buffer.  (Dominique Pelle)
Solution:   Check the cursor line earlier.
2016-12-11 21:34:23 +01:00
Bram Moolenaar 4c8980b717 patch 8.0.0132
Problem:    Test fails because of using :finish.
Solution:   Change to return.
2016-12-11 15:24:48 +01:00
Bram Moolenaar 73b484c4da patch 8.0.0131
Problem:    Not enough test coverage for syntax commands.
Solution:   Add more tests. (Dominique Pelle)
2016-12-11 15:11:17 +01:00
Kazuki Sakamoto f5464c4b19 Merge remote-tracking branch 'vim/master' 2016-12-09 22:19:55 -08:00
Bram Moolenaar 63de19e805 patch 8.0.0130
Problem:    Configure uses "ushort" while the Vim code doesn't.
Solution:   Use "unsigned short" instead. (Fredrik Fornwall, closes #1314)
2016-12-09 20:11:26 +01:00
Bram Moolenaar 0df3c7f2a0 patch 8.0.0129
Problem:    Parallel make still doesn't work. (Lewis Muir)
Solution:   Define OBJ_MAIN.
2016-12-09 19:57:14 +01:00
Bram Moolenaar 7089237885 patch 8.0.0128
Problem:    Display test fails on MS-Windows.
Solution:   Set 'isprint' to "@".
2016-12-09 19:51:49 +01:00
Bram Moolenaar 73fd498886 patch 8.0.0127
Problem:    Cancelling completion still inserts text when formatting is done
            for 'textwidth'. (lacygoill)
Solution:   Don't format when CTRL-E was typed. (Hirohito Higashi,
            closes #1312)
2016-12-09 19:36:56 +01:00
Bram Moolenaar 6270660611 patch 8.0.0126
Problem:    Display problem with 'foldcolumn' and a wide character.
            (esiegerman)
Solution:   Don't use "extra" but an allocated buffer. (Christian Brabandt,
            closes #1310)
2016-12-09 19:28:48 +01:00
Bram Moolenaar eaaa9bbda6 patch 8.0.0125
Problem:    Not enough testing for entering Ex commands.
Solution:   Add test for CTRL-\ e {expr}. (Dominique Pelle)
2016-12-09 18:42:20 +01:00
37 changed files with 563 additions and 105 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ env:
vi_cv_path_plain_lua=/usr/local/bin/lua
vi_cv_dll_name_perl=/System/Library/Perl/5.16/darwin-thread-multi-2level/CORE/libperl.dylib
vi_cv_dll_name_python=/System/Library/Frameworks/Python.framework/Versions/2.7/Python
vi_cv_dll_name_python3=/usr/local/Frameworks/Python.framework/Versions/3.5/Python
vi_cv_dll_name_python3=/usr/local/Frameworks/Python.framework/Versions/3.6/Python
VIMCMD=src/MacVim/build/Release/MacVim.app/Contents/MacOS/Vim
"CONFOPT='--with-features=huge --enable-multibyte --enable-netbeans --with-tlib=ncurses --enable-cscope --enable-perlinterp=dynamic --enable-pythoninterp=dynamic --enable-python3interp=dynamic --enable-rubyinterp=dynamic --enable-luainterp=dynamic --with-lua-prefix=/usr/local --enable-gui=macvim'"
+3 -3
View File
@@ -1,4 +1,4 @@
*channel.txt* For Vim version 8.0. Last change: 2016 Dec 01
*channel.txt* For Vim version 8.0. Last change: 2016 Dec 02
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -605,11 +605,11 @@ See |job_setoptions()| and |ch_setoptions()|.
*job-close_cb*
"close_cb": handler Callback for when the channel is closed. Same as
"close_cb" on |ch_open()|, see |close_cb|.
*job-exit_cb*
*job-drop*
"drop" Specifies when to drop messages. Same as "drop" on
|ch_open()|, see |channel-drop|. For "auto" the
exit_cb is not considered.
*job-exit_cb*
"exit_cb": handler Callback for when the job ends. The arguments are the
job and the exit status.
Vim checks up to 10 times per second for jobs that
+3 -3
View File
@@ -1060,10 +1060,10 @@ There are several ways to leave the command-line window:
Insert and in Normal mode.
CTRL-C Continue in Command-line mode. The command-line under the
cursor is used as the command-line. Works both in Insert and
in Normal mode. ":close" also works. There is no redraw,
thus the window will remain visible.
in Normal mode. There is no redraw, thus the window will
remain visible.
:quit Discard the command line and go back to Normal mode.
":exit", ":xit" and CTRL-\ CTRL-N also work.
":close", ":exit", ":xit" and CTRL-\ CTRL-N also work.
:qall Quit Vim, unless there are changes in some buffer.
:qall! Quit Vim, discarding changes to any buffer.
+4 -3
View File
@@ -1,4 +1,4 @@
*message.txt* For Vim version 8.0. Last change: 2016 Sep 01
*message.txt* For Vim version 8.0. Last change: 2017 Jan 02
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -129,8 +129,9 @@ closed properly. Mostly harmless.
Command too recursive
This happens when an Ex command executes an Ex command that executes an Ex
command, etc. This is only allowed 200 times. When it's more there probably
is an endless loop. Probably a |:execute| or |:source| command is involved.
command, etc. The limit is 200 or the value of 'maxfuncdepth', whatever is
larger. When it's more there probably is an endless loop. Probably a
|:execute| or |:source| command is involved.
*E254* >
Cannot allocate color {name}
+3 -1
View File
@@ -1,4 +1,4 @@
*options.txt* For Vim version 8.0. Last change: 2016 Nov 26
*options.txt* For Vim version 8.0. Last change: 2017 Jan 02
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -5173,6 +5173,8 @@ A jump table for the options with a short description can be found at |Q_op|.
catches endless recursion. When using a recursive function with
more depth, set 'maxfuncdepth' to a bigger number. But this will use
more memory, there is the danger of failing when memory is exhausted.
Increasing this limit above 200 also changes the maximum for Ex
command resursion, see |E169|.
See also |:function|.
*'maxmapdepth'* *'mmd'* *E223*
+1 -1
View File
@@ -1,4 +1,4 @@
*logiPat.txt* Logical Patterns Jun 22, 2015
*pi_logipat.txt* Logical Patterns Jun 22, 2015
Author: Charles E. Campbell <NdrOchip@ScampbellPfamily.AbizM>
Copyright: (c) 2004-2015 by Charles E. Campbell *logiPat-copyright*
+3 -1
View File
@@ -1,4 +1,4 @@
*quickref.txt* For Vim version 8.0. Last change: 2016 Aug 21
*quickref.txt* For Vim version 8.0. Last change: 2016 Dec 16
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1076,6 +1076,8 @@ Short explanation of each option: *option-list*
|c_<Up>| <Up>/<Down> recall older/newer command-line that starts
with current command
|c_<S-Up>| <S-Up>/<S-Down> recall older/newer command-line from history
|c_CTRL-G| CTRL-G next match when 'incsearch' is active
|c_CTRL-T| CTRL-T previous match when 'incsearch' is active
|:history| :his[tory] show older command-lines
Context-sensitive completion on the command-line:
+2 -1
View File
@@ -7025,6 +7025,7 @@ job-callback channel.txt /*job-callback*
job-channel-overview channel.txt /*job-channel-overview*
job-close_cb channel.txt /*job-close_cb*
job-control channel.txt /*job-control*
job-drop channel.txt /*job-drop*
job-err_cb channel.txt /*job-err_cb*
job-err_io channel.txt /*job-err_io*
job-exit_cb channel.txt /*job-exit_cb*
@@ -7160,7 +7161,6 @@ logiPat-man pi_logipat.txt /*logiPat-man*
logiPat-manual pi_logipat.txt /*logiPat-manual*
logiPat-operators pi_logipat.txt /*logiPat-operators*
logiPat-pattern pi_logipat.txt /*logiPat-pattern*
logiPat.txt pi_logipat.txt /*logiPat.txt*
long-lines version5.txt /*long-lines*
love intro.txt /*love*
lowercase change.txt /*lowercase*
@@ -7877,6 +7877,7 @@ php3.vim syntax.txt /*php3.vim*
phtml.vim syntax.txt /*phtml.vim*
pi_getscript.txt pi_getscript.txt /*pi_getscript.txt*
pi_gzip.txt pi_gzip.txt /*pi_gzip.txt*
pi_logipat.txt pi_logipat.txt /*pi_logipat.txt*
pi_netrw.txt pi_netrw.txt /*pi_netrw.txt*
pi_paren.txt pi_paren.txt /*pi_paren.txt*
pi_spec.txt pi_spec.txt /*pi_spec.txt*
+76 -11
View File
@@ -1,4 +1,4 @@
*todo.txt* For Vim version 8.0. Last change: 2016 Dec 01
*todo.txt* For Vim version 8.0. Last change: 2017 Jan 02
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -36,10 +36,14 @@ there will not be repeated below, unless there is extra information.
-------------------- Known bugs and current work -----------------------
+channel:
- Try out background make plugin:
https://github.com/AndrewVos/vim-make-background
- Problem with stderr on Windows? (Vincent Rischmann, 2016 Aug 31, #1026)
- Add 'cwd' argument to start_job(): directory to change to in the child.
check for valid directory before forking.
Part of patch for environment, Yasuhiro Matsumoto, #1160
- When out_cb executes :sleep, the close_cb may be invoked. (Daniel Hahler,
2016 Dec 11, #1320)
- Implement |job-term| ?
- Channel test fails with Motif. Sometimes kills the X11 server.
- When a message in the queue but there is no callback, drop it after a while?
@@ -70,8 +74,8 @@ Regexp problems:
- Issue 164: freeze on regexp search.
- Ignorecase not handled properly for multi-byte characters. (Axel Bender,
2013 Dec 11)
- Using \@> and \?. (Brett Stahlman, 2013 Dec 21) Remark from Marcin Szamotulski
Remark from Brett 2014 Jan 6 and 7.
- Using \@> and \?. (Brett Stahlman, 2013 Dec 21) Remark from Marcin
Szamotulski; Remark from Brett 2014 Jan 6 and 7.
- NFA regexp doesn't handle \%<v correctly. (Ingo Karkat, 2014 May 12)
- Does not work with NFA regexp engine:
\%u, \%x, \%o, \%d followed by a composing character
@@ -105,28 +109,53 @@ Regexp problems:
Make html indent file use javascript indent, now that it's not just cindent.
#1220
Use __sun instead of sun define check. #1296
Patch to fix completion of :filter command. (Ichizok, 2016 Dec 3, #1299)
Patch to use buffer id for system() and systemlist() (LemonBoy, 2016 Nov 7,
#1240)
Concatenation with null string causes an error: 'a'[1:0] .. 'b'
Might as well handle it like an empty string.
When using symbolic links, a package path will not be inserted at the right
position in 'runtimepath'. (Dugan Chen, 2016 Nov 18)
json_encode(): should convert to utf-8. (Nikolai Pavlov, 2016 Jan 23)
What if there is an invalid character?
Putting "k" early in 'complete' does not use dictionary first?
(RubenGZ, 2016 Dec 10, #1316)
patch proposed by Hirohito Higashi, 2016 Dec 11.
Patch to fix NULL pointer when sorting zero elements. (Dominique, 2016 Dec 15)
Patch to test float functions. (Dominique, 2016 Dec 16)
Patch to improve completion of :syntax command. (Dominique, 2016 Dec 12)
Patch to use IEMSG() in more places. (Dominique, 2016 Dec 27)
Patch to avoid ubsan warning for integer overflow. (Dominique, 2016 Dec 26)
Bug: ":earlier 100d" doesn't work after using undo file.
(Pavol Juhas, 2016 Nov 15, #1254)
Fix by Christian, but lacks a test.
Test in testdir/test_undo.vim doesn't catch the problem.
Test by Pavol Juhas, Nov 22.
Patch with test (Pavol Juhas,, 2016 Dec 3, #1300)
Bug: Json with same key should not give internal error. (Lcd, 2016 Oct 26)
Make dict_add give a duplicate key error.
Patch to make str2nr and str2float work with signed values.
(Lemonbody, 2016 Dec 18, #1332)
Should json_encode()/json_decode() restrict recursiveness?
Or avoid recursiveness.
Patch to fix UBSan error. Is this actually needed?
(Yegappan, 2016 Dec 18)
Allow using json with empty key? Dict already has it.
Json string with trailing \u should be an error. (Lcd)
@@ -137,17 +166,55 @@ Patch to deal with changed configure events in GTK 3. (Jan Alexander Steffens,
2016 Oct 23 #1193)
Remarks from nuko8, 2016 Nov 2.
Patch to change order of compiler flags. (Yousong Zhou, 2016 Sep 19, #1100)
Patch to add command line completion for :cexpr commands. (Yegappan
Lakshmanan, 2016 Dec 13)
Patch to avoid warnings for overflow. (Mike Williams, 2016 Dec 16)
Update Dec 19.
Wrong diff highlighting with three files. (2016 Oct 20, #1186)
Also get E749 on exit.
Another example in #1309
Patch to fix vim_iswordp() works differently on chars <256 that are two bytes.
Ozaki Kiichi, 2016 Dec 11.
When deleting a mark or register, leave a tombstone, so that it's also deleted
when writing viminfo (and the delete was the most recent action). #1339
Relevant neovim patch:
https://github.com/neovim/neovim/pull/5717
test case:
https://github.com/neovim/neovim/pull/5717#issuecomment-264845481
Others:
https://github.com/neovim/neovim/issues/5713#issuecomment-265136186
https://github.com/neovim/neovim/pull/5737#issuecomment-266055165
Patch for better explanation of 'compatible' side effects.
https://github.com/vim/vim/pull/1161/files
Patch to adjust marks when adding a new line to the end of buffer in diff
mode. (James McCoy, 2016 Dec 14, #1329)
Suggestion to improve pt-br spell checking. (Marcelo D Montu, 2016 Dec 15,
#1330)
Error in test_startup_utf8 on Solaris. (Danek Duvall, 2016 Aug 17)
Rule to use "^" for statusline does not work if a space is defined with
highlighting for both stl and stlnc. Patch by Ken Hamada (itchyny, 2016 Dec 11)
8 "stl" and "stlnc" in 'fillchars' don't work for multi-byte characters.
Patch by Christian Wellenbrock, 2013 Jul 5.
Screen updated delayed when using CTRL-O u in Insert mode.
(Barlik, #1191) Perhaps because status message?
Patch to add buffer name argument to taglist().
Ordering of tags in result of taglist call. (Duncan McDougall, #1194)
Patch to fix that empty first tab is not in session.
(Hirohito Higashi, 2016 Nov 25, #1282)
@@ -171,7 +238,7 @@ Use ADDR_OTHER instead of ADDR_LINES for many more commands.
Add tests for using number larger than number of lines in buffer.
Patch to make v:shell_error writable. (Christian Brabandt, 2016 Sep 27)
Is there another solution?
Useful to restore it. Is there another solution?
On MS-Windows with 'clipboard' set to "unnamed" this doesn't work to double
lines: :g/^/normal yyp On Unix it works OK. (Bryce Orgill, 2016 Nov 5)
@@ -235,10 +302,11 @@ execute() cannot be used with command completeion. (Daniel Hahler, 2016 Oct 1,
cmap using execute() has side effects. (Killthemule, 2016 Aug 17, #983)
Patch to change order of compiler flags. (Yousong Zhou, 2016 Sep 19, #1100)
Patch to order results from taglist(). (Duncan McDougall, 2016 Oct 25)
patch for 'spellcamelcase' option: spellcheck each CamelCased word.
(Ben Tucker, 2016 Dec 2)
Patch for :pyx, run python commands depending on the supported version.
(Marc Weber, update from Ken Takata, 2016 Sep 19)
@@ -268,7 +336,7 @@ Patch to fix wrong encoding of error message on Cygwin/MSYS terminal.
'hlsearch' interferes with a Conceal match. (Rom Grk, 2016 Aug 9)
Patch to add context information to quickfix/location list. (Yegappan
Lakshmanan, 2016 Aug 25)
Lakshmanan, 2016 Aug 25, #1012)
MS-Windows: use WS_HIDE instead of SW_SHOWMINNOACTIVE in os_win32.c?
Otherwise task flickers in taskbar.
@@ -981,9 +1049,6 @@ Szamotulski, 2012 Nov 8)
Session file creation: 'autochdir' causes trouble. Keep it off until after
loading all files.
8 "stl" and "stlnc" in 'fillchars' don't work for multi-byte characters.
Patch by Christian Wellenbrock, 2013 Jul 5.
MS-Windows resizing problems:
- Windows window on screen positioning: Patch by Yukihiro Nakadaira, 2012 Jun
20. Uses getWindowRect() instead of GetWindowPlacement()
+2 -2
View File
@@ -1,4 +1,4 @@
*usr_22.txt* For Vim version 8.0. Last change: 2012 Nov 15
*usr_22.txt* For Vim version 8.0. Last change: 2016 Dec 13
VIM USER MANUAL - by Bram Moolenaar
@@ -93,7 +93,7 @@ browser. This is what you get: >
o................Browsing with a Horizontal Split...........|netrw-o|
p................Use Preview Window.........................|netrw-p|
P................Edit in Previous Window....................|netrw-p|
q................Listing Bookmarks and History..............|netrw-q|
q................Listing Bookmarks and History..............|netrw-qb|
r................Reversing Sorting Order....................|netrw-r|
< (etc)
+7 -1
View File
@@ -1,4 +1,4 @@
*version8.txt* For Vim version 8.0. Last change: 2016 Nov 06
*version8.txt* For Vim version 8.0. Last change: 2016 Dec 10
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -181,6 +181,12 @@ Insert mode commands: ~
|i_CTRL-G_U| CTRL-G U don't break undo with next cursor movement
Cmdline mode commands: ~
|/_CTRL-G| CTRL-G move to the next match in 'incsearch' mode
|/_CTRL-T| CTRL-T move to the previous match in 'incsearch' mode
Options: ~
'belloff' do not ring the bell for these reasons
+3 -1
View File
@@ -1,5 +1,5 @@
" Maintainer: Benjamin Linskey <vim@benlinskey.com>
" Last Changed: 2016 July 20
" Last Changed: 2016 December 5
" URL: https://github.com/blinskey/vim-armenian-keymaps
let b:keymap_name = "hy"
@@ -98,6 +98,8 @@ f ֆ
7 .
8 «
9 »
* (
( )
\\ '
| ՞
+3 -1
View File
@@ -1,5 +1,5 @@
" Maintainer: Benjamin Linskey <vim@benlinskey.com>
" Last Changed: 2016 July 20
" Last Changed: 2016 December 5
" URL: https://github.com/blinskey/vim-armenian-keymaps
let b:keymap_name = "hy"
@@ -98,6 +98,8 @@ f ֆ
7 .
8 «
9 »
* (
( )
\\ '
| ՞
+13 -5
View File
@@ -1,9 +1,9 @@
" Vim syntax file
" Language: HTML
" Maintainer: Claudio Fleiner <claudio@fleiner.com>
" URL: http://www.fleiner.com/vim/syntax/html.vim
" Last Change: 2015 Jan 07
" included patch from David Felix
" Language: HTML
" Maintainer: Jorge Maldonado Ventura <jorgesumle@freakspot.net>
" Previous Maintainer: Claudio Fleiner <claudio@fleiner.com>
" Last Change: 2016 Dec 29
" included patch from Jorge Maldonado Ventura
" Please check :help html.vim for some comments and a description of the options
@@ -53,6 +53,14 @@ syn keyword htmlTagName contained abbr acronym bdo button col label
syn keyword htmlTagName contained colgroup del fieldset iframe ins legend
syn keyword htmlTagName contained object optgroup q s tbody tfoot thead
" new html 5 tags
syn keyword htmlTagName contained article aside audio bdi canvas datalist
syn keyword htmlTagName contained details embed figcaption figure
syn keyword htmlTagName contained footer header hgroup main mark
syn keyword htmlTagName contained menuitem meter nav output picture
syn keyword htmlTagName contained progress rb rp rt rtc ruby section
syn keyword htmlTagName contained slot source template time track video wbr
" legal arg names
syn keyword htmlArg contained action
syn keyword htmlArg contained align alink alt archive background bgcolor
+20 -20
View File
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: php PHP 3/4/5/7
" Maintainer: Jason Woofenden <jason@jasonwoof.com>
" Last Change: Jul 27, 2016
" Last Change: Dec 11, 2016
" URL: https://jasonwoof.com/gitweb/?p=vim-syntax.git;a=blob;f=php.vim;hb=HEAD
" Former Maintainers: Peter Hodge <toomuchphp-vim@yahoo.com>
" Debian VIM Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
@@ -495,7 +495,7 @@ syntax keyword phpSpecialFunction containedin=ALLBUT,phpComment,phpStringDouble,
" Highlighting for __autoload slightly different from line above
syntax keyword phpSpecialFunction containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle,phpIdentifier,phpMethodsVar
\ __autoload
highlight link phpSpecialFunction phpOperator
hi def link phpSpecialFunction phpOperator
" Highlighting for PHP5's built-in classes
" - built-in classes harvested from get_declared_classes() in 5.1.4
@@ -518,14 +518,14 @@ syntax keyword phpClasses containedin=ALLBUT,phpComment,phpStringDouble,phpStrin
\ DOMCharacterData DOMAttr DOMElement DOMText DOMComment DOMTypeinfo DOMUserDataHandler
\ DOMLocator DOMConfiguration DOMCdataSection DOMDocumentType DOMNotation DOMEntity
\ DOMEntityReference DOMProcessingInstruction DOMStringExtend DOMXPath
highlight link phpClasses phpFunctions
hi def link phpClasses phpFunctions
" Highlighting for PHP5's built-in interfaces
" - built-in classes harvested from get_declared_interfaces() in 5.1.4
syntax keyword phpInterfaces containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle,phpIdentifier,phpMethodsVar
\ Iterator IteratorAggregate RecursiveIterator OuterIterator SeekableIterator
\ Traversable ArrayAccess Serializable Countable SplObserver SplSubject Reflector
highlight link phpInterfaces phpConstant
hi def link phpInterfaces phpConstant
" option defaults:
if ! exists('php_special_functions')
@@ -553,7 +553,7 @@ endif
if php_alt_assignByReference
" special highlighting for '=&' operator
syntax match phpAssignByRef /=\s*&/ containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle
highlight link phpAssignByRef Type
hi def link phpAssignByRef Type
endif
if php_alt_comparisons
@@ -565,7 +565,7 @@ if php_alt_comparisons
syntax case ignore
syntax keyword phpComparison instanceof contained containedin=phpRegion
hi link phpComparison Statement
hi def link phpComparison Statement
endif
" ================================================================
@@ -645,21 +645,21 @@ hi def link phpTodo Todo
hi def link phpDocTodo Todo
hi def link phpMemberSelector Structure
if exists("php_oldStyle")
hi phpIntVar guifg=Red ctermfg=DarkRed
hi phpEnvVar guifg=Red ctermfg=DarkRed
hi phpOperator guifg=SeaGreen ctermfg=DarkGreen
hi phpVarSelector guifg=SeaGreen ctermfg=DarkGreen
hi phpRelation guifg=SeaGreen ctermfg=DarkGreen
hi phpIdentifier guifg=DarkGray ctermfg=Brown
hi phpIdentifierSimply guifg=DarkGray ctermfg=Brown
hi def phpIntVar guifg=Red ctermfg=DarkRed
hi def phpEnvVar guifg=Red ctermfg=DarkRed
hi def phpOperator guifg=SeaGreen ctermfg=DarkGreen
hi def phpVarSelector guifg=SeaGreen ctermfg=DarkGreen
hi def phpRelation guifg=SeaGreen ctermfg=DarkGreen
hi def phpIdentifier guifg=DarkGray ctermfg=Brown
hi def phpIdentifierSimply guifg=DarkGray ctermfg=Brown
else
hi def link phpIntVar Identifier
hi def link phpEnvVar Identifier
hi def link phpOperator Operator
hi def link phpVarSelector Operator
hi def link phpRelation Operator
hi def link phpIdentifier Identifier
hi def link phpIdentifierSimply Identifier
hi def link phpIntVar Identifier
hi def link phpEnvVar Identifier
hi def link phpOperator Operator
hi def link phpVarSelector Operator
hi def link phpRelation Operator
hi def link phpIdentifier Identifier
hi def link phpIdentifierSimply Identifier
endif
+3 -2
View File
@@ -5,8 +5,8 @@
" Contributor: Leonard Ehrenfried <leonard.ehrenfried@web.de>
" Contributor: Karsten Hopp <karsten@redhat.com>
" Contributor: Dean, Adam Kenneth <adam.ken.dean@hpe.com>
" Last Change: 2016 Aug 11
" SSH Version: 7.3p1
" Last Change: 2016 Dec 28
" SSH Version: 7.4p1
"
" Setup
@@ -181,6 +181,7 @@ syn keyword sshconfigKeyword IPQoS
syn keyword sshconfigKeyword IdentitiesOnly
syn keyword sshconfigKeyword IdentityFile
syn keyword sshconfigKeyword IgnoreUnknown
syn keyword sshconfigKeyword Include
syn keyword sshconfigKeyword IPQoS
syn keyword sshconfigKeyword KbdInteractiveAuthentication
syn keyword sshconfigKeyword KbdInteractiveDevices
+3 -2
View File
@@ -6,8 +6,8 @@
" Contributor: Leonard Ehrenfried <leonard.ehrenfried@web.de>
" Contributor: Karsten Hopp <karsten@redhat.com>
" Originally: 2009-07-09
" Last Change: 2016 Mar 1
" SSH Version: 7.2
" Last Change: 2016 Dec 28
" SSH Version: 7.4p1
"
" Setup
@@ -161,6 +161,7 @@ syn keyword sshdconfigKeyword Compression
syn keyword sshdconfigKeyword DebianBanner
syn keyword sshdconfigKeyword DenyGroups
syn keyword sshdconfigKeyword DenyUsers
syn keyword sshdconfigKeyword DisableForwarding
syn keyword sshdconfigKeyword ForceCommand
syn keyword sshdconfigKeyword GSSAPIAuthentication
syn keyword sshdconfigKeyword GSSAPICleanupCredentials
+1 -1
View File
@@ -1255,7 +1255,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>119</string>
<string>120</string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
+13 -3
View File
@@ -1695,12 +1695,14 @@ OBJ_COMMON = \
$(WSDEBUG_OBJ)
# The files included by tests are not in OBJ_COMMON.
OBJ = $(OBJ_COMMON) \
OBJ_MAIN = \
objects/json.o \
objects/main.o \
objects/memfile.o \
objects/message.o
OBJ = $(OBJ_COMMON) $(OBJ_MAIN)
OBJ_JSON_TEST = \
objects/memfile.o \
objects/message.o \
@@ -1722,7 +1724,11 @@ OBJ_MESSAGE_TEST = \
MESSAGE_TEST_OBJ = $(OBJ_COMMON) $(OBJ_MESSAGE_TEST)
ALL_OBJ = $(OBJ_COMMON) $(OBJ_JSON_TEST) $(OBJ_MEMFILE_TEST) $(OBJ_MESSAGE_TEST)
ALL_OBJ = $(OBJ_COMMON) \
$(OBJ_MAIN) \
$(OBJ_JSON_TEST) \
$(OBJ_MEMFILE_TEST) \
$(OBJ_MESSAGE_TEST)
PRO_AUTO = \
@@ -2102,6 +2108,7 @@ test_arglist \
test_delete \
test_diffmode \
test_digraph \
test_display \
test_ex_undo \
test_execute_func \
test_expand \
@@ -2116,6 +2123,7 @@ test_arglist \
test_filter_map \
test_fnameescape \
test_fnamemodify \
test_fold \
test_glob2regpat \
test_gf \
test_gn \
@@ -2879,7 +2887,9 @@ auto/gui_gtk_gresources.h: gui_gtk_res.xml $(GUI_GTK_RES_INPUTS)
# commands understand putting object files in another directory, it must be
# specified for each file separately.
objects objects/.dirstamp:
objects: objects/.dirstamp
objects/.dirstamp:
mkdir -p objects
touch objects/.dirstamp
+3 -3
View File
@@ -7502,7 +7502,7 @@ $as_echo_n "checking whether compiling with process communication is possible...
/* Check bitfields */
struct nbbuf {
unsigned int initDone:1;
ushort signmaplen;
unsigned short signmaplen;
};
int
@@ -12118,8 +12118,8 @@ if test "x$vim_cv_getcwd_broken" = "xyes" ; then
fi
for ac_func in bcmp fchdir fchown fsync getcwd getpseudotty \
getpwent getpwnam getpwuid getrlimit gettimeofday getwd lstat memcmp \
for ac_func in fchdir fchown fsync getcwd getpseudotty \
getpwent getpwnam getpwuid getrlimit gettimeofday getwd lstat \
memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \
setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
sigprocmask sigvec strcasecmp strerror strftime stricmp strncasecmp \
+1 -1
View File
@@ -2053,7 +2053,7 @@ if test "$enable_channel" = "yes"; then
/* Check bitfields */
struct nbbuf {
unsigned int initDone:1;
ushort signmaplen;
unsigned short signmaplen;
};
], [
/* Check creating a socket. */
+1 -1
View File
@@ -3889,7 +3889,7 @@ ins_compl_prep(int c)
if (prev_col > 0)
dec_cursor();
/* only format when something was inserted */
if (!arrow_used && !ins_need_undo)
if (!arrow_used && !ins_need_undo && c != Ctrl_E)
insertchar(NUL, 0, -1);
if (prev_col > 0
&& ml_get_curline()[curwin->w_cursor.col] != NUL)
+2 -1
View File
@@ -3967,7 +3967,8 @@ do_ecmd(
* <VN> We could instead free the synblock
* and re-attach to buffer, perhaps.
*/
if (curwin->w_s == &(curwin->w_buffer->b_s))
if (curwin->w_buffer != NULL
&& curwin->w_s == &(curwin->w_buffer->b_s))
curwin->w_s = &(buf->b_s);
#endif
curwin->w_buffer = buf;
+32 -14
View File
@@ -137,7 +137,7 @@ static int getargopt(exarg_T *eap);
#endif
static int check_more(int, int);
static linenr_T get_address(exarg_T *, char_u **, int addr_type, int skip, int to_other_file);
static linenr_T get_address(exarg_T *, char_u **, int addr_type, int skip, int to_other_file, int address_count);
static void get_flags(exarg_T *eap);
#if !defined(FEAT_PERL) \
|| !defined(FEAT_PYTHON) || !defined(FEAT_PYTHON3) \
@@ -794,8 +794,13 @@ do_cmdline(
#endif
/* It's possible to create an endless loop with ":execute", catch that
* here. The value of 200 allows nested function calls, ":source", etc. */
if (call_depth == 200)
* here. The value of 200 allows nested function calls, ":source", etc.
* Allow 200 or 'maxfuncdepth', whatever is larger. */
if (call_depth >= 200
#ifdef FEAT_EVAL
&& call_depth >= p_mfd
#endif
)
{
EMSG(_("E169: Command too recursive"));
#ifdef FEAT_EVAL
@@ -1798,6 +1803,7 @@ do_one_cmd(
cmdmod_T save_cmdmod;
int ni; /* set when Not Implemented */
char_u *cmd;
int address_count = 1;
vim_memset(&ea, 0, sizeof(ea));
ea.line1 = 1;
@@ -2022,7 +2028,7 @@ do_one_cmd(
{
#ifdef FEAT_WINDOWS
long tabnr = get_address(&ea, &ea.cmd, ADDR_TABS,
ea.skip, FALSE);
ea.skip, FALSE, 1);
if (tabnr == MAXLNUM)
cmdmod.tab = tabpage_index(curtab) + 1;
else
@@ -2182,7 +2188,7 @@ do_one_cmd(
}
ea.cmd = skipwhite(ea.cmd);
lnum = get_address(&ea, &ea.cmd, ea.addr_type, ea.skip,
ea.addr_count == 0);
ea.addr_count == 0, address_count++);
if (ea.cmd == NULL) /* error detected */
goto doend;
if (lnum == MAXLNUM)
@@ -2284,7 +2290,11 @@ do_one_cmd(
if (*ea.cmd == ';')
{
if (!ea.skip)
{
curwin->w_cursor.lnum = ea.line2;
/* don't leave the cursor on an illegal line */
check_cursor_lnum();
}
}
else if (*ea.cmd != ',')
break;
@@ -2300,9 +2310,6 @@ do_one_cmd(
ea.addr_count = 0;
}
/* Don't leave the cursor on an illegal line (caused by ';') */
check_cursor_lnum();
/*
* 5. Parse the command.
*/
@@ -4379,7 +4386,8 @@ get_address(
char_u **ptr,
int addr_type, /* flag: one of ADDR_LINES, ... */
int skip, /* only skip the address, don't use it */
int to_other_file) /* flag: may jump to other file */
int to_other_file, /* flag: may jump to other file */
int address_count UNUSED) /* 1 for first address, >1 after comma */
{
int c;
int i;
@@ -4655,10 +4663,20 @@ get_address(
|| addr_type == ADDR_BUFFERS)
lnum = compute_buffer_local_count(
addr_type, lnum, (i == '-') ? -1 * n : n);
else if (i == '-')
lnum -= n;
else
lnum += n;
{
#ifdef FEAT_FOLDING
/* Relative line addressing, need to adjust for folded lines
* now, but only do it after the first address. */
if (addr_type == ADDR_LINES && (i == '-' || i == '+')
&& address_count >= 2)
(void)hasFolding(lnum, NULL, &lnum);
#endif
if (i == '-')
lnum -= n;
else
lnum += n;
}
}
} while (*cmd == '/' || *cmd == '?');
@@ -7588,7 +7606,7 @@ ex_all(exarg_T *eap)
#endif /* FEAT_WINDOWS */
static void
ex_hide(exarg_T *eap)
ex_hide(exarg_T *eap UNUSED)
{
/* ":hide" or ":hide | cmd": hide current window */
#ifdef FEAT_WINDOWS
@@ -9319,7 +9337,7 @@ ex_copymove(exarg_T *eap)
{
long n;
n = get_address(eap, &eap->arg, eap->addr_type, FALSE, FALSE);
n = get_address(eap, &eap->arg, eap->addr_type, FALSE, FALSE, 1);
if (eap->arg == NULL) /* error detected */
{
eap->nextcmd = NULL;
+8 -5
View File
@@ -259,11 +259,6 @@ op_shift(oparg_T *oap, int curs_top, int amount)
}
changed_lines(oap->start.lnum, 0, oap->end.lnum + 1, 0L);
#ifdef FEAT_FOLDING
/* The cursor line is not in a closed fold */
foldOpenCursor();
#endif
if (oap->block_mode)
{
curwin->w_cursor.lnum = oap->start.lnum;
@@ -277,6 +272,12 @@ op_shift(oparg_T *oap, int curs_top, int amount)
else
--curwin->w_cursor.lnum; /* put cursor on last line, for ":>" */
#ifdef FEAT_FOLDING
/* The cursor line is not in a closed fold */
foldOpenCursor();
#endif
if (oap->line_count > p_report)
{
if (oap->op_type == OP_RSHIFT)
@@ -3350,6 +3351,8 @@ do_put(
*/
if (regname == '.')
{
if (VIsual_active)
stuffcharReadbuff(VIsual_mode);
(void)stuff_inserted((dir == FORWARD ? (count == -1 ? 'o' : 'a') :
(count == -1 ? 'O' : 'i')), count, FALSE);
/* Putting the text is done later, so can't really move the cursor to
+13 -7
View File
@@ -3649,13 +3649,19 @@ win_line(
draw_state = WL_FOLD;
if (fdc > 0)
{
/* Draw the 'foldcolumn'. */
fill_foldcolumn(extra, wp, FALSE, lnum);
n_extra = fdc;
p_extra = extra;
p_extra[n_extra] = NUL;
c_extra = NUL;
char_attr = hl_attr(HLF_FC);
/* Draw the 'foldcolumn'. Allocate a buffer, "extra" may
* already be in used. */
p_extra_free = alloc(12 + 1);
if (p_extra_free != NULL)
{
fill_foldcolumn(p_extra_free, wp, FALSE, lnum);
n_extra = fdc;
p_extra_free[n_extra] = NUL;
p_extra = p_extra_free;
c_extra = NUL;
char_attr = hl_attr(HLF_FC);
}
}
}
#endif
+4
View File
@@ -8766,6 +8766,10 @@ hl_combine_attr(int char_attr, int prim_attr)
else
{
vim_memset(&new_en, 0, sizeof(new_en));
#ifdef FEAT_TERMGUICOLORS
new_en.ae_u.cterm.bg_rgb = INVALCOLOR;
new_en.ae_u.cterm.fg_rgb = INVALCOLOR;
#endif
if (char_attr <= HL_ALL)
new_en.ae_attr = char_attr;
}
+2
View File
@@ -148,8 +148,10 @@ NEW_TESTS = test_arglist.res \
test_cscope.res \
test_diffmode.res \
test_digraph.res \
test_display.res \
test_farsi.res \
test_fnameescape.res \
test_fold.res \
test_gf.res \
test_gn.res \
test_gui.res \
+4 -4
View File
@@ -658,10 +658,10 @@ assert sys.stderr.closed()==False:NOT FAILED
assert sys.stdout.errors=="strict":NOT FAILED
assert sys.stderr.errors=="strict":NOT FAILED
assert sys.stdout.encoding==sys.stderr.encoding:NOT FAILED
sys.stdout.write(None):(<class 'TypeError'>, TypeError("Can't convert 'NoneType' object to str implicitly",))
sys.stdout.write(None):(<class 'TypeError'>, TypeError('argument must be str, bytes or bytearray, not None',))
>> OutputWriteLines
sys.stdout.writelines(None):(<class 'TypeError'>, TypeError("'NoneType' object is not iterable",))
sys.stdout.writelines([1]):(<class 'TypeError'>, TypeError("Can't convert 'int' object to str implicitly",))
sys.stdout.writelines([1]):(<class 'TypeError'>, TypeError('argument must be str, bytes or bytearray, not int',))
>>> Testing *Iter* using sys.stdout.writelines(%s)
sys.stdout.writelines(FailingIter()):(<class 'NotImplementedError'>, NotImplementedError('iter',))
sys.stdout.writelines(FailingIterNext()):(<class 'NotImplementedError'>, NotImplementedError('next',))
@@ -700,8 +700,8 @@ vim.foreach_rtp(NoArgsCall()):(<class 'TypeError'>, TypeError('__call__() takes
vim.foreach_rtp(FailingCall()):(<class 'NotImplementedError'>, NotImplementedError('call',))
vim.foreach_rtp(int, 2):(<class 'TypeError'>, TypeError('foreach_rtp() takes exactly one argument (2 given)',))
> import
import xxx_no_such_module_xxx:(<class 'ImportError'>, ImportError('No module named xxx_no_such_module_xxx',))
import failing_import:(<class 'ImportError'>, ImportError('No module named failing_import',))
import xxx_no_such_module_xxx:(<class 'ModuleNotFoundError'>, ModuleNotFoundError("No module named 'xxx_no_such_module_xxx'",))
import failing_import:(<class 'ModuleNotFoundError'>, ModuleNotFoundError("No module named 'failing_import'",))
import failing:(<class 'NotImplementedError'>, NotImplementedError())
> Options
>> OptionsItem
+24
View File
@@ -215,5 +215,29 @@ func Test_paste_in_cmdline()
call feedkeys("f;:aaa \<C-R>\<C-A> bbb\<C-B>\"\<CR>", 'tx')
call assert_equal('"aaa a;b-c*d bbb', @:)
call feedkeys(":\<C-\>etoupper(getline(1))\<CR>\<C-B>\"\<CR>", 'tx')
call assert_equal('"ASDF.X /TMP/SOME VERYLONGWORD A;B-C*D ', @:)
bwipe!
endfunc
func Test_remove_char_in_cmdline()
call feedkeys(":abc def\<S-Left>\<Del>\<C-B>\"\<CR>", 'tx')
call assert_equal('"abc ef', @:)
call feedkeys(":abc def\<S-Left>\<BS>\<C-B>\"\<CR>", 'tx')
call assert_equal('"abcdef', @:)
call feedkeys(":abc def ghi\<S-Left>\<C-W>\<C-B>\"\<CR>", 'tx')
call assert_equal('"abc ghi', @:)
call feedkeys(":abc def\<S-Left>\<C-U>\<C-B>\"\<CR>", 'tx')
call assert_equal('"def', @:)
endfunc
func Test_illegal_address()
new
2;'(
2;')
quit
endfunc
+39
View File
@@ -0,0 +1,39 @@
" Test for displaying stuff
if !has('gui_running') && has('unix')
set term=ansi
endif
function! s:screenline(lnum, nr) abort
let line = []
for j in range(a:nr)
for c in range(1, winwidth(0))
call add(line, nr2char(screenchar(a:lnum+j, c)))
endfor
call add(line, "\n")
endfor
return join(line, '')
endfunction
function! Test_display_foldcolumn()
new
vnew
vert resize 25
call assert_equal(25, winwidth(winnr()))
set isprint=@
1put='e more noise blah blah‚ more stuff here'
let expect = "e more noise blah blah<82\n> more stuff here \n"
call cursor(2, 1)
norm! zt
redraw!
call assert_equal(expect, s:screenline(1,2))
set fdc=2
redraw!
let expect = " e more noise blah blah<\n 82> more stuff here \n"
call assert_equal(expect, s:screenline(1,2))
quit!
quit!
endfunction
+97
View File
@@ -0,0 +1,97 @@
" Test for folding
function! Test_address_fold()
new
call setline(1, ['int FuncName() {/*{{{*/', 1, 2, 3, 4, 5, '}/*}}}*/',
\ 'after fold 1', 'after fold 2', 'after fold 3'])
setl fen fdm=marker
" The next ccommands should all copy the same part of the buffer,
" regardless of the adressing type, since the part to be copied
" is folded away
:1y
call assert_equal(['int FuncName() {/*{{{*/', '1', '2', '3', '4', '5', '}/*}}}*/'], getreg(0,1,1))
:.y
call assert_equal(['int FuncName() {/*{{{*/', '1', '2', '3', '4', '5', '}/*}}}*/'], getreg(0,1,1))
:.+y
call assert_equal(['int FuncName() {/*{{{*/', '1', '2', '3', '4', '5', '}/*}}}*/'], getreg(0,1,1))
:.,.y
call assert_equal(['int FuncName() {/*{{{*/', '1', '2', '3', '4', '5', '}/*}}}*/'], getreg(0,1,1))
:sil .1,.y
call assert_equal(['int FuncName() {/*{{{*/', '1', '2', '3', '4', '5', '}/*}}}*/'], getreg(0,1,1))
" use silent to make E493 go away
:sil .+,.y
call assert_equal(['int FuncName() {/*{{{*/', '1', '2', '3', '4', '5', '}/*}}}*/'], getreg(0,1,1))
:,y
call assert_equal(['int FuncName() {/*{{{*/', '1', '2', '3', '4', '5', '}/*}}}*/'], getreg(0,1,1))
:,+y
call assert_equal(['int FuncName() {/*{{{*/', '1', '2', '3', '4', '5', '}/*}}}*/','after fold 1'], getreg(0,1,1))
" using .+3 as second address should copy the whole folded line + the next 3
" lines
:.,+3y
call assert_equal(['int FuncName() {/*{{{*/', '1', '2', '3', '4', '5', '}/*}}}*/',
\ 'after fold 1', 'after fold 2', 'after fold 3'], getreg(0,1,1))
:sil .,-2y
call assert_equal(['int FuncName() {/*{{{*/', '1', '2', '3', '4', '5', '}/*}}}*/'], getreg(0,1,1))
" now test again with folding disabled
set nofoldenable
:1y
call assert_equal(['int FuncName() {/*{{{*/'], getreg(0,1,1))
:.y
call assert_equal(['int FuncName() {/*{{{*/'], getreg(0,1,1))
:.+y
call assert_equal(['1'], getreg(0,1,1))
:.,.y
call assert_equal(['int FuncName() {/*{{{*/'], getreg(0,1,1))
" use silent to make E493 go away
:sil .1,.y
call assert_equal(['int FuncName() {/*{{{*/', '1'], getreg(0,1,1))
" use silent to make E493 go away
:sil .+,.y
call assert_equal(['int FuncName() {/*{{{*/', '1'], getreg(0,1,1))
:,y
call assert_equal(['int FuncName() {/*{{{*/'], getreg(0,1,1))
:,+y
call assert_equal(['int FuncName() {/*{{{*/', '1'], getreg(0,1,1))
" using .+3 as second address should copy the whole folded line + the next 3
" lines
:.,+3y
call assert_equal(['int FuncName() {/*{{{*/', '1', '2', '3'], getreg(0,1,1))
:7
:sil .,-2y
call assert_equal(['4', '5', '}/*}}}*/'], getreg(0,1,1))
quit!
endfunction
function! Test_indent_fold()
new
call setline(1, ['', 'a', ' b', ' c'])
setl fen fdm=indent
2
norm! >>
let a=map(range(1,4), 'foldclosed(v:val)')
call assert_equal([-1,-1,-1,-1], a)
endfu
function! Test_indent_fold()
new
call setline(1, ['', 'a', ' b', ' c'])
setl fen fdm=indent
2
norm! >>
let a=map(range(1,4), 'foldclosed(v:val)')
call assert_equal([-1,-1,-1,-1], a)
bw!
endfu
function! Test_indent_fold2()
new
call setline(1, ['', '{{{', '}}}', '{{{', '}}}'])
setl fen fdm=marker
2
norm! >>
let a=map(range(1,5), 'foldclosed(v:val)')
call assert_equal([-1,-1,-1,4,4], a)
bw!
endfu
+25
View File
@@ -40,3 +40,28 @@ func Test_nested_argument()
delfunc g:X
unlet g:Y
endfunc
func Recurse(count)
if a:count > 0
call Recurse(a:count - 1)
endif
endfunc
func Test_max_nesting()
" TODO: why does this fail on Windows? Runs out of stack perhaps?
if has('win32')
return
endif
let call_depth_here = 2
let ex_depth_here = 5
set mfd&
call Recurse(99 - call_depth_here)
call assert_fails('call Recurse(' . (100 - call_depth_here) . ')', 'E132:')
set mfd=210
call Recurse(209 - ex_depth_here)
call assert_fails('call Recurse(' . (210 - ex_depth_here) . ')', 'E169:')
set mfd&
endfunc
+18
View File
@@ -464,4 +464,22 @@ func Test_completefunc_with_scratch_buffer()
set completeopt&
endfunc
" <C-E> - select original typed text before the completion started without
" auto-wrap text.
func Test_completion_ctrl_e_without_autowrap()
new
let tw_save=&tw
set tw=78
let li = [
\ '" zzz',
\ '" zzzyyyyyyyyyyyyyyyyyyy']
call setline(1, li)
0
call feedkeys("A\<C-X>\<C-N>\<C-E>\<Esc>", "tx")
call assert_equal(li, getline(1, '$'))
let &tw=tw_save
q!
endfunc
" vim: shiftwidth=2 sts=2 expandtab
+77 -1
View File
@@ -54,7 +54,7 @@ func Test_syn_iskeyword()
setlocal isk-=_
call assert_equal('DLTD_BY', GetSyntaxItem('DLTD'))
/\<D\k\+\>/:norm! ygn
let b2=@0
let b2 = @0
call assert_equal('DLTD', @0)
syn iskeyword clear
@@ -80,3 +80,79 @@ func Test_syntax_after_reload()
call assert_true(exists('g:gotit'))
call delete('Xsomefile')
endfunc
func Test_syntime()
if !has('profile')
return
endif
syntax on
syntime on
let a = execute('syntime report')
call assert_equal("\nNo Syntax items defined for this buffer", a)
view ../memfile_test.c
setfiletype cpp
redraw
let a = execute('syntime report')
call assert_match('^ TOTAL *COUNT *MATCH *SLOWEST *AVERAGE *NAME *PATTERN', a)
call assert_match(' \d*\.\d* \+[^0]\d* .* cppRawString ', a)
call assert_match(' \d*\.\d* \+[^0]\d* .* cppNumber ', a)
syntime off
syntime clear
let a = execute('syntime report')
call assert_match('^ TOTAL *COUNT *MATCH *SLOWEST *AVERAGE *NAME *PATTERN', a)
call assert_notmatch('.* cppRawString *', a)
call assert_notmatch('.* cppNumber*', a)
call assert_notmatch('[1-9]', a)
call assert_fails('syntime abc', 'E475')
syntax clear
let a = execute('syntime report')
call assert_equal("\nNo Syntax items defined for this buffer", a)
bd
endfunc
func Test_syntax_list()
syntax on
let a = execute('syntax list')
call assert_equal("\nNo Syntax items defined for this buffer", a)
view ../memfile_test.c
setfiletype c
let a = execute('syntax list')
call assert_match('cInclude*', a)
call assert_match('cDefine', a)
let a = execute('syntax list cDefine')
call assert_notmatch('cInclude*', a)
call assert_match('cDefine', a)
call assert_match(' links to Macro$', a)
call assert_fails('syntax list ABCD', 'E28:')
call assert_fails('syntax list @ABCD', 'E392:')
syntax clear
let a = execute('syntax list')
call assert_equal("\nNo Syntax items defined for this buffer", a)
bd
endfunc
func Test_syntax_completion()
call feedkeys(":syn \<C-A>\<C-B>\"\<CR>", 'tx')
call assert_equal('"syn case clear cluster conceal enable include iskeyword keyword list manual match off on region reset spell sync', @:)
call feedkeys(":syn case \<C-A>\<C-B>\"\<CR>", 'tx')
call assert_equal('"syn case ignore match', @:)
call feedkeys(":syn list \<C-A>\<C-B>\"\<CR>", 'tx')
call assert_match('^"syn list Boolean Character ', @:)
call feedkeys(":syn match \<C-A>\<C-B>\"\<CR>", 'tx')
call assert_match('^"syn match Boolean Character ', @:)
endfunc
+13 -5
View File
@@ -1,13 +1,13 @@
" Tests for Visual mode. Uses double-wide character.
if !has('multi_byte')
finish
endif
" Tests for various Visual mode.
if !has('visual')
finish
endif
func Test_block_shift_multibyte()
" Uses double-wide character.
if !has('multi_byte')
return
endif
split
call setline(1, ['xヹxxx', 'ヹxxx'])
exe "normal 1G0l\<C-V>jl>"
@@ -15,3 +15,11 @@ func Test_block_shift_multibyte()
call assert_equal(' ヹxxx', getline(2))
q!
endfunc
func Test_dotregister_paste()
new
exe "norm! ihello world\<esc>"
norm! 0ve".p
call assert_equal('hello world world', getline(1))
q!
endfunc
+36
View File
@@ -779,6 +779,42 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
142,
/**/
141,
/**/
140,
/**/
139,
/**/
138,
/**/
137,
/**/
136,
/**/
135,
/**/
134,
/**/
133,
/**/
132,
/**/
131,
/**/
130,
/**/
129,
/**/
128,
/**/
127,
/**/
126,
/**/
125,
/**/
124,
/**/