Compare commits

...

23 Commits

Author SHA1 Message Date
Bram Moolenaar
7ab6defcaf patch 7.4.2161
Problem:    Expression test fails without conceal feature.
Solution:   Only check "conceal" with the conceal feature.
2016-08-05 22:51:13 +02:00
Bram Moolenaar
7dc5e2e486 patch 7.4.2160
Problem:    setmatches() mixes up values. (Nikolai Pavlov)
Solution:   Save the string instead of reusing a shared buffer.
2016-08-05 22:22:06 +02:00
Bram Moolenaar
5971dab112 patch 7.4.2159
Problem:    Insufficient testing for cscope.
Solution:   Add more tests. (Dominique Pelle)
2016-08-05 21:25:29 +02:00
Bram Moolenaar
b650b9878e patch 7.4.2158
Problem:    Result of getcompletion('', 'cscope') depends on previous
            completion. (Christian Brabandt)
Solution:   Call set_context_in_cscope_cmd().
2016-08-05 20:35:13 +02:00
Bram Moolenaar
46c4d4ac66 patch 7.4.2157
Problem:    Test_job_start_fails() is expected to report memory leaks, making
            it hard to see other leaks in test_partial.
Solution:   Move Test_job_start_fails() to a separate test file.
2016-08-05 19:31:57 +02:00
Bram Moolenaar
c90f2aedd0 patch 7.4.2156
Problem:    Compiler warning.
Solution:   Add type cast. (Ken Takata, Mike Williams)
2016-08-04 22:00:15 +02:00
Bram Moolenaar
9d5b876d45 patch 7.4.2155
Problem:    Quotes make GUI test fail on MS-Windows.
Solution:   Remove quotes, strip white space.
2016-08-04 21:21:13 +02:00
Bram Moolenaar
fe9489233c patch 7.4.2154
Problem:    Test_communicate() fails sometimes.
Solution:   Add it to the flaky tests.
2016-08-04 21:11:32 +02:00
Bram Moolenaar
877e957798 patch 7.4.2153
Problem:    GUI test isn't testing much.
Solution:   Turn into a new style test.  Execute a shell command.
2016-08-04 20:05:50 +02:00
Bram Moolenaar
ee695f787a patch 7.4.2152
Problem:    No proper translation of messages with a count.
Solution:   Use ngettext(). (Sergey Alyoshin)
2016-08-03 22:08:45 +02:00
Bram Moolenaar
cf25fdb8f1 patch 7.4.2151
Problem:    Quickfix test fails on MS-Windows.
Solution:   Close the help window. (Christian Brabandt)
2016-08-03 21:04:53 +02:00
Bram Moolenaar
4c38d66d25 patch 7.4.2150
Problem:    Warning with MinGW 64. (John Marriott)
Solution:   Change return type. (Ken Takata)
2016-08-03 20:54:57 +02:00
Bram Moolenaar
7cba71d7e3 patch 7.4.2149
Problem:    If a test leaves a window open a following test may fail.
Solution:   Always close extra windows after running a test.
2016-08-02 23:04:49 +02:00
Bram Moolenaar
edf634e0f1 patch 7.4.2148
Problem:    Not much testing for cscope.
Solution:   Add a test that uses the cscope program. (Christian Brabandt)
2016-08-02 23:01:40 +02:00
Bram Moolenaar
abb71fbd39 patch 7.4.2147
Problem:    test_alot fails.
Solution:   Close window.
2016-08-02 22:51:42 +02:00
Bram Moolenaar
472472898a patch 7.4.2146
Problem:    Not enough testing for popup menu.  CTRL-E does not always work
            properly.
Solution:   Add more tests.  When using CTRL-E check if the popup menu is
            visible. (Christian Brabandt)
2016-08-02 22:36:02 +02:00
Bram Moolenaar
86f2cd5bc5 patch 7.4.2145
Problem:    Win32: Using CreateThread/ExitThread is not safe.
Solution:   Use _beginthreadex and return from the thread. (Ken Takata)
2016-08-02 21:55:17 +02:00
Bram Moolenaar
796aa9c804 patch 7.4.2144
Problem:    On MS-Windows quickix does not handle a line with 1023 bytes
            ending in CR-LF properly.
Solution:   Don't consider CR a line break. (Ken Takata)
2016-08-02 21:41:28 +02:00
Bram Moolenaar
bc8801c931 Updated runtime files. 2016-08-02 21:04:33 +02:00
Bram Moolenaar
bc7ce675b2 patch 7.4.2143
Problem:    A funccal is garbage collected while it can still be used.
Solution:   Set copyID in all referenced functions.  Do not list lambda
            functions with ":function".
2016-08-01 22:49:22 +02:00
Bram Moolenaar
8dd3a43d75 patch 7.4.2142
Problem:    Leaking memory when redefining a function.
Solution:   Don't increment the function reference count when it's found by
            name. Don't remove the wrong function from the hashtab.  More
            reference counting fixes.
2016-08-01 20:46:25 +02:00
Bram Moolenaar
ba96e9af38 patch 7.4.2141
Problem:    Coverity reports bogus NULL check.
Solution:   When checking for a variable in the funccal scope don't pass the
            varname.
2016-08-01 17:10:20 +02:00
Bram Moolenaar
acadbeabe1 patch 7.4.2140
Problem:    Tiny build fails.
Solution:   Add dummy typedefs.
2016-08-01 16:35:59 +02:00
43 changed files with 994 additions and 411 deletions

View File

@@ -62,6 +62,7 @@ addons:
- python3-dev
- liblua5.1-0-dev
- lua5.1
- cscope
before_install:
- pip install --user cpp-coveralls

View File

@@ -1,4 +1,4 @@
*autocmd.txt* For Vim version 7.4. Last change: 2016 Jul 19
*autocmd.txt* For Vim version 7.4. Last change: 2016 Jul 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1163,10 +1163,11 @@ name!
different from existing {event} names, as this
most likely will not do what you intended.
*:augroup-delete* *E367*
*:augroup-delete* *E367* *W19*
:aug[roup]! {name} Delete the autocmd group {name}. Don't use
this if there is still an autocommand using
this group! This is not checked.
this group! You will get a warning if doing
it anyway.
To enter autocommands for a specific group, use this method:
1. Select the group with ":augroup {name}".

View File

@@ -1,4 +1,4 @@
*eval.txt* For Vim version 7.4. Last change: 2016 Jul 31
*eval.txt* For Vim version 7.4. Last change: 2016 Aug 02
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -262,7 +262,7 @@ it. To change a list in-place see |list-modification| below.
Sublist ~
*sublist*
A part of the List can be obtained by specifying the first and last index,
separated by a colon in square brackets: >
:let shortlist = mylist[2:-1] " get List [3, "four"]
@@ -990,10 +990,10 @@ Examples: >
:let s = line(".")[4:] " from the fifth byte to the end
:let s = s[:-3] " remove last two bytes
<
*sublist* *slice*
*slice*
If expr8 is a |List| this results in a new |List| with the items indicated by
the indexes expr1a and expr1b. This works like with a String, as explained
just above, except that indexes out of range cause an error. Examples: >
just above. Also see |sublist| below. Examples: >
:let l = mylist[:3] " first four items
:let l = mylist[4:4] " List with one item
:let l = mylist[:] " shallow copy of a List
@@ -8292,7 +8292,7 @@ See |:verbose-cmd| for more information.
: let x += 1
: return x
: endfunction
: return function('Bar')
: return funcref('Bar')
:endfunction
:let F = Foo()

View File

@@ -1,4 +1,4 @@
*map.txt* For Vim version 7.4. Last change: 2016 Jul 06
*map.txt* For Vim version 7.4. Last change: 2016 Jul 30
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1416,9 +1416,11 @@ The valid escape sequences are
<mods> The command modifiers, if specified. Otherwise, expands to
nothing. Supported modifiers are |:aboveleft|, |:belowright|,
|:botright|, |:browse|, |:confirm|, |:hide|, |:keepalt|,
|:keepjumps|, |:keepmarks|, |:keeppatterns|, |:lockmarks|,
|:noswapfile|, |:silent|, |:tab|, |:topleft|, |:verbose|, and
|:vertical|.
|:keepjumps|, |:keepmarks|, |:keeppatterns|, |:leftabove|,
|:lockmarks|, |:noswapfile| |:rightbelow|, |:silent|, |:tab|,
|:topleft|, |:verbose|, and |:vertical|.
Note that these are not yet supported: |:noautocmd|,
|:sandbox| and |:unsilent|.
Examples: >
command! -nargs=+ -complete=file MyEdit
\ for f in expand(<q-args>, 0, 1) |

View File

@@ -1,4 +1,4 @@
*options.txt* For Vim version 7.4. Last change: 2016 Jul 28
*options.txt* For Vim version 7.4. Last change: 2016 Jul 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -2618,7 +2618,8 @@ A jump table for the options with a short description can be found at |Q_op|.
{Vi: directory to put temp file in, defaults to "/tmp"}
*'display'* *'dy'*
'display' 'dy' string (default "")
'display' 'dy' string (default "", set to "truncate" in
|defaults.vim|)
global
{not in Vi}
Change the way text is displayed. This is comma separated list of

View File

@@ -1,4 +1,4 @@
*starting.txt* For Vim version 7.4. Last change: 2016 Jul 28
*starting.txt* For Vim version 7.4. Last change: 2016 Jul 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -979,7 +979,7 @@ This has the side effect of setting or resetting other options (see
changed. This has the same effect like the value of 'compatible' had this
value when starting Vim.
'compatible is NOT reset, and |defaults.vim| is not loaded:
'compatible' is NOT reset, and |defaults.vim| is not loaded:
- when Vim was started with the |-u| command line argument, especially with
"-u NONE", or
- when started with the |-C| command line argument, or

View File

@@ -1232,6 +1232,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
+job various.txt /*+job*
+jumplist various.txt /*+jumplist*
+keymap various.txt /*+keymap*
+lambda various.txt /*+lambda*
+langmap various.txt /*+langmap*
+libcall various.txt /*+libcall*
+linebreak various.txt /*+linebreak*
@@ -1994,6 +1995,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:bmodified windows.txt /*:bmodified*
:bn windows.txt /*:bn*
:bnext windows.txt /*:bnext*
:bo windows.txt /*:bo*
:botright windows.txt /*:botright*
:bp windows.txt /*:bp*
:bprevious windows.txt /*:bprevious*
@@ -2286,6 +2288,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:for eval.txt /*:for*
:fu eval.txt /*:fu*
:func-abort eval.txt /*:func-abort*
:func-closure eval.txt /*:func-closure*
:func-dict eval.txt /*:func-dict*
:func-range eval.txt /*:func-range*
:function eval.txt /*:function*
@@ -4467,6 +4470,8 @@ E929 starting.txt /*E929*
E93 windows.txt /*E93*
E930 eval.txt /*E930*
E931 message.txt /*E931*
E932 eval.txt /*E932*
E933 eval.txt /*E933*
E94 windows.txt /*E94*
E95 message.txt /*E95*
E96 diff.txt /*E96*
@@ -4745,6 +4750,7 @@ W15 repeat.txt /*W15*
W16 message.txt /*W16*
W17 arabic.txt /*W17*
W18 syntax.txt /*W18*
W19 autocmd.txt /*W19*
WORD motion.txt /*WORD*
WWW intro.txt /*WWW*
Win32 os_win32.txt /*Win32*
@@ -5340,6 +5346,7 @@ clipboard-unnamed options.txt /*clipboard-unnamed*
clipboard-unnamedplus options.txt /*clipboard-unnamedplus*
clojure-indent indent.txt /*clojure-indent*
close_cb channel.txt /*close_cb*
closure eval.txt /*closure*
cmdarg-variable eval.txt /*cmdarg-variable*
cmdbang-variable eval.txt /*cmdbang-variable*
cmdline-arguments vi_diff.txt /*cmdline-arguments*
@@ -5582,6 +5589,7 @@ debugger.txt debugger.txt /*debugger.txt*
dec-mouse options.txt /*dec-mouse*
decada_members ft_ada.txt /*decada_members*
deepcopy() eval.txt /*deepcopy()*
defaults.vim starting.txt /*defaults.vim*
definition-search tagsrch.txt /*definition-search*
definitions intro.txt /*definitions*
delete() eval.txt /*delete()*
@@ -6110,6 +6118,7 @@ ftplugin-name usr_05.txt /*ftplugin-name*
ftplugin-overrule filetype.txt /*ftplugin-overrule*
ftplugin-special usr_41.txt /*ftplugin-special*
ftplugins usr_05.txt /*ftplugins*
funcref() eval.txt /*funcref()*
function() eval.txt /*function()*
function-argument eval.txt /*function-argument*
function-key intro.txt /*function-key*

View File

@@ -1,4 +1,4 @@
*todo.txt* For Vim version 7.4. Last change: 2016 Jul 23
*todo.txt* For Vim version 7.4. Last change: 2016 Aug 02
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -34,6 +34,8 @@ not be repeated below, unless there is extra information.
*known-bugs*
-------------------- Known bugs and current work -----------------------
Should free_all_functions(void) skip numbered and lambda functions?
+channel:
- 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?
@@ -108,15 +110,6 @@ Or avoid recursiveness.
Patch to test popupmenu. Fails, possibly due to a bug.
(Christian Brabandt, 2016 Jul 23)
7 In "-- INSERT (lang) --" show the name of the keymap used instead of
"lang". (Ilya Dogolazky)
Patch: Show keymap name in mode indicator (Dmitri Vereshchagin, 2016 Jul 19,
#933)
Patch to fix the Problem using cgn to change a search hit when
replacement includes hit. Reported by John Beckett, fix by Christian Brabandt,
2016 Jan 11.
Once .exe with updated installer is available: Add remark to download page
about /S and /D options (Ken Takata, 2016 Apr 13)
Or point to nightly builds: https://github.com/vim/vim-win32-installer/releases
@@ -136,27 +129,31 @@ Javascript indent wrong after /* in single quoted string:
Use ADDR_OTHER instead of ADDR_LINES for many more commands.
Add tests for using number larger than number of lines in buffer.
Updating marks in quickfix list is broken. (Yegappan, 2016 Jul 18)
Invalid behavior with NULL list. (Nikolai Pavlov, #768)
For current Windows build .pdb file is missing. (Gabriele Fava, 2016 May 11)
5)
Support closure for lambda? Ken Takata is working on it.
Patch Jul 19. Still need test updates.
Problem with whitespace in errorformat. (Gerd Wachsmuth, 2016 May 15, #807)
Undo problem: "g-" doesn't go back, gets stuck. (Björn Linse, 2016 Jul 18)
Do we need some way (option) to show the sign column even when there are no
signs? Patch by Christian Brabandt, 2016 Jul 29.
Patch to allow setting w:quickfix_title via setqflist() and setloclist()
functions. (Christian Brabandt, 2013 May 8, update May 21)
Patch to add getlocstack() / setlocstack(). (Christian Brabandt, 2013 May 14)
Second one. Update May 22.
Update by Daniel Hahler, 2014 Jul 4, Aug 14, Oct 14, Oct 15.
Rethink this: can we add an argument to setqflist() and getqflist() for these
extra items?
Updated patch: add an argument to setqflist() and getqflist() for these
extra items: Yegappan, 2016 Jul 30.
Patch to detect st terminal supporting xterm mouse. (Manuel Schiller, 2016 Aug
2, #963)
Syntax highlighting for messages with RFC3339 timestamp (#946)
Did maintainer reply?
Patch to add filtering of the quickfix list. (Yegappan Lakshmanan, 2016 Mar
13, last version) Update June 26, #830.
@@ -174,7 +171,23 @@ Cannot delete a file with square brackets with delete(). (#696)
No autocommand for when changing directory. Patch from allen haim, 2016 Jun
27, #888
Justin M Keyes: use "global" or "window" for the pattern. Can add "tab"
later.
later. What if entering a window where ":lcd" was used?
Completion for input() does not expand environment variables. (chdiza, 2016
Jul 25, #948)
Patch to have text objects defined by arbitrary single characters. (Daniel
Thau, 2013 Nov 20, 2014 Jan 29, 2014 Jan 31)
Ben Fritz: problem with 'selection' set to "exclusive".
Updated to current Vim, not quite right yet. (Ben Fritz, 2014 Mar 27)
Updated to current Vim (James McCoy, 2016 Jul 30, #958)
Still a bit of work left.
Patch to add CTRL-N / CTRL-P while searching. (Christian Brabandt, 2016 Jul
29)
's$^$\=capture("s/^//gn")' locks Vim in sandbox mode (#950)
Patch by Christian Brabandt, 2016 Jul 27.
MS-Windows: use WS_HIDE instead of SW_SHOWMINNOACTIVE in os_win32.c?
Otherwise task flickers in taskbar.
@@ -182,6 +195,9 @@ Otherwise task flickers in taskbar.
Should make ":@r" handle line continuation. (Cesar Romani, 2016 Jun 26)
Also for ":@.".
Patch to make printf() convert to string for %s items. (Ken Takata, 2016 Aug
1)
Repeating 'opfunc' in a function only works once. (Tarmean, 2016 Jul 15, #925)
Patch on issue #728 by Christian Brabandt, 2016 Apr 7. Update with test: Apr 8.
@@ -219,6 +235,9 @@ emoji_width table has only one entry.
It's possible to add ",," to 'wildignore', an empty entry. Causes problems.
Reject the value? #710.
Patch to fix increment/decrement not working properly when 'virtualedit' is
set. (Hirohito Higashi, 2016 Aug 1, #923)
Patch to support strikethrough next to bold and italic. (Christian Brabandt,
2013 Jul 30) Update from Ken Takata, 2013 Oct 12.
Update mentioned by Christian, 2016 Apr 25.
@@ -226,6 +245,9 @@ Update from Ken Takata, 2016 Jul 17.
Patch to improve cscope. (Adrian Kocis, #843)
Patch to add getbufinfo(), gettabinfo() and getwininfo(). (Yegappan
Lakshmanan, 2016 Apr 2016) Update Jul 29. #833.
Patch for groovy multi-line comment highlighting. (Justin M. Keyes, 2016 May
20 #644)
@@ -298,9 +320,6 @@ Should use /usr/local/share/applications or /usr/share/applications.
Or use $XDG_DATA_DIRS.
Also need to run update-desktop-database (Kuriyama Kazunobu, 2015 Nov 4)
Patch to add getbufinfo(), gettabinfo() and getwininfo(). (Yegappan
Lakshmanan, 2016 Apr 2016) Update Jun 8.
Access to uninitialized memory in match_backref() regexp_nda.c:4882
(Dominique Pelle, 2015 Nov 6)
@@ -623,6 +642,9 @@ Spell files use a latin single quote. Unicode also has another single quote:
New OpenOffice spell files support this with ICONV. But they are not
compatible with Vim spell files. The old files can no longer be downloaded.
xterm should be able to pass focus changes to Vim, so that Vim can check for
buffers that changed. Perhaps in misc.c, function selectwindow().
Xterm 224 supports it!
Patch to make FocusGained and FocusLost work in modern terminals. (Hayaki
Saito, 2013 Apr 24) Has a problem (email 2015 Jan 7).
Update 2015 Jan 10.
@@ -866,11 +888,6 @@ In the ATTENTION message about an existing swap file, mention the name of the
process that is running. It might actually be some other program, e.g. after
a reboot.
Patch to have text objects defined by arbitrary single characters. (Daniel
Thau, 2013 Nov 20, 2014 Jan 29, 2014 Jan 31)
Ben Fritz: problem with 'selection' set to "exclusive".
Updated to current Vim, not quite right yet. (Ben Fritz, 2014 Mar 27)
Patch to select the next or previous text object if there isn't one under the
cursor. (Daniel Thau, 2013 Nov 20)
@@ -892,9 +909,6 @@ Patch to make confirm() display colors. (Christian Brabandt, 2012 Nov 9)
Patch to add functions for signs. (Christian Brabandt, 2013 Jan 27)
Do we need some way (option) to show the sign column even when there are no
signs? Patch by Christian Brabandt, 2013 Aug 22.
Patch to remove flicker from popup menu. (Yasuhiro Matsumoto, 2013 Aug 15)
Problem with refresh:always in completion. (Tyler Wade, 2013 Mar 17)
@@ -2265,10 +2279,6 @@ Patch for adding ":lscscope". (Navdeep Parhar, 2007 Apr 26; update 2008 Apr
tabs and the autocommand "autocmd BufWinLeave * mkview". (James Vega, 2007
Jun 18)
xterm should be able to pass focus changes to Vim, so that Vim can check for
buffers that changed. Perhaps in misc.c, function selectwindow().
Xterm 224 supports it!
When completing from another file that uses a different encoding completion
text has the wrong encoding. E.g., when 'encoding' is utf-8 and file is
latin1. Example from Gombault Damien, 2007 Mar 24.

View File

@@ -1,4 +1,4 @@
*various.txt* For Vim version 7.4. Last change: 2016 Jul 09
*various.txt* For Vim version 7.4. Last change: 2016 Jul 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -361,6 +361,7 @@ N *+insert_expand* |insert_expand| Insert mode completion
m *+job* starting and stopping jobs |job|
N *+jumplist* |jumplist|
B *+keymap* |'keymap'|
N *+lambda* |lambda| and |closure|
B *+langmap* |'langmap'|
N *+libcall* |libcall()|
N *+linebreak* |'linebreak'|, |'breakat'| and |'showbreak'|

View File

@@ -1,4 +1,4 @@
*version8.txt* For Vim version 8.0. Last change: 2016 Jul 23
*version8.txt* For Vim version 8.0. Last change: 2016 Jul 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -77,13 +77,19 @@ example above, to pass an argument to the function: >
This will call CheckTemp('out') four seconds later.
Lambda ~
Lambda and Closure ~
A short way to create a function has been added: {args -> expr}. See |lambda|.
This is useful for functions such as `filter()` and `map()`, which now also
accept a function argument. Example: >
:call filter(mylist, {idx, val -> val > 20})
A lambda can use variables defined in the scope where the lambda is defined.
This is usually called a |closure|.
User defined functions can also be a closure by adding the "closure" argument
|:func-closure|.
Packages ~
@@ -145,6 +151,8 @@ In Vim script the following types have been added:
Many functions and commands have been added to support the new types.
On some systems the numbers used in Vim script are now 64 bit. This can be
checked with the |+num64| feature.
Various new items *new-items-8*
@@ -310,6 +318,12 @@ INCOMPATIBLE CHANGES *incompatible-8*
These changes are incompatible with previous releases. Check this list if you
run into a problem when upgrading from Vim 7.4 to 8.0.
When no vimrc file is found, the |defaults.vim| script is loaded to set more
useful default values for new users. That includes setting 'nocompatible'.
Thus Vim no longer starts up in Vi compatible mode. If you do want that,
either create a .vimrc file that does "set compatible" or start Vim with
"Vim -C".
The support for MS-DOS has been removed. It hasn't been working for a while
and removing it cleans up the code quite a bit.
@@ -523,7 +537,7 @@ Files: src/diff.c
Patch 7.4.032
Problem: NFA engine does not match the NUL character. (Jonathon Merz)
Solution: Ues 0x0a instead of NUL. (Christian Brabandt)
Solution: Use 0x0a instead of NUL. (Christian Brabandt)
Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok
Patch 7.4.033
@@ -566,7 +580,7 @@ Solution: Ignore the error when locating the word. Explicitly mention what
Files: src/normal.c, src/spell.c
Patch 7.4.039
Problem: MS-Windows: MSCV10 and earlier can't handle symlinks to a
Problem: MS-Windows: MSVC10 and earlier can't handle symlinks to a
directory properly.
Solution: Add stat_symlink_aware() and wstat_symlink_aware(). (Ken Takata)
Files: src/os_mswin.c, src/os_win32.c, src/os_win32.h
@@ -638,7 +652,7 @@ Files: src/search.c, src/testdir/test53.in, src/testdir/test53.ok
Patch 7.4.051
Problem: Syntax highlighting a Yaml file causes a crash. (Blake Preston)
Solution: Copy the pim structure before calling addstate() to avoid it
becoming invalide when the state list is reallocated.
becoming invalid when the state list is reallocated.
Files: src/regexp_nfa.c
Patch 7.4.052
@@ -828,7 +842,7 @@ Files: src/Make_mvc.mak
Patch 7.4.082
Problem: Using "gf" in a changed buffer suggests adding "!", which is not
possible. (Tim Chase)
Solution: Pass a flag to check_changed() wether adding ! make sense.
Solution: Pass a flag to check_changed() whether adding ! make sense.
Files: src/vim.h, src/ex_cmds2.c, src/proto/ex_cmds2.pro, src/globals.h,
src/ex_cmds.c, src/ex_docmd.c
@@ -995,7 +1009,7 @@ Solution: Match with the colorscheme name. (Christian Brabandt)
Files: runtime/doc/autocmd.txt, src/fileio.c, src/syntax.c
Patch 7.4.110
Problem: "gUgn" cannot be repeeated. (Dimitar Dimitrov)
Problem: "gUgn" cannot be repeated. (Dimitar Dimitrov)
Solution: Don't put "gn" in a different order in the redo buffer. Restore
'wrapscan' when the pattern isn't found. (Christian Wellenbrock)
Files: src/normal.c, src/search.c, src/test53.in, src/test53.ok
@@ -1170,7 +1184,7 @@ Solution: Fix the problems. (Ken Takata)
Files: src/Make_bc5.mak, src/if_py_both.h, src/os_win32.c
Patch 7.4.142 (after 7.4.137)
Problem: On MS-Windows 8 IME input doen't work correctly.
Problem: On MS-Windows 8 IME input doesn't work correctly.
Solution: Work around the problem. (Nobuhiro Takasaki)
Files: src/os_win32.c
@@ -1186,7 +1200,7 @@ Files: src/os_mswin.c
Patch 7.4.145
Problem: getregtype() does not return zero for unknown register.
Solution: Adjust documention: return empty string for unknown register.
Solution: Adjust documentation: return empty string for unknown register.
Check the register name to be valid. (Yukihiro Nakadaira)
Files: runtime/doc/eval.txt, src/ops.c
@@ -1364,7 +1378,7 @@ Solution: Check the platform, when the wide function is supported don't fall
Files: src/os_mswin.c, src/os_win32.c
Patch 7.4.176
Problem: Dictionary.update() thows an error when used without arguments.
Problem: Dictionary.update() throws an error when used without arguments.
Python programmers don't expect that.
Solution: Make Dictionary.update() without arguments do nothing. (ZyX)
Files: src/if_py_both.h, src/testdir/test86.in, src/testdir/test87.in
@@ -1711,7 +1725,7 @@ Files: src/ex_cmds.c, src/ex_docmd.c, src/proto/ex_docmd.pro
Patch 7.4.233
Problem: Escaping special characters for using "%" with a shell command is
inconsistant, parenthesis are escaped but spaces are not.
inconsistent, parentheses are escaped but spaces are not.
Solution: Only escape "!". (Gary Johnson)
Files: src/ex_docmd.c
@@ -1890,7 +1904,7 @@ Solution: Add line_lbr flag to regexec_nl().
Files: src/regexp.c, src/regexp_nfa.c, src/regexp.h
Patch 7.4.263
Problem: GCC 4.8 compiler warning for hiding a declaration (Francois Gannaz)
Problem: GCC 4.8 compiler warning for hiding a declaration (François Gannaz)
Solution: Remove the second declaration.
Files: src/eval.c
@@ -1964,7 +1978,7 @@ Solution: Also check the file size.
Files: src/fileio.c
Patch 7.4.275
Problem: When changing the type of a sign that hasn't been placed ther is
Problem: When changing the type of a sign that hasn't been placed there is
no error message.
Solution: Add an error message. (Christian Brabandt)
Files: src/ex_cmds.c
@@ -2028,7 +2042,7 @@ Solution: (Christian Brabandt)
Files: src/misc1.c
Patch 7.4.286
Problem: Error messages are inconsistant. (ZyX)
Problem: Error messages are inconsistent. (ZyX)
Solution: Change "Lists" to "list".
Files: src/eval.c
@@ -2222,7 +2236,7 @@ Files: src/syntax.c
Patch 7.4.319
Problem: Crash when putting zero bytes on the clipboard.
Solution: Do not support the utf8_atom target when not using an Unicode
Solution: Do not support the utf8_atom target when not using a Unicode
encoding. (Naofumi Honda)
Files: src/ui.c
@@ -2310,7 +2324,7 @@ Solution: Put the function inside the #ifdef.
Files: src/screen.c
Patch 7.4.334 (after 7.4.330)
Problem: Unitialized variables, causing some problems.
Problem: Uninitialized variables, causing some problems.
Solution: Initialize the variables. (Dominique Pelle)
Files: src/screen.c, src/window.c
@@ -2372,7 +2386,7 @@ Solution: Fix off-by-one error. (Ozaki Kiichi)
Files: src/window.c
Patch 7.4.344
Problem: Unessecary initializations and other things related to
Problem: Unnecessary initializations and other things related to
matchaddpos().
Solution: Code cleanup. (Alexey Radkov)
Files: runtime/doc/eval.txt, src/screen.c, src/window.c
@@ -2396,7 +2410,7 @@ Files: src/testdir/test55.in, src/testdir/test55.ok
Patch 7.4.348
Problem: When using "J1" in 'cinoptions' a line below a continuation line
gets too much indent.
Solution: Fix parenthesis in condition.
Solution: Fix parentheses in condition.
Files: src/misc1.c
Patch 7.4.349
@@ -2408,7 +2422,7 @@ Files: src/screen.c, src/window.c
Patch 7.4.350
Problem: Using C indenting for Javascript does not work well for a {} block
inside parenthesis.
inside parentheses.
Solution: When looking for a matching paren ignore one that is before the
start of a {} block.
Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok
@@ -2573,7 +2587,7 @@ Solution: Compute the available room properly. (Yukihiro Nakadaira)
Files: src/window.c
Patch 7.4.378
Problem: Title of quickfist list is not kept for setqflist(list, 'r').
Problem: Title of quickfix list is not kept for setqflist(list, 'r').
Solution: Keep the title. Add a test. (Lcd)
Files: src/quickfix.c, src/testdir/Make_amiga.mak,
src/testdir/Make_dos.mak, src/testdir/Make_ming.mak,
@@ -2969,7 +2983,7 @@ Solution: Do not call ex_window() when ex_normal_busy or got_int was set.
Files: src/ex_getln.c
Patch 7.4.442 (after 7.4.434)
Problem: Using unitinialized variable.
Problem: Using uninitialized variable.
Solution: Pass the first window of the tabpage.
Files: src/eval.c
@@ -3100,7 +3114,7 @@ Files: src/gui_w32.c
Patch 7.4.465 (after 7.4.016)
Problem: Crash when expanding a very long string.
Solution: Use wsncpy() instead of wcscpy(). (Ken Takata)
Solution: Use wcsncpy() instead of wcscpy(). (Ken Takata)
Files: src/os_win32.c
Patch 7.4.466 (after 7.4.460)
@@ -3140,7 +3154,7 @@ Solution: Convert the printer name from the active codepage to 'encoding'.
Files: src/os_mswin.c
Patch 7.4.472
Problem: The "precedes" entry in 'listchar' will be drawn when 'showbreak
Problem: The "precedes" entry in 'listchar' will be drawn when 'showbreak'
is set and 'list' is not.
Solution: Only draw this character when 'list' is on. (Christian Brabandt)
Files: src/screen.c
@@ -3429,7 +3443,7 @@ Files: src/buffer.c, src/regexp.c, src/syntax.c, src/spell.c,
src/proto/regexp.pro, src/os_unix.c
Patch 7.4.520
Problem: Sun PCK locale is not recognzed.
Problem: Sun PCK locale is not recognized.
Solution: Add PCK in the table. (Keiichi Oono)
Files: src/mbyte.c
@@ -3498,7 +3512,7 @@ Files: runtime/doc/editing.txt, runtime/doc/tabpage.txt,
Patch 7.4.531
Problem: Comments about parsing an Ex command are wrong.
Solution: Correct the steop numbers.
Solution: Correct the step numbers.
Files: src/ex_docmd.c
Patch 7.4.532
@@ -3555,7 +3569,7 @@ Files: src/ex_docmd.c
Patch 7.4.541
Problem: Crash when doing a range assign.
Solution: Check for NULL poiter. (Yukihiro Nakadaira)
Solution: Check for NULL pointer. (Yukihiro Nakadaira)
Files: src/eval.c, src/testdir/test55.in, src/testdir/test55.ok
Patch 7.4.542
@@ -3602,14 +3616,14 @@ Solution: Advance the cursor over the multi-byte character. (Christian
Files: src/search.c
Patch 7.4.548
Problem: Compilation fails with native version of MinGW-w64, because the
Problem: Compilation fails with native version of MinGW-w64, because
it doesn't have x86_64-w64-mingw32-windres.exe.
Solution: Use windres instead. (Ken Takata)
Files: src/Make_cyg_ming.mak
Patch 7.4.549
Problem: Function name not recognized correctly when inside a function.
Solution: Don't check for an alpha character.
Solution: Don't check for an alpha character. (Ozaki Kiichi)
Files: src/eval.c, src/testdir/test_nested_function.in,
src/testdir/test_nested_function.ok, src/testdir/Make_amiga.mak,
src/testdir/Make_dos.mak, src/testdir/Make_ming.mak,
@@ -3721,7 +3735,7 @@ Files: runtime/doc/editing.txt, runtime/doc/tabpage.txt,
src/testdir/test_command_count.ok
Patch 7.4.567
Problem: Non-ascii vertical separater characters are always redrawn.
Problem: Non-ascii vertical separator characters are always redrawn.
Solution: Compare only the one byte that's stored. (Thiago Padilha)
Files: src/screen.c
@@ -3798,7 +3812,7 @@ Solution: Skip over white space.
Files: src/ex_docmd.c
Patch 7.4.581
Problem: Compiler warnings for unitinialized variables. (John Little)
Problem: Compiler warnings for uninitialized variables. (John Little)
Solution: Initialize the variables.
Files: src/ops.c
@@ -3930,7 +3944,7 @@ Problem: 'foldcolumn' may be set such that it fills the whole window, not
leaving space for text.
Solution: Reduce the foldcolumn width when there is not sufficient room.
(idea by Christian Brabandt)
Files: src/srcreen.c
Files: src/screen.c
Patch 7.4.604
Problem: Running tests changes viminfo.
@@ -4019,7 +4033,7 @@ Solution: Return one.
Files: src/if_lua.c
Patch 7.4.620
Problem: Compiler warning for unitinialized variable. (Tony Mechelynck)
Problem: Compiler warning for uninitialized variable. (Tony Mechelynck)
Solution: Initialize "did_free". (Ben Fritz)
Files: src/eval.c
@@ -4079,7 +4093,7 @@ Files: src/fileio.c
Patch 7.4.631
Problem: The default conceal character is documented to be a space but it's
initially a dash. (Christian Brabandt)
Solution: Make the intial value a space.
Solution: Make the initial value a space.
Files: src/globals.h
Patch 7.4.632 (after 7.4.592)
@@ -4261,7 +4275,7 @@ Files: src/edit.c
Patch 7.4.662
Problem: When 'M' is in the 'cpo' option then selecting a text object in
parenthesis does not work correctly.
parentheses does not work correctly.
Solution: Keep 'M' in 'cpo' when finding a match. (Hirohito Higashi)
Files: src/search.c, src/testdir/Make_amiga.mak,
src/testdir/Make_dos.mak, src/testdir/Make_ming.mak,
@@ -4463,7 +4477,7 @@ Solution: Disable viminfo in the text objects test.
Files: src/testdir/test_textobjects.in
Patch 7.4.695
Problem: Out-of-bounds read, dectected by Coverity.
Problem: Out-of-bounds read, detected by Coverity.
Solution: Remember the value of cmap for the first matching encoding. Reset
cmap to that value if first matching encoding is going to be used.
(Eliseo Martínez)
@@ -4506,7 +4520,7 @@ Solution: Initialize it.
Files: src/hardcopy.c
Patch 7.4.702
Problem: Joining an empty list does uneccessary work.
Problem: Joining an empty list does unnecessary work.
Solution: Let join() return early. (Marco Hinz)
Files: src/eval.c
@@ -4553,7 +4567,7 @@ Files: src/window.c, runtime/doc/tabpage.txt, src/ex_docmd.c,
src/testdir/test62.in, src/testdir/test62.ok
Patch 7.4.710
Problem: It is not possible to make spaces visibible in list mode.
Problem: It is not possible to make spaces visible in list mode.
Solution: Add the "space" item to 'listchars'. (David Bürgin, issue 350)
Files: runtime/doc/options.txt, src/globals.h, src/message.h,
src/screen.c, src/testdir/test_listchars.in,
@@ -5030,7 +5044,7 @@ Solution: Add #ifdef's.
Files: src/option.c
Patch 7.4.789 (after 7.4.788)
Problem: Using freed memory and crash. (Dominique Pellej)
Problem: Using freed memory and crash. (Dominique Pelle)
Solution: Correct use of pointers. (Hirohito Higashi)
Files: src/option.c
@@ -5147,7 +5161,7 @@ Solution: Clear the command line or update the displayed command.
Files: src/normal.c
Patch 7.4.808
Problem: On MS-Windows 8 IME input doen't work correctly.
Problem: On MS-Windows 8 IME input doesn't work correctly.
Solution: Read console input before calling MsgWaitForMultipleObjects().
(vim-jp, Nobuhiro Takasaki)
Files: src/os_win32.c
@@ -5267,7 +5281,7 @@ Files: src/Makefile
Patch 7.4.828
Problem: Crash when using "syn keyword x c". (Dominique Pelle)
Solution: Initialize the keyword tabble. (Raymond Ko, PR 397)
Solution: Initialize the keyword table. (Raymond Ko, PR 397)
Files: src/syntax.c
Patch 7.4.829
@@ -5310,7 +5324,7 @@ Solution: Get the byte size of each character. (Dominique Pelle)
Files: src/misc2.c
Patch 7.4.836
Problem: Accessing unitinialized memory.
Problem: Accessing uninitialized memory.
Solution: Add missing calls to init_tv(). (Dominique Pelle)
Files: src/eval.c
@@ -5519,7 +5533,8 @@ Files: src/misc1.c
Patch 7.4.872
Problem: Not using CI services available.
Solution: Add configuration files for travis and appveyor. (PR #401)
Solution: Add configuration files for travis and appveyor. (Ken Takata,
vim-jp, PR #401)
Files: .travis.yml, appveyor.yml, Filelist
Patch 7.4.873 (after 7.4.866)
@@ -5694,7 +5709,7 @@ Files: src/os_win32.c
Patch 7.4.903
Problem: MS-Windows: When 'encoding' differs from the current code page,
expandinig wildcards may cause illegal memory access.
expanding wildcards may cause illegal memory access.
Solution: Allocate a longer buffer. (Ken Takata)
Files: src/misc1.c
@@ -5887,13 +5902,13 @@ Solution: Add safety check for NULL pointer. Check mouse position for valid
Files: src/window.c, src/term.c
Patch 7.4.937
Problem: Segfault reading unitialized memory.
Problem: Segfault reading uninitialized memory.
Solution: Do not read match \z0, it does not exist. (Marius Gedminas, closes
#497)
Files: src/regexp_nfa.c
Patch 7.4.938
Problem: X11 and GTK have moure mouse buttons than Vim supports.
Problem: X11 and GTK have more mouse buttons than Vim supports.
Solution: Recognize more mouse buttons. (Benoit Pierre, closes #498)
Files: src/gui_gtk_x11.c, src/gui_x11.c
@@ -5977,7 +5992,7 @@ Files: src/screen.c, src/testdir/test_listlbr_utf8.in,
Patch 7.4.950
Problem: v:errors is not initialized.
Solution: Initialze it to an empty list. (Thinca)
Solution: Initialize it to an empty list. (Thinca)
Files: src/eval.c
Patch 7.4.951
@@ -6003,7 +6018,7 @@ Files: src/testdir/runtest.vim
Patch 7.4.954
Problem: When using Lua there may be a crash. (issue #468)
Solution: Avoid using an unitialized tv. (Yukihiro Nakadaira)
Solution: Avoid using an uninitialized tv. (Yukihiro Nakadaira)
Files: src/if_lua.c
Patch 7.4.955
@@ -6037,12 +6052,12 @@ Solution: Use a tiny C program to get the version of _MSC_VER. (Ken Takata)
Files: src/Make_mvc.mak
Patch 7.4.961
Problem: Test107 fails in some circunstances.
Problem: Test107 fails in some circumstances.
Solution: When using "zt", "zb" and "z=" recompute the fraction.
Files: src/normal.c, src/window.c, src/proto/window.pro
Patch 7.4.962
Problem: Cannot run the tests with gvim. Cannot run individual new stests.
Problem: Cannot run the tests with gvim. Cannot run individual new tests.
Solution: Add the -f flag. Add new test targets in Makefile.
Files: src/Makefile, src/testdir/Makefile
@@ -6079,7 +6094,7 @@ Solution: Reduce the count from 8 to 7. (suggested by ZyX)
Files: src/testdir/test86.in, src/testdir/test87.in
Patch 7.4.969
Problem: Compiler warnings on Windowx x64 build.
Problem: Compiler warnings on Windows x64 build.
Solution: Add type casts. (Mike Williams)
Files: src/option.c
@@ -6158,7 +6173,7 @@ Files: src/testdir/runtest.vim
Patch 7.4.982
Problem: Keeping the list of tests updated is a hassle.
Solution: Move the list to a separate file, so that it only needs to be
udpated in one place.
updated in one place.
Files: src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak,
src/testdir/Make_ming.mak, src/testdir/Make_os2.mak,
src/testdir/Make_vms.mms, src/testdir/Makefile,
@@ -6269,7 +6284,7 @@ Files: .travis.yml
Patch 7.4.998
Problem: Running tests in shadow directory fails. Test 49 fails.
Solution: Link more files for the shadow directory. Make test 49 end up in
Solution: Link more files for the shadow directory. Make test 49 ends up in
the right buffer.
Files: src/Makefile, src/testdir/test49.in
@@ -6301,7 +6316,7 @@ Solution: Run autoconf on one of the builds. (James McCoy, closes #510)
Files: .travis.yml
Patch 7.4.1004
Problem: Using Makefile when auto/config.mk does not exists results in
Problem: Using Makefile when auto/config.mk does not exist results in
warnings.
Solution: Use default values for essential variables.
Files: src/Makefile
@@ -6576,13 +6591,13 @@ Solution: Set 'fileformat' to "unix".
Files: src/testdir/test_wordcount.in
Patch 7.4.1049 (after patch 7.4.1048)
Problem: Wordcount test still still fails on MS-Windows.
Problem: Wordcount test still fails on MS-Windows.
Solution: Set 'fileformats' to "unix".
Files: src/testdir/test_wordcount.in
Patch 7.4.1050
Problem: Warning for unused var with tiny features. (Tony Mechelynck)
Solution: Add #ifdef. Use vim_snprintf(). Reduce number of statemements.
Solution: Add #ifdef. Use vim_snprintf(). Reduce number of statements.
Files: src/ops.c
Patch 7.4.1051
@@ -6652,7 +6667,7 @@ Files: src/Make_cyg_ming.mak, src/Make_mvc.mak
Patch 7.4.1063
Problem: TCL_VER_LONG and DYNAMIC_TCL_VER are not set when building with
Cygwin and MingW.
Solution: Add TCL_VER_LONG and DYNAMIC_TCL_VER to the makefile.
Solution: Add TCL_VER_LONG and DYNAMIC_TCL_VER to the makefile. (Ken Takata)
Files: src/Make_cyg_ming.mak
Patch 7.4.1064
@@ -6719,7 +6734,7 @@ Files: src/misc2.c, src/vim.h, src/alloc.h, src/globals.h,
src/testdir/test_quickfix.vim
Patch 7.4.1074
Problem: Warning from VX2015 compiler.
Problem: Warning from VC2015 compiler.
Solution: Add a type cast. (Mike Williams)
Files: src/gui_dwrite.cpp
@@ -6959,7 +6974,7 @@ Files: src/eval.c, src/testdir/test_viml.vim
Patch 7.4.1114 (after 7.4.1107)
Problem: delete() does not work well with symbolic links.
Solution: Recognize symbolik links.
Solution: Recognize symbolic links.
Files: src/eval.c, src/fileio.c, src/os_unix.c, src/proto/os_unix.pro,
src/testdir/test_delete.vim, runtime/doc/eval.txt
@@ -7147,7 +7162,7 @@ Solution: Move the call to gui_gtk_register_resource(). (Kazunobu Kuriyama)
Files: src/gui_gtk_x11.c
Patch 7.4.1139
Problem: MS-Windows: getftype() returns "file for symlink to directory.
Problem: MS-Windows: getftype() returns "file" for symlink to directory.
Solution: Make it return "dir". (Ken Takata)
Files: src/os_mswin.c
@@ -7184,7 +7199,7 @@ Files: src/ex_cmds.c
Patch 7.4.1145
Problem: Default features are conservative.
Solution: Make the default feature set for most of todays systems "huge".
Solution: Make the default feature set for most of today's systems "huge".
Files: src/feature.h, src/configure.in, src/auto/configure
Patch 7.4.1146
@@ -7250,7 +7265,7 @@ Files: src/json.c, src/eval.c, src/proto.h, src/structs.h, src/vim.h,
Patch 7.4.1155
Problem: Build with normal features fails.
Solution: Always deinfe dict_lookup().
Solution: Always define dict_lookup().
Files: src/eval.c
Patch 7.4.1156
@@ -7297,7 +7312,7 @@ Files: src/eval.c, src/testdir/test_viml.vim
Patch 7.4.1164
Problem: No tests for comparing special variables. Error in jsondecode()
not reported. test_json does not work Japanse system.
not reported. test_json does not work with Japanese system.
Solution: Set scriptencoding. (Ken Takata) Add a few more tests. Add error.
Files: src/json.c, src/testdir/test_viml.vim, src/testdir/test_json.vim
@@ -7356,7 +7371,7 @@ Solution: Add a test.
Files: src/testdir/test_viml.vim
Patch 7.4.1174
Problem: Netbeans contains dead code insde #ifndef INIT_SOCKETS.
Problem: Netbeans contains dead code inside #ifndef INIT_SOCKETS.
Solution: Remove the dead code.
Files: src/netbeans.c
@@ -7631,7 +7646,7 @@ Files: src/version.c, src/winclip.c, src/window.c, src/workshop.c,
Patch 7.4.1216
Problem: Still using HAVE_STDARG_H.
Solution: Assume it's always defined.
Files: src/eval.c, src/misc2.c, src/vim.h, src/proto.h, src/congifure.in,
Files: src/eval.c, src/misc2.c, src/vim.h, src/proto.h, src/configure.in,
src/auto/configure, config.h.in, src/os_amiga.h, src/os_msdos.h,
src/os_vms_conf.h, src/os_win32.h
@@ -8051,7 +8066,7 @@ Solution: Adjust the test for MS-Windows using "waittime".
Files: src/channel.c, src/testdir/test_channel.vim
Patch 7.4.1290
Problem: Coverity complains about uneccessary check for NULL.
Problem: Coverity complains about unnecessary check for NULL.
Solution: Remove the check.
Files: src/eval.c
@@ -8061,7 +8076,7 @@ Solution: Use return instead of break. (Ken Takata)
Files: src/testdir/test_channel.py
Patch 7.4.1292
Problem: Some compilers complain about uninitialzed variable, even though
Problem: Some compilers complain about uninitialized variable, even though
all possible cases are handled. (Dominique Pelle)
Solution: Add a default initialization.
Files: src/eval.c
@@ -8187,7 +8202,7 @@ Solution: Don't give an error when handling WM_NETBEANS. Re-enable tests
Files: src/gui_w48.c, src/testdir/test_channel.vim
Patch 7.4.1314
Problem: Warning for uninitialzed variable.
Problem: Warning for uninitialized variable.
Solution: Initialize it. (Dominique Pelle)
Files: src/channel.c
@@ -8334,7 +8349,7 @@ Files: src/os_unix.c
Patch 7.4.1339
Problem: Warnings when building the GUI with MingW. (Cesar Romani)
Solution: Add type cats. (Yasuhiro Matsumoto)
Solution: Add type casts. (Yasuhiro Matsumoto)
Files: src/edit.c, src/gui_w32.c, src/gui_w48.c, src/os_mswin.c,
src/os_win32.c
@@ -8374,7 +8389,7 @@ Files: src/gui_w32.c, src/gui_w48.c
Patch 7.4.1346
Problem: Compiler warnings in build with -O2.
Solution: Add inintializations.
Solution: Add initializations.
Files: src/eval.c
Patch 7.4.1347
@@ -8460,7 +8475,7 @@ Solution: Use the 1 msec waittime for all systems.
Files: src/channel.c
Patch 7.4.1362 (after 7.4.1356)
Problem: Using unitinialized value.
Problem: Using uninitialized value.
Solution: Initialize jo_set.
Files: src/eval.c
@@ -8629,7 +8644,7 @@ Solution: Make GLIB_COMPILE_RESOURCES empty instead of leaving it at "no".
Files: src/configure.in, src/auto/configure
Patch 7.4.1391
Problem: Warning for uninitialzed variable.
Problem: Warning for uninitialized variable.
Solution: Set it to zero. (Christian Brabandt)
Files: src/eval.c
@@ -8668,7 +8683,7 @@ Files: src/testdir/test_sort.vim
Patch 7.4.1398
Problem: The close-cb option is not implemented yet.
Solution: Implemente close-cb. (Yasuhiro Matsumoto)
Solution: Implement close-cb. (Yasuhiro Matsumoto)
Files: src/channel.c, src/eval.c, src/structs.h, src/proto/channel.pro,
src/testdir/test_channel.py, src/testdir/test_channel.vim
@@ -8784,7 +8799,7 @@ Solution: Put it back.
Files: appveyor.yml
Patch 7.4.1416
Problem: Using "u_char" intead of "char_u", which doesn't work everywhere.
Problem: Using "u_char" instead of "char_u", which doesn't work everywhere.
(Jörg Plate)
Solution: Use "char_u" always.
Files: src/integration.c, src/macros.h
@@ -8925,7 +8940,7 @@ Files: src/eval.c, src/channel.c, src/testdir/test_channel.vim,
runtime/doc/channel.txt, runtime/doc/eval.txt
Patch 7.4.1439 (after 7.4.1434)
Problem: Using uninitialzed variable.
Problem: Using uninitialized variable.
Solution: Initialize vc_type.
Files: src/json.c
@@ -9040,7 +9055,7 @@ Solution: Use previous method for WIN32.
Files: src/channel.c
Patch 7.4.1460
Problem: Syntax error in rarily used code.
Problem: Syntax error in rarely used code.
Solution: Fix the mch_rename() declaration. (Ken Takata)
Files: src/os_unix.c, src/proto/os_unix.pro
@@ -9051,7 +9066,7 @@ Solution: Only use quotes when needed. (Yasuhiro Matsumoto)
Files: src/eval.c
Patch 7.4.1462
Problem: Two more rarily used functions with errors.
Problem: Two more rarely used functions with errors.
Solution: Add proper argument types. (Dominique Pelle)
Files: src/misc2.c, src/termlib.c
@@ -9121,7 +9136,7 @@ Files: src/eval.c
Patch 7.4.1475
Problem: When using hangulinput with utf-8 a CSI character is
misintepreted.
misinterpreted.
Solution: Convert CSI to K_CSI. (SungHyun Nam)
Files: src/ui.c
@@ -9148,7 +9163,7 @@ Files: src/ex_cmds2.c, src/testdir/test_loadplugin.vim,
src/testdir/Make_all.mak
Patch 7.4.1480
Problem: Cannot add a pack direcory without loading a plugin.
Problem: Cannot add a pack directory without loading a plugin.
Solution: Add the :packadd command.
Files: src/ex_cmds.h, src/ex_cmds2.c, src/proto/ex_cmds2.pro,
src/testdir/test_loadplugin.vim, runtime/doc/repeat.txt
@@ -9426,7 +9441,7 @@ Solution: Close hThread on the process info. (Ken Takata)
Files: src/os_win32.c
Patch 7.4.1531
Problem: Compiler warning for unitinialized variable. (Dominique Pelle)
Problem: Compiler warning for uninitialized variable. (Dominique Pelle)
Solution: Always give the variable a value.
Files: src/channel.c
@@ -9658,7 +9673,7 @@ Files: runtime/doc/options.txt, src/buffer.c, src/ex_cmds.c,
Patch 7.4.1571
Problem: No test for ":help".
Solution: Add a test for what 7.4.1568 fixed. (Higashi Higashi)
Solution: Add a test for what 7.4.1568 fixed. (Hirohito Higashi)
Files: src/testdir/test_alot.vim, src/testdir/test_help_tagjump.vim
Patch 7.4.1572
@@ -9727,7 +9742,7 @@ Solution: Translate the function name. Use dict arg if present.
Files: src/eval.c, src/testdir/test_partial.vim
Patch 7.4.1583
Problem: Warning for unitinialized variable.
Problem: Warning for uninitialized variable.
Solution: Initialize it. (Dominique)
Files: src/ex_cmds2.c
@@ -9890,11 +9905,11 @@ Files: Filelist, Contents, READMEdir/Contents
Patch 7.4.1610
Problem: Compiler warnings for non-virtual destructor.
Solution: Mark the classe final. (Ken Takata)
Solution: Mark the classes final. (Ken Takata)
Files: src/Make_cyg_ming.mak, src/gui_dwrite.cpp, src/if_ole.cpp
Patch 7.4.1611
Problem: The versplit feature makes the code uneccessary complicated.
Problem: The versplit feature makes the code unnecessary complicated.
Solution: Remove FEAT_VERTSPLIT, always support vertical splits when
FEAT_WINDOWS is defined.
Files: src/buffer.c, src/charset.c, src/eval.c, src/ex_cmds.c,
@@ -10064,7 +10079,7 @@ Files: src/eval.c
Patch 7.4.1640
Problem: Crash when an autocommand changes a quickfix list. (Dominique)
Solution: Check wether an entry is still valid. (Yegappan Lakshmanan,
Solution: Check whether an entry is still valid. (Yegappan Lakshmanan,
Hirohito Higashi)
Files: src/quickfix.c, src/testdir/test_quickfix.vim
@@ -10088,7 +10103,7 @@ Patch 7.4.1644
Problem: Using string() on a partial that exists in the dictionary it binds
results in an error. (Nikolai Pavlov)
Solution: Make string() not fail on a recursively nested structure. (Ken
Takta)
Takata)
Files: src/eval.c, src/testdir/test_partial.vim
Patch 7.4.1645
@@ -10609,7 +10624,7 @@ Files: src/configure.in, src/auto/configure, src/config.mk.in,
Patch 7.4.1734 (after 7.4.1730)
Problem: Test fails when not using utf-8.
Solution: Split test in regularand utf-8 part.
Solution: Split test in regular and utf-8 part.
Files: src/testdir/test_expr.vim, src/testdir/test_expr_utf8.vim,
src/testdir/test_alot_utf8.vim
@@ -10664,7 +10679,7 @@ Solution: use mb_cptr2len(). Add a test. (Naruhiko Nishino)
Files: src/eval.c, src/testdir/test_expr_utf8.vim
Patch 7.4.1743
Problem: Clang warns for uninitialzed variable. (Michael Jarvis)
Problem: Clang warns for uninitialized variable. (Michael Jarvis)
Solution: Initialize it.
Files: src/if_py_both.h
@@ -10869,7 +10884,7 @@ Files: src/term.c
Patch 7.4.1779
Problem: Using negative index in strcharpart(). (Yegappan Lakshmanan)
Solution: Assume single byte when using a negative iindex.
Solution: Assume single byte when using a negative index.
Files: src/eval.c
Patch 7.4.1780
@@ -10880,7 +10895,7 @@ Files: src/ex_cmds2.c, src/json.c, src/misc1.c, src/ops.c,
Patch 7.4.1781
Problem: synIDattr() does not respect 'guicolors'.
Solution: Change the conditition for the mode. (Christian Brabandt)
Solution: Change the condition for the mode. (Christian Brabandt)
Files: src/eval.c
Patch 7.4.1782
@@ -11233,7 +11248,7 @@ Files: runtime/doc/if_pyth.txt, src/if_py_both.h, src/testdir/test86.in,
Patch 7.4.1844
Problem: Using old function name in comment. More functions should start
with test_.
Solution: Rename function in comment. (Higashi Higashi) Rename
Solution: Rename function in comment. (Hirohito Higashi) Rename
disable_char_avail_for_testing() to test_disable_char_avail().
And alloc_fail() to test_alloc_fail().
Files: src/eval.c, src/getchar.c, src/testdir/runtest.vim,
@@ -11293,7 +11308,7 @@ Patch 7.4.1854
Problem: When setting 'termguicolors' the Ignore highlighting doesn't work.
(Charles Campbell)
Solution: Handle the color names "fg" and "bg" when the GUI isn't running
and no colors are speficied, fall back to black and white.
and no colors are specified, fall back to black and white.
Files: src/syntax.c
Patch 7.4.1855
@@ -11340,7 +11355,7 @@ Files: src/ex_cmds2.c
Patch 7.4.1862
Problem: string() with repeated argument does not give a result usable by
eval().
Solution: Refactor echo_striong and tv2string(), moving the common part to
Solution: Refactor echo_string and tv2string(), moving the common part to
echo_string_core(). (Ken Takata)
Files: src/eval.c, src/testdir/test_viml.vim, src/testdir/test86.ok,
src/testdir/test87.ok
@@ -11356,7 +11371,7 @@ Solution: Use "getcwdu" instead of "getcwd". (Ken Takata)
Files: src/if_py_both.h
Patch 7.4.1865
Problem: Memory leaks in tet49. (Dominique Pelle)
Problem: Memory leaks in test49. (Dominique Pelle)
Solution: Use NULL instead of an empty string.
Files: src/eval.c
@@ -11431,7 +11446,7 @@ Patch 7.4.1878
Problem: Whether a job has exited isn't detected until a character is
typed. After calling exit_cb the cursor is in the wrong place.
Solution: Don't wait forever for a character to be typed when there is a
pending job. Update the screen if neede after calling exit_cb.
pending job. Update the screen if needed after calling exit_cb.
Files: src/os_unix.c, src/channel.c, src/proto/channel.pro
Patch 7.4.1879 (after 7.4.1877)
@@ -11605,7 +11620,7 @@ Solution: Change type to size_t. (Mike Williams)
Files: src/ex_cmds.c
Patch 7.4.1908
Problem: Netbeans uses uninitialzed pointer and freed memory.
Problem: Netbeans uses uninitialized pointer and freed memory.
Solution: Set "buffer" at the right place (hint by Ken Takata)
Files: src/netbeans.c
@@ -11742,7 +11757,7 @@ Solution: Merge based on timestamp.
Files: src/mark.c, src/testdir/test_viminfo.vim
Patch 7.4.1933
Problem: Compiler warning about uninitialzed variable. (Yegappan)
Problem: Compiler warning about uninitialized variable. (Yegappan)
Solution: Give it a dummy value.
Files: src/ex_getln.c

View File

@@ -1,4 +1,4 @@
*windows.txt* For Vim version 7.4. Last change: 2016 Jun 10
*windows.txt* For Vim version 7.4. Last change: 2016 Jul 30
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -255,7 +255,7 @@ window will appear.
far left and occupies the full height of the Vim window.
Doesn't work for |:execute| and |:normal|.
*:botright*
*:bo* *:botright*
:bo[tright] {cmd}
Execute {cmd}. If it contains a command that splits a window,
it will appear at the bottom and occupy the full width of the

View File

@@ -1,7 +1,7 @@
" Vim syntax file
" Language: php PHP 3/4/5
" Language: php PHP 3/4/5/7
" Maintainer: Jason Woofenden <jason@jasonwoof.com>
" Last Change: Apr 18, 2016
" Last Change: Jul 27, 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>
@@ -377,29 +377,29 @@ syn keyword phpTodo todo fixme xxx contained
" Comment
if exists("php_parent_error_open")
syn region phpComment start="/\*" end="\*/" contained contains=phpTodo
syn region phpComment start="/\*" end="\*/" contained contains=phpTodo,@Spell
else
syn region phpComment start="/\*" end="\*/" contained contains=phpTodo extend
syn region phpComment start="/\*" end="\*/" contained contains=phpTodo,@Spell extend
endif
if version >= 600
syn match phpComment "#.\{-}\(?>\|$\)\@=" contained contains=phpTodo
syn match phpComment "//.\{-}\(?>\|$\)\@=" contained contains=phpTodo
syn match phpComment "#.\{-}\(?>\|$\)\@=" contained contains=phpTodo,@Spell
syn match phpComment "//.\{-}\(?>\|$\)\@=" contained contains=phpTodo,@Spell
else
syn match phpComment "#.\{-}$" contained contains=phpTodo
syn match phpComment "#.\{-}?>"me=e-2 contained contains=phpTodo
syn match phpComment "//.\{-}$" contained contains=phpTodo
syn match phpComment "//.\{-}?>"me=e-2 contained contains=phpTodo
syn match phpComment "#.\{-}$" contained contains=phpTodo,@Spell
syn match phpComment "#.\{-}?>"me=e-2 contained contains=phpTodo,@Spell
syn match phpComment "//.\{-}$" contained contains=phpTodo,@Spell
syn match phpComment "//.\{-}?>"me=e-2 contained contains=phpTodo,@Spell
endif
" String
if exists("php_parent_error_open")
syn region phpStringDouble matchgroup=phpStringDouble start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@phpAddStrings,phpBackslashSequences,phpBackslashDoubleQuote,@phpInterpDouble contained keepend
syn region phpStringDouble matchgroup=phpStringDouble start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@phpAddStrings,phpBackslashSequences,phpBackslashDoubleQuote,@phpInterpDouble,@Spell contained keepend
syn region phpBacktick matchgroup=phpBacktick start=+`+ skip=+\\\\\|\\"+ end=+`+ contains=@phpAddStrings,phpIdentifier,phpBackslashSequences,phpIdentifierSimply,phpIdentifierComplex contained keepend
syn region phpStringSingle matchgroup=phpStringSingle start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@phpAddStrings,phpBackslashSingleQuote contained keepend
syn region phpStringSingle matchgroup=phpStringSingle start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@phpAddStrings,phpBackslashSingleQuote,@Spell contained keepend
else
syn region phpStringDouble matchgroup=phpStringDouble start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@phpAddStrings,phpBackslashSequences,phpBackslashDoubleQuote,@phpInterpDouble contained extend keepend
syn region phpStringDouble matchgroup=phpStringDouble start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@phpAddStrings,phpBackslashSequences,phpBackslashDoubleQuote,@phpInterpDouble,@Spell contained extend keepend
syn region phpBacktick matchgroup=phpBacktick start=+`+ skip=+\\\\\|\\"+ end=+`+ contains=@phpAddStrings,phpIdentifier,phpBackslashSequences,phpIdentifierSimply,phpIdentifierComplex contained extend keepend
syn region phpStringSingle matchgroup=phpStringSingle start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@phpAddStrings,phpBackslashSingleQuote contained keepend extend
syn region phpStringSingle matchgroup=phpStringSingle start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@phpAddStrings,phpBackslashSingleQuote,@Spell contained keepend extend
endif
" HereDoc and NowDoc
@@ -407,18 +407,18 @@ if version >= 600
syn case match
" HereDoc
syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\I\i*\)\2$" end="^\z1\(;\=$\)\@=" contained contains=phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar keepend extend
syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\I\i*\)\2$" end="^\z1\(;\=$\)\@=" contained contains=phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar,@Spell keepend extend
" including HTML,JavaScript,SQL even if not enabled via options
syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)\2$" end="^\z1\(;\=$\)\@=" contained contains=@htmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar keepend extend
syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)\2$" end="^\z1\(;\=$\)\@=" contained contains=@sqlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar keepend extend
syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)\2$" end="^\z1\(;\=$\)\@=" contained contains=@htmlJavascript,phpIdentifierSimply,phpIdentifier,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar keepend extend
syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)\2$" end="^\z1\(;\=$\)\@=" contained contains=@htmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar,@Spell keepend extend
syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)\2$" end="^\z1\(;\=$\)\@=" contained contains=@sqlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar,@Spell keepend extend
syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)\2$" end="^\z1\(;\=$\)\@=" contained contains=@htmlJavascript,phpIdentifierSimply,phpIdentifier,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar,@Spell keepend extend
" NowDoc
syn region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\I\i*\)'$" end="^\z1\(;\=$\)\@=" contained keepend extend
syn region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\I\i*\)'$" end="^\z1\(;\=$\)\@=" contained contains=@Spell keepend extend
" including HTML,JavaScript,SQL even if not enabled via options
syn region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)'$" end="^\z1\(;\=$\)\@=" contained contains=@htmlTop keepend extend
syn region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)'$" end="^\z1\(;\=$\)\@=" contained contains=@sqlTop keepend extend
syn region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)'$" end="^\z1\(;\=$\)\@=" contained contains=@htmlJavascript keepend extend
syn region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)'$" end="^\z1\(;\=$\)\@=" contained contains=@htmlTop,@Spell keepend extend
syn region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)'$" end="^\z1\(;\=$\)\@=" contained contains=@sqlTop,@Spell keepend extend
syn region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)'$" end="^\z1\(;\=$\)\@=" contained contains=@htmlJavascript,@Spell keepend extend
syn case ignore
endif

View File

@@ -2,8 +2,8 @@
" 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: Jun 10, 2016
" Version: 152
" Last Change: Jul 29, 2016
" Version: 155
" 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)
@@ -131,11 +131,11 @@ syn cluster shArithParenList contains=shArithmetic,shCaseEsac,shComment,shDeref,
syn cluster shArithList contains=@shArithParenList,shParenError
syn cluster shCaseEsacList contains=shCaseStart,shCase,shCaseBar,shCaseIn,shComment,shDeref,shDerefSimple,shCaseCommandSub,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote,shCtrlSeq,@shErrorList,shStringSpecial,shCaseRange
syn cluster shCaseList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq
syn cluster shCommandSubList contains=shAlias,shArithmetic,shComment,shCmdParenRegion,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shEcho,shEscape,shExDoubleQuote,shExpr,shExSingleQuote,shNumber,shOperator,shOption,shPosnParm,shSingleQuote,shSpecial,shStatement,shSubSh,shTest,shVariable
syn cluster shCommandSubList contains=shAlias,shArithmetic,shComment,shCmdParenRegion,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shEcho,shEscape,shExDoubleQuote,shExpr,shExSingleQuote,shHereDoc,shNumber,shOperator,shOption,shPosnParm,shSingleQuote,shSpecial,shStatement,shSubSh,shTest,shVariable
syn cluster shCurlyList contains=shNumber,shComma,shDeref,shDerefSimple,shDerefSpecial
syn cluster shDblQuoteList contains=shCommandSub,shDeref,shDerefSimple,shEscape,shPosnParm,shCtrlSeq,shSpecial
syn cluster shDerefList contains=shDeref,shDerefSimple,shDerefVar,shDerefSpecial,shDerefWordError,shDerefPSR,shDerefPPS
syn cluster shDerefVarList contains=shDerefOp,shDerefVarArray,shDerefOpError
syn cluster shDerefVarList contains=shDerefOff,shDerefOp,shDerefVarArray,shDerefOpError
syn cluster shEchoList contains=shArithmetic,shCommandSub,shDeref,shDerefSimple,shEscape,shExpr,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shCtrlSeq,shEchoQuote
syn cluster shExprList1 contains=shCharClass,shNumber,shOperator,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shDblBrace,shDeref,shDerefSimple,shCtrlSeq
syn cluster shExprList2 contains=@shExprList1,@shCaseList,shTest
@@ -332,7 +332,7 @@ endif
" String And Character Constants: {{{1
"================================
syn match shNumber "\<\d\+\>#\="
syn match shNumber "-\=\.\=\d\+\>#\="
syn match shNumber "\<-\=\.\=\d\+\>#\="
syn match shCtrlSeq "\\\d\d\d\|\\[abcfnrtv0]" contained
if exists("b:is_bash")
syn match shSpecial "[^\\]\(\\\\\)*\zs\\\o\o\o\|\\x\x\x\|\\c[^"]\|\\[abefnrtv]" contained
@@ -366,21 +366,21 @@ syn match shQuickComment contained "#.*$"
" Here Documents: {{{1
" =========================================
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*$"
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
" =============
@@ -427,7 +427,7 @@ endif
if !exists("g:sh_no_error")
syn match shDerefWordError "[^}$[~]" contained
endif
syn match shDerefSimple "\$\%(\k\+\|\d\)"
syn match shDerefSimple "\$\%(\h\w*\|\d\)"
syn region shDeref matchgroup=PreProc start="\${" end="}" contains=@shDerefList,shDerefVarArray
syn match shDerefSimple "\$[-#*@!?]"
syn match shDerefSimple "\$\$"
@@ -445,18 +445,18 @@ endif
" bash: ${!prefix*} and ${#parameter}: {{{1
" ====================================
if exists("b:is_bash")
syn region shDeref matchgroup=PreProc start="\${!" end="\*\=}" contains=@shDerefList,shDerefOp
syn match shDerefVar contained "{\@<=!\k\+" nextgroup=@shDerefVarList
syn region shDeref matchgroup=PreProc start="\${!" end="\*\=}" contains=@shDerefList,shDerefOff
syn match shDerefVar contained "{\@<=!\h\w*" nextgroup=@shDerefVarList
endif
if exists("b:is_kornshell")
syn match shDerefVar contained "{\@<=!\k[[:alnum:]_.]*" nextgroup=@shDerefVarList
syn match shDerefVar contained "{\@<=!\h\w*[[:alnum:]_.]*" nextgroup=@shDerefVarList
endif
syn match shDerefSpecial contained "{\@<=[-*@?0]" nextgroup=shDerefOp,shDerefOpError
syn match shDerefSpecial contained "\({[#!]\)\@<=[[:alnum:]*@_]\+" nextgroup=@shDerefVarList,shDerefOp
syn match shDerefVar contained "{\@<=\k\+" nextgroup=@shDerefVarList
syn match shDerefVar contained "{\@<=\h\w*" nextgroup=@shDerefVarList
if exists("b:is_kornshell")
syn match shDerefVar contained "{\@<=\k[[:alnum:]_.]*" nextgroup=@shDerefVarList
syn match shDerefVar contained "{\@<=\h\w*[[:alnum:]_.]*" nextgroup=@shDerefVarList
endif
" sh ksh bash : ${var[... ]...} array reference: {{{1
@@ -498,8 +498,9 @@ syn match shDerefString contained "\\["']" nextgroup=shDerefPattern
if exists("b:is_bash")
" bash : ${parameter:offset}
" bash : ${parameter:offset:length}
syn region shDerefOp contained start=":[$[:alnum:]_]"me=e-1 end=":"me=e-1 end="}"me=e-1 contains=@shCommandSubList nextgroup=shDerefPOL
syn match shDerefPOL contained ":[^}]\+" contains=@shCommandSubList
syn region shDerefOff contained start=':' end='\ze:' end='\ze}' contains=shDeref,shDerefSimple nextgroup=shDerefLen,shDeref,shDerefSimple
syn region shDerefOff contained start=':\s-' end='\ze:' end='\ze}' contains=shDeref,shDerefSimple nextgroup=shDerefLen,shDeref,shDerefSimple
syn match shDerefLen contained ":[^}]\+" contains=shDeref,shDerefSimple
" bash : ${parameter//pattern/string}
" bash : ${parameter//pattern}
@@ -636,6 +637,8 @@ if exists("b:is_bash")
hi def link bashSpecialVariables shShellVariables
hi def link bashStatement shStatement
hi def link shCharClass shSpecial
hi def link shDerefOff shDerefOp
hi def link shDerefLen shDerefOff
endif
if exists("b:is_kornshell")
hi def link kshSpecialVariables shShellVariables

View File

@@ -1,8 +1,8 @@
" Vim syntax file
" Language: TeX
" Maintainer: Charles E. Campbell <NdrchipO@ScampbellPfamily.AbizM>
" Last Change: Jun 17, 2016
" Version: 97
" Last Change: Jul 05, 2016
" Version: 98
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX
"
" Notes: {{{1
@@ -132,14 +132,20 @@ endif
" One may override this iskeyword setting by providing
" g:tex_isk
if exists("g:tex_isk")
exe "setlocal isk=".g:tex_isk
elseif !has("patch-7.4.1142")
setl isk=48-57,a-z,A-Z,192-255
if b:tex_stylish && g:tex_isk !~ '@'
let b:tex_isk= '@,'.g:tex_isk
else
let b:tex_isk= g:tex_isk
endif
elseif b:tex_stylish
let b:tex_isk="@,48-57,a-z,A-Z,192-255"
else
syn iskeyword 48-57,a-z,A-Z,192-255
let b:tex_isk="48-57,a-z,A-Z,192-255"
endif
if b:tex_stylish
setlocal isk+=@-@
if v:version > 704 || (v:version == 704 && has("patch-7.4.1142"))
exe "syn iskeyword ".b:tex_isk
else
exe "setl isk=".b:tex_isk
endif
if exists("g:tex_no_error") && g:tex_no_error
let s:tex_no_error= 1
@@ -159,7 +165,7 @@ endif
" Clusters: {{{1
" --------
syn cluster texCmdGroup contains=texCmdBody,texComment,texDefParm,texDelimiter,texDocType,texInput,texLength,texLigature,texMathDelim,texMathOper,texNewCmd,texNewEnv,texRefZone,texSection,texBeginEnd,texBeginEndName,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle
syn cluster texCmdGroup contains=texCmdBody,texComment,texDefParm,texDelimiter,texDocType,texInput,texLength,texLigature,texMathDelim,texMathOper,texNewCmd,texNewEnv,texRefZone,texSection,texBeginEnd,texBeginEndName,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,@texMathZones
if !s:tex_no_error
syn cluster texCmdGroup add=texMathError
endif
@@ -447,9 +453,8 @@ if !exists("g:tex_no_math")
call TexNewMathZone("G","gather",1)
call TexNewMathZone("H","math",1)
call TexNewMathZone("I","multline",1)
call TexNewMathZone("J","subequations",0)
call TexNewMathZone("K","xalignat",1)
call TexNewMathZone("L","xxalignat",0)
call TexNewMathZone("J","xalignat",1)
call TexNewMathZone("K","xxalignat",0)
" Inline Math Zones: {{{2
if s:tex_fast =~# 'M'
@@ -481,8 +486,9 @@ if !exists("g:tex_no_math")
" \left..something.. and \right..something.. support: {{{2
syn match texMathDelimBad contained "\S"
if has("conceal") && &enc == 'utf-8' && s:tex_conceal =~# 'm'
syn match texMathDelim contained "\\left\\{\>" skipwhite nextgroup=texMathDelimSet1,texMathDelimSet2,texMathDelimBad contains=texMathSymbol cchar={
syn match texMathDelim contained "\\right\\}\>" skipwhite nextgroup=texMathDelimSet1,texMathDelimSet2,texMathDelimBad contains=texMathSymbol cchar=}
syn match texMathDelim contained "\\left\["
syn match texMathDelim contained "\\left\\{" skipwhite nextgroup=texMathDelimSet1,texMathDelimSet2,texMathDelimBad contains=texMathSymbol cchar={
syn match texMathDelim contained "\\right\\}" skipwhite nextgroup=texMathDelimSet1,texMathDelimSet2,texMathDelimBad contains=texMathSymbol cchar=}
let s:texMathDelimList=[
\ ['<' , '<'] ,
\ ['>' , '>'] ,

View File

@@ -1,8 +1,8 @@
" Vim syntax file
" Language: Vim 7.4 script
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
" Last Change: May 02, 2016
" Version: 7.4-50
" Last Change: July 11, 2016
" Version: 7.4-51
" Automatically generated keyword lists: {{{1
" Quit when a syntax file was already loaded {{{2
@@ -18,12 +18,12 @@ syn keyword vimTodo contained COMBAK FIXME TODO XXX
syn cluster vimCommentGroup contains=vimTodo,@Spell
" regular vim commands {{{2
syn keyword vimCommand contained a arga[dd] argu[ment] bad[d] bn[ext] breakd[el] bw[ipeout] cadde[xpr] ccl[ose] cfdo chd[ir] cmapc[lear] colo[rscheme] cope[n] cscope debugg[reedy] deletl dep diffpu[t] dl ds[earch] echoe[rr] en[dif] ex filetype fo[ld] fu[nction] gvim helpt[ags] iabc[lear] intro ju[mps] keepj[umps] la[st] lat lcl[ose] lefta[bove] lg[etfile] lh[elpgrep] lmapc[lear] loadk lop[en] lt[ag] lvimgrepa[dd] marks mk[exrc] mod[e] nbc[lose] noautocmd nu[mber] opt[ions] pc[lose] popu[p] prof[ile] ptN[ext] ptn[ext] pw[d] pyf[ile] r[ead] redraws[tatus] rew[ind] rubyd[o] sIc sIp san[dbox] sbf[irst] sbr[ewind] sci scs setl[ocal] sgc sgp sie sin sm[agic] sn[ext] sor[t] spellr[epall] srI srl star[tinsert] sts[elect] sv[iew] syncbind tab tabf[ind] tabnew tags tf[irst] tn[ext] ts[elect] undol[ist] up[date] vi[sual] vmapc[lear] wa[ll] winp[os] ws[verb] xmapc[lear] xprop
syn keyword vimCommand contained ab argd[elete] as[cii] bd[elete] bo[tright] breakl[ist] cN[ext] caddf[ile] cd cfir[st] che[ckpath] cn[ext] com cp[revious] cstag delc[ommand] deletp di[splay] diffs[plit] dli[st] dsp[lit] echom[sg] endf[unction] exi[t] fin[d] foldc[lose] g h[elp] hi if is[earch] k keepp[atterns] lad[dexpr] later lcs lex[pr] lgetb[uffer] ll lne[xt] loadkeymap lp[revious] lua lw[indow] mat[ch] mks[ession] mz[scheme] nbs[tart] noh[lsearch] o[pen] ownsyntax pe[rl] pp[op] profd[el] pta[g] ptp[revious] py3 python3 rec[over] reg[isters] ri[ght] rubyf[ile] sIe sIr sav[eas] sbl[ast] sc scl scscope sf[ind] sge sgr sig sip sm[ap] sno[magic] sp[lit] spellu[ndo] src srn startg[replace] sun[hide] sw[apname] syntime tabN[ext] tabfir[st] tabo[nly] tc[l] th[row] to[pleft] tu[nmenu] unh[ide] v vie[w] vne[w] wh[ile] wn[ext] wundo xme xunme
syn keyword vimCommand contained abc[lear] argdo au bel[owright] bp[revious] bro[wse] cNf[ile] cal[l] cdo cg[etfile] checkt[ime] cnew[er] comc[lear] cpf[ile] cuna[bbrev] delel delf[unction] dif[fupdate] difft[his] do e[dit] echon endfo[r] exu[sage] fina[lly] foldd[oopen] go[to] ha[rdcopy] hid[e] ij[ump] isp[lit] kee[pmarks] lN[ext] laddb[uffer] lb[uffer] lcscope lf[ile] lgete[xpr] lla[st] lnew[er] loc[kmarks] lpf[ile] luado m[ove] menut[ranslate] mksp[ell] mzf[ile] new nor ol[dfiles] p[rint] ped[it] pre[serve] promptf[ind] ptf[irst] ptr[ewind] py3do q[uit] red[o] res[ize] rightb[elow] rundo sIg sN[ext] sbN[ext] sbm[odified] scI scp se[t] sfir[st] sgi sh[ell] sign sir sme snoreme spe[llgood] spellw[rong] sre[wind] srp startr[eplace] sunme sy t tabc[lose] tabl[ast] tabp[revious] tcld[o] tj[ump] tp[revious] u[ndo] unl ve[rsion] vim[grep] vs[plit] win[size] wp[revious] wv[iminfo] xmenu xunmenu
syn keyword vimCommand contained abo[veleft] arge[dit] bN[ext] bf[irst] br[ewind] bufdo c[hange] cat[ch] ce[nter] cgetb[uffer] cl[ist] cnf[ile] comp[iler] cq[uit] cw[indow] delep dell diffg[et] dig[raphs] doau ea el[se] endt[ry] f[ile] fini[sh] folddoc[losed] gr[ep] helpc[lose] his[tory] il[ist] iuna[bbrev] keepa lNf[ile] laddf[ile] lc[d] ld[o] lfdo lgr[ep] lli[st] lnf[ile] lockv[ar] lr[ewind] luafile ma[rk] mes mkv[imrc] n[ext] nmapc[lear] nore omapc[lear] pa[ckadd] perld[o] prev[ious] promptr[epl] ptj[ump] pts[elect] py[thon] qa[ll] redi[r] ret[ab] ru[ntime] rv[iminfo] sIl sa[rgument] sb[uffer] sbn[ext] sce scr[iptnames] setf[iletype] sg sgl si sil[ent] sl[eep] smenu snoremenu spelld[ump] spr[evious] srg st[op] stj[ump] sunmenu syn tN[ext] tabd[o] tabm[ove] tabr[ewind] tclf[ile] tl[ast] tr[ewind] una[bbreviate] unlo[ckvar] verb[ose] vimgrepa[dd] wN[ext] winc[md] wq x[it] xnoreme xwininfo
syn keyword vimCommand contained al[l] argg[lobal] b[uffer] bl[ast] brea[k] buffers cabc[lear] cb[uffer] cex[pr] cgete[xpr] cla[st] co[py] con[tinue] cr[ewind] d[elete] deletel delm[arks] diffo[ff] dir dp earlier elsei[f] endw[hile] files fir[st] foldo[pen] grepa[dd] helpf[ind] i imapc[lear] j[oin] keepalt l[ist] lan[guage] lch[dir] le[ft] lfir[st] lgrepa[dd] lmak[e] lo[adview] lol[der] ls lv[imgrep] mak[e] messages mkvie[w] nb[key] noa nos[wapfile] on[ly] packl[oadall] po[p] pro ps[earch] ptl[ast] pu[t] pydo quita[ll] redr[aw] retu[rn] rub[y] sI sIn sal[l] sba[ll] sbp[revious] scg scripte[ncoding] setg[lobal] sgI sgn sic sim[alt] sla[st] smile so[urce] spelli[nfo] sr sri sta[g] stopi[nsert] sus[pend] sync ta[g] tabe[dit] tabn[ext] tabs te[aroff] tm[enu] try undoj[oin] uns[ilent] vert[ical] viu[sage] w[rite] windo wqa[ll] xa[ll] xnoremenu y[ank]
syn keyword vimCommand contained ar[gs] argl[ocal] ba[ll] bm[odified] breaka[dd] bun[load] cad[dbuffer] cc cf[ile] changes clo[se] col[der] conf[irm] cs debug deletep delp diffp[atch] dj[ump] dr[op] ec em[enu] ene[w] filet fix[del] for gui helpg[rep] ia in
syn keyword vimCommand contained a arga[dd] argu[ment] bad[d] bn[ext] breakd[el] bw[ipeout] cadde[xpr] ccl[ose] cfdo chd[ir] clo[se] col[der] conf[irm] cs debug deletep delp diffp[atch] dj[ump] dr[op] ec em[enu] ene[w] filet fix[del] for gui helpg[rep] ia in ju[mps] keepj[umps] la[st] lat lcl[ose] lefta[bove] lg[etfile] lh[elpgrep] lmapc[lear] loadk lop[en] lt[ag] lvimgrepa[dd] marks mk[exrc] mod[e] nbc[lose] noautocmd nu[mber] opt[ions] pc[lose] popu[p] prof[ile] ptN[ext] ptn[ext] pw[d] pyf[ile] r[ead] redraws[tatus] rew[ind] rubyd[o] sIc sIp san[dbox] sbf[irst] sbr[ewind] sci scs setl[ocal] sgc sgp sie sin sm[agic] sn[ext] sor[t] spellr[epall] srI srl star[tinsert] sts[elect] sv[iew] syncbind tab tabf[ind] tabnew tags tf[irst] tn[ext] ts[elect] undol[ist] up[date] vi[sual] vmapc[lear] wa[ll] winp[os] ws[verb] xmapc[lear] xprop
syn keyword vimCommand contained ab argd[elete] as[cii] bd[elete] bo[tright] breakl[ist] cN[ext] caddf[ile] cd cfir[st] che[ckpath] cmapc[lear] colo[rscheme] cope[n] cscope debugg[reedy] deletl dep diffpu[t] dl ds[earch] echoe[rr] en[dif] ex filetype fo[ld] fu[nction] gvim helpt[ags] iabc[lear] intro k keepp[atterns] lad[dexpr] later lcs lex[pr] lgetb[uffer] ll lne[xt] loadkeymap lp[revious] lua lw[indow] mat[ch] mks[ession] mz[scheme] nbs[tart] noh[lsearch] o[pen] ownsyntax pe[rl] pp[op] profd[el] pta[g] ptp[revious] py3 python3 rec[over] reg[isters] ri[ght] rubyf[ile] sIe sIr sav[eas] sbl[ast] sc scl scscope sf[ind] sge sgr sig sip sm[ap] sno[magic] sp[lit] spellu[ndo] src srn startg[replace] sun[hide] sw[apname] syntime tabN[ext] tabfir[st] tabo[nly] tc[l] th[row] to[pleft] tu[nmenu] unh[ide] v vie[w] vne[w] wh[ile] wn[ext] wundo xme xunme
syn keyword vimCommand contained abc[lear] argdo au bel[owright] bp[revious] bro[wse] cNf[ile] cal[l] cdo cg[etfile] checkt[ime] cn[ext] com cp[revious] cstag delc[ommand] deletp di[splay] diffs[plit] dli[st] dsp[lit] echom[sg] endf[unction] exi[t] fin[d] foldc[lose] g h[elp] hi if is[earch] kee[pmarks] lN[ext] laddb[uffer] lb[uffer] lcscope lf[ile] lgete[xpr] lla[st] lnew[er] loc[kmarks] lpf[ile] luado m[ove] menut[ranslate] mksp[ell] mzf[ile] new nor ol[dfiles] p[rint] ped[it] pre[serve] promptf[ind] ptf[irst] ptr[ewind] py3do q[uit] red[o] res[ize] rightb[elow] rundo sIg sN[ext] sbN[ext] sbm[odified] scI scp se[t] sfir[st] sgi sh[ell] sign sir sme snoreme spe[llgood] spellw[rong] sre[wind] srp startr[eplace] sunme sy t tabc[lose] tabl[ast] tabp[revious] tcld[o] tj[ump] tp[revious] u[ndo] unl ve[rsion] vim[grep] vs[plit] win[size] wp[revious] wv[iminfo] xmenu xunmenu
syn keyword vimCommand contained abo[veleft] arge[dit] bN[ext] bf[irst] br[ewind] bufdo c[hange] cat[ch] ce[nter] cgetb[uffer] cl[ist] cnew[er] comc[lear] cpf[ile] cuna[bbrev] delel delf[unction] dif[fupdate] difft[his] do e[dit] echon endfo[r] exu[sage] fina[lly] foldd[oopen] go[to] ha[rdcopy] hid[e] ij[ump] isp[lit] keepa lNf[ile] laddf[ile] lc[d] ld[o] lfdo lgr[ep] lli[st] lnf[ile] lockv[ar] lr[ewind] luafile ma[rk] mes mkv[imrc] n[ext] nmapc[lear] nore omapc[lear] pa[ckadd] perld[o] prev[ious] promptr[epl] ptj[ump] pts[elect] py[thon] qa[ll] redi[r] ret[ab] ru[ntime] rv[iminfo] sIl sa[rgument] sb[uffer] sbn[ext] sce scr[iptnames] setf[iletype] sg sgl si sil[ent] sl[eep] smenu snoremenu spelld[ump] spr[evious] srg st[op] stj[ump] sunmenu syn tN[ext] tabd[o] tabm[ove] tabr[ewind] tclf[ile] tl[ast] tr[ewind] una[bbreviate] unlo[ckvar] verb[ose] vimgrepa[dd] wN[ext] winc[md] wq x[it] xnoreme xwininfo
syn keyword vimCommand contained al[l] argg[lobal] b[uffer] bl[ast] brea[k] buffers cabc[lear] cb[uffer] cex[pr] cgete[xpr] cla[st] cnf[ile] comp[iler] cq[uit] cw[indow] delep dell diffg[et] dig[raphs] doau ea el[se] endt[ry] f[ile] fini[sh] folddoc[losed] gr[ep] helpc[lose] his[tory] il[ist] iuna[bbrev] keepalt l[ist] lan[guage] lch[dir] le[ft] lfir[st] lgrepa[dd] lmak[e] lo[adview] lol[der] ls lv[imgrep] mak[e] messages mkvie[w] nb[key] noa nos[wapfile] on[ly] packl[oadall] po[p] pro ps[earch] ptl[ast] pu[t] pydo quita[ll] redr[aw] retu[rn] rub[y] sI sIn sal[l] sba[ll] sbp[revious] scg scripte[ncoding] setg[lobal] sgI sgn sic sim[alt] sla[st] smile so[urce] spelli[nfo] sr sri sta[g] stopi[nsert] sus[pend] sync ta[g] tabe[dit] tabn[ext] tabs te[aroff] tm[enu] try undoj[oin] uns[ilent] vert[ical] viu[sage] w[rite] windo wqa[ll] xa[ll] xnoremenu y[ank]
syn keyword vimCommand contained ar[gs] argl[ocal] ba[ll] bm[odified] breaka[dd] bun[load] cad[dbuffer] cc cf[ile] changes cle[arjumps] co[py] con[tinue] cr[ewind] d[elete] deletel delm[arks] diffo[ff] dir dp earlier elsei[f] endw[hile] files fir[st] foldo[pen] grepa[dd] helpf[ind] i imapc[lear] j[oin]
syn match vimCommand contained "\<z[-+^.=]\=\>"
syn keyword vimStdPlugin contained DiffOrig Man N[ext] P[rint] S TOhtml XMLent XMLns
@@ -76,10 +76,10 @@ syn match vimHLGroup contained "Conceal"
syn case match
" Function Names {{{2
syn keyword vimFuncName contained abs and arglistid assert_exception assert_notequal atan2 buflisted bufwinnr call ch_close ch_getjob ch_open ch_sendraw clearmatches complete_check cosh deepcopy diff_hlID eval exists feedkeys finddir fmod foldclosedend foldtextresult garbagecollect getbufline getcharmod getcmdpos getcurpos getfperm getftype getmatches getqflist gettabvar getwinposy glob2regpat has_key histadd histnr hostname index inputlist inputsecret isdirectory items job_setoptions job_stop js_encode keys libcallnr lispindent log10 maparg matchadd matchdelete matchstr min mzeval or pow pumvisible range reltimefloat remote_foreground remote_send repeat round screencol searchdecl searchpos setbufvar setfperm setmatches setreg setwinvar shiftwidth sinh spellbadword sqrt strcharpart strftime string strridx submatch synID synstack tabpagebuflist tagfiles tanh timer_stop tr undofile values wildmenumode win_findbuf winheight winline winrestview wordcount
syn keyword vimFuncName contained acos append argv assert_fails assert_notmatch browse bufloaded byte2line ceil ch_evalexpr ch_info ch_read ch_setoptions col confirm count delete disable_char_avail_for_testing eventhandler exp filereadable findfile fnameescape foldlevel foreground garbagecollect_for_testing getbufvar getcharsearch getcmdtype getcwd getfsize getline getpid getreg gettabwinvar getwinvar globpath haslocaldir histdel hlexists iconv input inputrestore insert islocked job_getchannel job_start join json_decode len line localtime luaeval mapcheck matchaddpos matchend matchstrpos mkdir nextnonblank pathshorten prevnonblank py3eval readfile reltimestr remote_peek remove resolve screenattr screenrow searchpair server2client setcharsearch setline setpos settabvar sha256 simplify sort spellsuggest str2float strchars strgetchar strlen strtrans substitute synIDattr system tabpagenr taglist tempname tolower trunc undotree virtcol winbufnr win_getid win_id2tabwin winnr winsaveview writefile
syn keyword vimFuncName contained add argc asin assert_false assert_true browsedir bufname byteidx changenr ch_evalraw ch_log ch_readraw ch_status complete copy cscope_connection did_filetype empty executable expand filewritable float2nr fnamemodify foldtext function get getchar getcmdline getcmdwintype getfontname getftime getloclist getpos getregtype getwinposx glob has hasmapto histget hlID indent inputdialog inputsave invert isnan job_info job_status js_decode json_encode libcall line2byte log map match matcharg matchlist max mode nr2char perleval printf pyeval reltime remote_expr remote_read rename reverse screenchar search searchpairpos serverlist setcmdpos setloclist setqflist settabwinvar shellescape sin soundfold split str2nr strdisplaywidth stridx strpart strwidth synconcealed synIDtrans systemlist tabpagewinnr tan timer_start toupper type uniq visualmode wincol win_gotoid win_id2win winrestcmd winwidth xor
syn keyword vimFuncName contained alloc_fail argidx assert_equal assert_match atan bufexists bufnr byteidxcomp char2nr ch_getbufnr ch_logfile ch_sendexpr cindent complete_add cos cursor diff_filler escape exepath extend filter floor foldclosed
syn keyword vimFuncName contained abs append argv assert_fails assert_notmatch browse bufloaded bufwinnr call ch_close ch_getjob ch_open ch_sendraw clearmatches complete_check cosh deepcopy diff_hlID eventhandler exp filereadable findfile fnameescape foldlevel function getbufvar getcmdline getcurpos getfsize getloclist getqflist gettabwinvar getwinvar globpath haslocaldir histdel hlexists iconv input inputrestore insert islocked job_getchannel job_start join json_decode len line localtime luaeval mapcheck matchaddpos matchend matchstrpos mkdir nextnonblank pathshorten prevnonblank py3eval readfile reltimestr remote_peek remove resolve screenattr screenrow searchpair server2client setcharsearch setline setpos settabvar sha256 simplify sort spellsuggest str2float strchars strgetchar strlen strtrans substitute synIDattr system tabpagenr taglist tempname test_garbagecollect_now test_null_job test_null_string timer_stop tr undofile values wildmenumode win_findbuf winheight winline winrestview wordcount
syn keyword vimFuncName contained acos argc asin assert_false assert_true browsedir bufname byte2line ceil ch_evalexpr ch_info ch_read ch_setoptions col confirm count delete empty executable expand filewritable float2nr fnamemodify foldtext garbagecollect getchar getcmdpos getcwd getftime getmatches getreg getwinposx glob has hasmapto histget hlID indent inputdialog inputsave invert isnan job_info job_status js_decode json_encode libcall line2byte log map match matcharg matchlist max mode nr2char perleval printf pyeval reltime remote_expr remote_read rename reverse screenchar search searchpairpos serverlist setcmdpos setloclist setqflist settabwinvar shellescape sin soundfold split str2nr strdisplaywidth stridx strpart strwidth synconcealed synIDtrans systemlist tabpagewinnr tan test_alloc_fail test_null_channel test_null_list test_settime tolower trunc undotree virtcol winbufnr win_getid win_id2tabwin winnr winsaveview writefile
syn keyword vimFuncName contained add argidx assert_equal assert_match atan bufexists bufnr byteidx changenr ch_evalraw ch_log ch_readraw ch_status complete copy cscope_connection did_filetype escape exepath extend filter floor foldclosed foldtextresult get getcharmod getcmdtype getfontname getftype getpid getregtype getwinposy glob2regpat has_key histadd histnr hostname index inputlist inputsecret isdirectory items job_setoptions job_stop js_encode keys libcallnr lispindent log10 maparg matchadd matchdelete matchstr min mzeval or pow pumvisible range reltimefloat remote_foreground remote_send repeat round screencol searchdecl searchpos setbufvar setfperm setmatches setreg setwinvar shiftwidth sinh spellbadword sqrt strcharpart strftime string strridx submatch synID synstack tabpagebuflist tagfiles tanh test_disable_char_avail test_null_dict test_null_partial timer_start toupper type uniq visualmode wincol win_gotoid win_id2win winrestcmd winwidth xor
syn keyword vimFuncName contained and arglistid assert_exception assert_notequal atan2 buflisted bufwinid byteidxcomp char2nr ch_getbufnr ch_logfile ch_sendexpr cindent complete_add cos cursor diff_filler eval exists feedkeys finddir fmod foldclosedend foreground getbufline getcharsearch getcmdwintype getfperm getline getpos gettabvar
"--- syntax here and above generated by mkvimvim ---
" Special Vim Highlighting (not automatic) {{{1
@@ -268,7 +268,7 @@ if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_nousercmderror")
endif
syn case ignore
syn keyword vimUserAttrbKey contained bar ban[g] cou[nt] ra[nge] com[plete] n[args] re[gister]
syn keyword vimUserAttrbCmplt contained augroup buffer color command compiler cscope dir environment event expression file file_in_path filetype function help highlight locale mapping menu option shellcmd sign syntax tag tag_listfiles var
syn keyword vimUserAttrbCmplt contained augroup buffer behave color command compiler cscope dir environment event expression file file_in_path filetype function help highlight history locale mapping menu option packadd shellcmd sign syntax syntime tag tag_listfiles user var
syn keyword vimUserAttrbCmplt contained custom customlist nextgroup=vimUserAttrbCmpltFunc,vimUserCmdError
syn match vimUserAttrbCmpltFunc contained ",\%([sS]:\|<[sS][iI][dD]>\)\=\%(\h\w*\%(#\h\w*\)\+\|\h\w*\)"hs=s+1 nextgroup=vimUserCmdError
@@ -418,7 +418,7 @@ syn match vimNotation "\(\\\|<lt>\)\=<\([scamd]-\)\{0,4}x\=\(f\d\{1,2}\|[^ \t:]\
syn match vimNotation "\(\\\|<lt>\)\=<\([scam2-4]-\)\{0,4}\(right\|left\|middle\)\(mouse\)\=\(drag\|release\)\=>" contains=vimBracket
syn match vimNotation "\(\\\|<lt>\)\=<\(bslash\|plug\|sid\|space\|bar\|nop\|nul\|lt\)>" contains=vimBracket
syn match vimNotation '\(\\\|<lt>\)\=<C-R>[0-9a-z"%#:.\-=]'he=e-1 contains=vimBracket
syn match vimNotation '\(\\\|<lt>\)\=<\%(q-\)\=\(line[12]\|count\|bang\|reg\|args\|f-args\|lt\)>' contains=vimBracket
syn match vimNotation '\(\\\|<lt>\)\=<\%(q-\)\=\(line[12]\|count\|bang\|reg\|args\|mods\|f-args\|f-mods\|lt\)>' contains=vimBracket
syn match vimNotation "\(\\\|<lt>\)\=<\([cas]file\|abuf\|amatch\|cword\|cWORD\|client\)>" contains=vimBracket
syn match vimBracket contained "[\\<>]"
syn case match

View File

@@ -2039,7 +2039,7 @@ test1 \
test_wordcount \
test_writefile \
test2 test3 test4 test5 test6 test7 test8 test9 \
test11 test12 test13 test14 test15 test16 test17 test18 test19 \
test11 test12 test13 test14 test15 test17 test18 test19 \
test20 test21 test22 test23 test24 test25 test26 test27 test28 test29 \
test30 test31 test32 test33 test34 test36 test37 test38 test39 \
test40 test41 test42 test43 test44 test45 test46 test48 test49 \
@@ -2080,11 +2080,13 @@ test_arglist \
test_glob2regpat \
test_gn \
test_goto \
test_gui \
test_hardcopy \
test_help_tagjump \
test_history \
test_increment \
test_increment_dbcs \
test_job_fails \
test_join \
test_json \
test_jumps \

View File

@@ -418,6 +418,7 @@ dict_find(dict_T *d, char_u *key, int len)
/*
* Get a string item from a dictionary.
* When "save" is TRUE allocate memory for it.
* When FALSE a shared buffer is used, can only be used once!
* Returns NULL if the entry doesn't exist or out of memory.
*/
char_u *

View File

@@ -3891,8 +3891,9 @@ ins_compl_prep(int c)
&& pum_visible())
retval = TRUE;
/* CTRL-E means completion is Ended, go back to the typed text. */
if (c == Ctrl_E)
/* CTRL-E means completion is Ended, go back to the typed text.
* but only do this, if the Popup is still visible */
if (c == Ctrl_E && pum_visible())
{
ins_compl_delete();
if (compl_leader != NULL)

View File

@@ -2838,7 +2838,7 @@ do_unlet(char_u *name, int forceit)
}
hi = hash_find(ht, varname);
if (HASHITEM_EMPTY(hi))
hi = find_hi_in_scoped_ht(name, &varname, &ht);
hi = find_hi_in_scoped_ht(name, &ht);
if (hi != NULL && !HASHITEM_EMPTY(hi))
{
di = HI2DI(hi);
@@ -5304,6 +5304,9 @@ garbage_collect(int testing)
/* function-local variables */
abort = abort || set_ref_in_call_stack(copyID);
/* named functions (matters for closures) */
abort = abort || set_ref_in_functions(copyID);
/* function call arguments, if v:testing is set. */
abort = abort || set_ref_in_func_args(copyID);
@@ -7344,8 +7347,7 @@ find_var(char_u *name, hashtab_T **htp, int no_autoload)
return ret;
/* Search in parent scope for lambda */
return find_var_in_scoped_ht(name, varname ? &varname : NULL,
no_autoload || htp != NULL);
return find_var_in_scoped_ht(name, no_autoload || htp != NULL);
}
/*
@@ -7684,7 +7686,7 @@ set_var(
/* Search in parent scope which is possible to reference from lambda */
if (v == NULL)
v = find_var_in_scoped_ht(name, varname ? &varname : NULL, TRUE);
v = find_var_in_scoped_ht(name, TRUE);
if ((tv->v_type == VAR_FUNC || tv->v_type == VAR_PARTIAL)
&& var_check_func_name(name, v == NULL))

View File

@@ -3448,6 +3448,7 @@ f_foldtext(typval_T *argvars UNUSED, typval_T *rettv)
char_u *r;
int len;
char *txt;
long count;
#endif
rettv->v_type = VAR_STRING;
@@ -3478,14 +3479,15 @@ f_foldtext(typval_T *argvars UNUSED, typval_T *rettv)
s = skipwhite(s + 1);
}
}
txt = _("+-%s%3ld lines: ");
count = (long)(foldend - foldstart + 1);
txt = ngettext("+-%s%3ld line: ", "+-%s%3ld lines: ", count);
r = alloc((unsigned)(STRLEN(txt)
+ STRLEN(dashes) /* for %s */
+ 20 /* for %3ld */
+ STRLEN(s))); /* concatenated */
if (r != NULL)
{
sprintf((char *)r, txt, dashes, (long)(foldend - foldstart + 1));
sprintf((char *)r, txt, dashes, count);
len = (int)STRLEN(r);
STRCAT(r, s);
/* remove 'foldmarker' and 'commentstring' */
@@ -3505,7 +3507,7 @@ f_foldtextresult(typval_T *argvars UNUSED, typval_T *rettv)
#ifdef FEAT_FOLDING
linenr_T lnum;
char_u *text;
char_u buf[51];
char_u buf[FOLD_TEXT_LEN];
foldinfo_T foldinfo;
int fold_count;
#endif
@@ -3520,8 +3522,7 @@ f_foldtextresult(typval_T *argvars UNUSED, typval_T *rettv)
fold_count = foldedCount(curwin, lnum, &foldinfo);
if (fold_count > 0)
{
text = get_foldtext(curwin, lnum, lnum + fold_count - 1,
&foldinfo, buf);
text = get_foldtext(curwin, lnum, lnum + fold_count - 1, &foldinfo, buf);
if (text == buf)
text = vim_strsave(text);
rettv->vval.v_string = text;
@@ -4239,6 +4240,13 @@ f_getcompletion(typval_T *argvars, typval_T *rettv)
xpc.xp_pattern_len = (int)STRLEN(xpc.xp_pattern);
}
# endif
#ifdef FEAT_CSCOPE
if (xpc.xp_context == EXPAND_CSCOPE)
{
set_context_in_cscope_cmd(&xpc, xpc.xp_pattern, CMD_cscope);
xpc.xp_pattern_len = (int)STRLEN(xpc.xp_pattern);
}
#endif
pat = addstar(xpc.xp_pattern, xpc.xp_pattern_len, xpc.xp_context);
if ((rettv_list_alloc(rettv) != FAIL) && (pat != NULL))
@@ -9651,11 +9659,11 @@ f_setmatches(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
}
}
group = get_dict_string(d, (char_u *)"group", FALSE);
group = get_dict_string(d, (char_u *)"group", TRUE);
priority = (int)get_dict_number(d, (char_u *)"priority");
id = (int)get_dict_number(d, (char_u *)"id");
conceal = dict_find(d, (char_u *)"conceal", -1) != NULL
? get_dict_string(d, (char_u *)"conceal", FALSE)
? get_dict_string(d, (char_u *)"conceal", TRUE)
: NULL;
if (i == 0)
{
@@ -9669,6 +9677,8 @@ f_setmatches(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
list_unref(s);
s = NULL;
}
vim_free(group);
vim_free(conceal);
li = li->li_next;
}

View File

@@ -1853,8 +1853,8 @@ foldDelMarker(linenr_T lnum, char_u *marker, int markerlen)
/* get_foldtext() {{{2 */
/*
* Return the text for a closed fold at line "lnum", with last line "lnume".
* When 'foldtext' isn't set puts the result in "buf[51]". Otherwise the
* result is in allocated memory.
* When 'foldtext' isn't set puts the result in "buf[FOLD_TEXT_LEN]".
* Otherwise the result is in allocated memory.
*/
char_u *
get_foldtext(
@@ -1960,8 +1960,12 @@ get_foldtext(
if (text == NULL)
#endif
{
sprintf((char *)buf, _("+--%3ld lines folded "),
(long)(lnume - lnum + 1));
long count = (long)(lnume - lnum + 1);
vim_snprintf((char *)buf, FOLD_TEXT_LEN,
ngettext("+--%3ld line folded ",
"+--%3ld lines folded ", count),
count);
text = buf;
}
return text;

View File

@@ -472,12 +472,15 @@ vimLoadLib(char *name)
# endif
/* Dummy functions */
static char *null_libintl_gettext(const char *);
static char *null_libintl_ngettext(const char *, const char *, unsigned long n);
static char *null_libintl_textdomain(const char *);
static char *null_libintl_bindtextdomain(const char *, const char *);
static char *null_libintl_bind_textdomain_codeset(const char *, const char *);
static HINSTANCE hLibintlDLL = NULL;
char *(*dyn_libintl_gettext)(const char *) = null_libintl_gettext;
char *(*dyn_libintl_ngettext)(const char *, const char *, unsigned long n)
= null_libintl_ngettext;
char *(*dyn_libintl_textdomain)(const char *) = null_libintl_textdomain;
char *(*dyn_libintl_bindtextdomain)(const char *, const char *)
= null_libintl_bindtextdomain;
@@ -495,6 +498,7 @@ dyn_libintl_init(void)
} libintl_entry[] =
{
{"gettext", (FARPROC*)&dyn_libintl_gettext},
{"ngettext", (FARPROC*)&dyn_libintl_ngettext},
{"textdomain", (FARPROC*)&dyn_libintl_textdomain},
{"bindtextdomain", (FARPROC*)&dyn_libintl_bindtextdomain},
{NULL, NULL}
@@ -553,6 +557,7 @@ dyn_libintl_end(void)
FreeLibrary(hLibintlDLL);
hLibintlDLL = NULL;
dyn_libintl_gettext = null_libintl_gettext;
dyn_libintl_ngettext = null_libintl_ngettext;
dyn_libintl_textdomain = null_libintl_textdomain;
dyn_libintl_bindtextdomain = null_libintl_bindtextdomain;
dyn_libintl_bind_textdomain_codeset = null_libintl_bind_textdomain_codeset;
@@ -565,6 +570,16 @@ null_libintl_gettext(const char *msgid)
return (char*)msgid;
}
/*ARGSUSED*/
static char *
null_libintl_ngettext(
const char *msgid,
const char *msgid_plural,
unsigned long n)
{
return (char *)(n == 1 ? msgid : msgid_plural);
}
/*ARGSUSED*/
static char *
null_libintl_bindtextdomain(const char *domainname, const char *dirname)
@@ -4212,7 +4227,7 @@ mch_system_classic(char *cmd, int options)
* process. This way avoid to hang up vim totally if the children
* process take a long time to process the lines.
*/
static DWORD WINAPI
static unsigned int __stdcall
sub_process_writer(LPVOID param)
{
HANDLE g_hChildStd_IN_Wr = param;
@@ -4267,7 +4282,7 @@ sub_process_writer(LPVOID param)
/* finished all the lines, close pipe */
CloseHandle(g_hChildStd_IN_Wr);
ExitThread(0);
return 0;
}
@@ -4491,8 +4506,8 @@ mch_system_piped(char *cmd, int options)
if (options & SHELL_WRITE)
{
HANDLE thread =
CreateThread(NULL, /* security attributes */
HANDLE thread = (HANDLE)
_beginthreadex(NULL, /* security attributes */
0, /* default stack size */
sub_process_writer, /* function to be executed */
g_hChildStd_IN_Wr, /* parameter */

View File

@@ -50,10 +50,11 @@ void *clear_current_funccal(void);
void restore_current_funccal(void *f);
void list_func_vars(int *first);
dict_T *get_current_funccal_dict(hashtab_T *ht);
hashitem_T *find_hi_in_scoped_ht(char_u *name, char_u **varname, hashtab_T **pht);
dictitem_T *find_var_in_scoped_ht(char_u *name, char_u **varname, int no_autoload);
hashitem_T *find_hi_in_scoped_ht(char_u *name, hashtab_T **pht);
dictitem_T *find_var_in_scoped_ht(char_u *name, int no_autoload);
int set_ref_in_previous_funccal(int copyID);
int set_ref_in_call_stack(int copyID);
int set_ref_in_functions(int copyID);
int set_ref_in_func_args(int copyID);
int set_ref_in_func(char_u *name, ufunc_T *fp_in, int copyID);
/* vim: set ft=c : */

View File

@@ -651,11 +651,7 @@ qf_get_next_file_line(qfstate_T *state)
discard = FALSE;
state->linelen = (int)STRLEN(IObuff);
if (state->linelen == IOSIZE - 1 && !(IObuff[state->linelen - 1] == '\n'
#ifdef USE_CRNL
|| IObuff[state->linelen - 1] == '\r'
#endif
))
if (state->linelen == IOSIZE - 1 && !(IObuff[state->linelen - 1] == '\n'))
{
/*
* The current line exceeds IObuff, continue reading using
@@ -680,11 +676,7 @@ qf_get_next_file_line(qfstate_T *state)
break;
state->linelen = (int)STRLEN(state->growbuf + growbuflen);
growbuflen += state->linelen;
if ((state->growbuf)[growbuflen - 1] == '\n'
#ifdef USE_CRNL
|| (state->growbuf)[growbuflen - 1] == '\r'
#endif
)
if ((state->growbuf)[growbuflen - 1] == '\n')
break;
if (state->growbufsiz == LINE_MAXLEN)
{
@@ -708,11 +700,7 @@ qf_get_next_file_line(qfstate_T *state)
*/
if (fgets((char *)IObuff, IOSIZE, state->fd) == NULL
|| (int)STRLEN(IObuff) < IOSIZE - 1
|| IObuff[IOSIZE - 1] == '\n'
#ifdef USE_CRNL
|| IObuff[IOSIZE - 1] == '\r'
#endif
)
|| IObuff[IOSIZE - 1] == '\n')
break;
}
@@ -757,11 +745,13 @@ qf_get_nextline(qfstate_T *state)
/* remove newline/CR from the line */
if (state->linelen > 0 && state->linebuf[state->linelen - 1] == '\n')
{
state->linebuf[state->linelen - 1] = NUL;
#ifdef USE_CRNL
if (state->linelen > 0 && state->linebuf[state->linelen - 1] == '\r')
state->linebuf[state->linelen - 1] = NUL;
if (state->linelen > 1 && state->linebuf[state->linelen - 2] == '\r')
state->linebuf[state->linelen - 2] = NUL;
#endif
}
#ifdef FEAT_MBYTE
remove_bom(state->linebuf);

View File

@@ -2424,7 +2424,7 @@ fold_line(
linenr_T lnum,
int row)
{
char_u buf[51];
char_u buf[FOLD_TEXT_LEN];
pos_T *top, *bot;
linenr_T lnume = lnum + fold_count - 1;
int len;

View File

@@ -1327,7 +1327,7 @@ typedef struct
#endif
scid_T uf_script_ID; /* ID of script where function was defined,
used for s: variables */
int uf_refcount; /* for numbered function: reference count */
int uf_refcount; /* reference count, see func_name_refcount() */
funccall_T *uf_scoped; /* l: local variables for closure */
char_u uf_name[1]; /* name of function (actually longer); can
start with <SNR>123_ (<SNR> is K_SPECIAL
@@ -1365,9 +1365,11 @@ struct funccall_S
funccall_T *caller; /* calling function or NULL */
/* for closure */
int fc_refcount;
int fc_refcount; /* number of user functions that reference this
* funccal */
int fc_copyID; /* for garbage collection */
garray_T fc_funcs; /* list of ufunc_T* which refer this */
garray_T fc_funcs; /* list of ufunc_T* which keep a reference to
* "func" */
};
/*
@@ -1380,6 +1382,16 @@ typedef struct
dictitem_T *fd_di; /* Dictionary item used */
} funcdict_T;
#else
/* dummy typedefs for function prototypes */
typedef struct
{
int dummy;
} ufunc_T;
typedef struct
{
int dummy;
} funcdict_T;
#endif
struct partial_S

View File

@@ -154,7 +154,7 @@ SCRIPTS_WIN32 = test50.out
# Tests for the GUI.
SCRIPTS_GUI = test16.out
SCRIPTS_GUI =
# Tests using runtest.vim.vim.
@@ -171,10 +171,12 @@ NEW_TESTS = test_arglist.res \
test_digraph.res \
test_farsi.res \
test_gn.res \
test_gui.res \
test_hardcopy.res \
test_history.res \
test_increment.res \
test_increment_dbcs.res \
test_job_fails.res \
test_json.res \
test_langmap.res \
test_man.res \

View File

@@ -4,7 +4,7 @@
# Authors: Zoltan Arpadffy, <arpadffy@polarhome.com>
# Sandor Kopanyi, <sandor.kopanyi@mailbox.hu>
#
# Last change: 2016 Feb 25
# Last change: 2016 Aug 04
#
# This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
# Edit the lines in the Configuration section below to select.
@@ -104,7 +104,7 @@ SCRIPT = $(SCRIPTS_ALL) $(SCRIPTS_MORE3)
# On ODS-2 tests fail.
.IFDEF WANT_GUI
SCRIPT_GUI = test16.out
SCRIPT_GUI =
GUI_OPTION = -g
.ENDIF

View File

@@ -103,6 +103,12 @@ function RunTheTest(test)
if exists("*TearDown")
call TearDown()
endif
" Close any extra windows and make the current one not modified.
while winnr('$') > 1
bwipe!
endwhile
set nomodified
endfunc
" Source the test script. First grab the file name, in case the script
@@ -125,7 +131,7 @@ else
endif
" Names of flaky tests.
let s:flaky = ['Test_reltime()', 'Test_nb_basic()']
let s:flaky = ['Test_reltime()', 'Test_nb_basic()', 'Test_communicate()']
" Locate Test_ functions and execute them.
set nomore

View File

@@ -1,16 +0,0 @@
Tests for resetting "secure" flag after GUI has started.
For KDE set a font, empty 'guifont' may cause a hang.
STARTTEST
:so small.vim
:if $DISPLAY == "" | e! test.ok | wq! test.out | endif
:set exrc secure
:if has("gui_kde")
: set guifont=Courier\ 10\ Pitch/8/-1/5/50/0/0/0/0/0
:endif
:gui -f
:.,$w! test.out
:qa!
ENDTEST
just some text

View File

@@ -1,2 +0,0 @@
just some text

View File

@@ -125,12 +125,22 @@ func Test_getcompletion()
let l = getcompletion('dark', 'highlight')
call assert_equal([], l)
if has('cscope')
let l = getcompletion('', 'cscope')
let cmds = ['add', 'find', 'help', 'kill', 'reset', 'show']
call assert_equal(cmds, l)
" using cmdline completion must not change the result
call feedkeys(":cscope find \<c-d>\<c-c>", 'xt')
let l = getcompletion('', 'cscope')
call assert_equal(cmds, l)
let keys = ['a', 'c', 'd', 'e', 'f', 'g', 'i', 's', 't']
let l = getcompletion('find ', 'cscope')
call assert_equal(keys, l)
endif
" For others test if the name is recognized.
let names = ['buffer', 'environment', 'file_in_path',
\ 'mapping', 'shellcmd', 'tag', 'tag_listfiles', 'user']
if has('cscope')
call add(names, 'cscope')
endif
if has('cmdline_hist')
call add(names, 'history')
endif

View File

@@ -1,6 +1,6 @@
" Test for cscope commands.
if !has('cscope')
if !has('cscope') || !executable('cscope') || !has('quickfix')
finish
endif
@@ -13,3 +13,157 @@ func Test_cscopequickfix()
call assert_fails('set cscopequickfix=s7', 'E474:')
call assert_fails('set cscopequickfix=s-a', 'E474:')
endfunc
func CscopeSetupOrClean(setup)
if a:setup
noa sp ../memfile_test.c
saveas! Xmemfile_test.c
call system('cscope -bk -fXcscope.out Xmemfile_test.c')
cscope add Xcscope.out
set cscopequickfix=s-,g-,d-,c-,t-,e-,f-,i-,a-
else
cscope kill -1
for file in ['Xcscope.out', 'Xmemfile_test.c']
call delete(file)
endfor
endif
endfunc
func Test_cscope1()
call CscopeSetupOrClean(1)
" Test 0: E568: duplicate cscope database not added
try
set nocscopeverbose
cscope add Xcscope.out
set cscopeverbose
catch
call assert_true(0)
endtry
call assert_fails('cscope add Xcscope.out', 'E568')
call assert_fails('cscope add doesnotexist.out', 'E563')
call assert_fails('cscope kill 2', 'E261')
" Test 1: Find this C-Symbol
let a=execute('cscope find s main')
" Test 1.1 test where it moves the cursor
call assert_equal('main(void)', getline('.'))
" Test 1.2 test the output of the :cs command
call assert_match('\n(1 of 1): <<main>> main(void )', a)
" Test 2: Find this definition
cscope find g test_mf_hash
call assert_equal(['', '/*', ' * Test mf_hash_*() functions.', ' */', ' static void', 'test_mf_hash(void)', '{'], getline(line('.')-5, line('.')+1))
" Test 3: Find functions called by this function
let a=execute('cscope find d test_mf_hash')
call assert_match('\n(1 of 42): <<mf_hash_init>> mf_hash_init(&ht);', a)
call assert_equal(' mf_hash_init(&ht);', getline('.'))
" Test 4: Find functions calling this function
let a=execute('cscope find c test_mf_hash')
call assert_match('\n(1 of 1): <<main>> test_mf_hash();', a)
call assert_equal(' test_mf_hash();', getline('.'))
" Test 5: Find this text string
let a=execute('cscope find t Bram')
call assert_match('(1 of 1): <<<unknown>>> \* VIM - Vi IMproved^Iby Bram Moolenaar', a)
call assert_equal(' * VIM - Vi IMproved by Bram Moolenaar', getline('.'))
" Test 6: Find this egrep pattern
" test all matches returned by cscope
let a=execute('cscope find e ^\#includ.')
call assert_match('\n(1 of 3): <<<unknown>>> #include <assert.h>', a)
call assert_equal('#include <assert.h>', getline('.'))
cnext
call assert_equal('#include "main.c"', getline('.'))
cnext
call assert_equal('#include "memfile.c"', getline('.'))
call assert_fails('cnext', 'E553')
" Test 7: Find this file
enew
let a=execute('cscope find f Xmemfile_test.c')
call assert_match('\n"Xmemfile_test.c" 143L, 3137C', a)
call assert_equal('Xmemfile_test.c', @%)
" Test 8: Find files #including this file
enew
let a=execute('cscope find i assert.h')
call assert_equal(['','"Xmemfile_test.c" 143L, 3137C','(1 of 1): <<global>> #include <assert.h>'], split(a, '\n', 1))
call assert_equal('#include <assert.h>', getline('.'))
" Test 9: Invalid find command
call assert_fails('cs find x', 'E560')
" Test 10: Find places where this symbol is assigned a value
" this needs a cscope >= 15.8
" unfortunately, Travis has cscope version 15.7
let cscope_version=systemlist('cscope --version')[0]
let cs_version=str2float(matchstr(cscope_version, '\d\+\(\.\d\+\)\?'))
if cs_version >= 15.8
let a=execute('cscope find a item')
call assert_equal(['', '(1 of 4): <<test_mf_hash>> item = (mf_hashitem_T *)lalloc_clear(sizeof(mf_hashtab_T), FALSE);'], split(a, '\n', 1))
call assert_equal(' item = (mf_hashitem_T *)lalloc_clear(sizeof(mf_hashtab_T), FALSE);', getline('.'))
cnext
call assert_equal(' item = mf_hash_find(&ht, key);', getline('.'))
cnext
call assert_equal(' item = mf_hash_find(&ht, key);', getline('.'))
cnext
call assert_equal(' item = mf_hash_find(&ht, key);', getline('.'))
endif
" Test 11: leading whitespace is not removed for cscope find text
let a=execute('cscope find t test_mf_hash')
call assert_equal(['', '(1 of 1): <<<unknown>>> test_mf_hash();'], split(a, '\n', 1))
call assert_equal(' test_mf_hash();', getline('.'))
" Test 12: cscope help
let a=execute('cscope help')
call assert_match('^cscope commands:\n', a)
call assert_match('\nadd :', a)
call assert_match('\nfind :', a)
call assert_match('\nhelp : Show this message', a)
call assert_match('\nkill : Kill a connection', a)
call assert_match('\nreset: Reinit all connections', a)
call assert_match('\nshow : Show connections', a)
" Test 13: reset connections
let a=execute('cscope reset')
call assert_match('\nAdded cscope database.*Xcscope.out (#0)', a)
call assert_match('\nAll cscope databases reset', a)
" Test 14: cscope show
let a=execute('cscope show')
call assert_match('\n 0 \d\+.*Xcscope.out\s*<none>', a)
" Test 15: cstag and 'csto' option
set csto=0
let a=execute('cstag TEST_COUNT')
call assert_match('(1 of 1): <<TEST_COUNT>> #define TEST_COUNT 50000', a)
call assert_equal('#define TEST_COUNT 50000', getline('.'))
set csto=1
let a=execute('cstag index_to_key')
call assert_match('(1 of 1): <<index_to_key>> #define index_to_key(i) ((i) ^ 15167)', a)
call assert_equal('#define index_to_key(i) ((i) ^ 15167)', getline('.'))
call assert_fails('cstag xxx', 'E257')
call assert_fails('cstag', 'E562')
" Test 15: 'csprg' option
call assert_equal('cscope', &csprg)
" Test 16: 'cst' option
set cst
let a=execute('tag TEST_COUNT')
call assert_match('(1 of 1): <<TEST_COUNT>> #define TEST_COUNT 50000', a)
call assert_equal('#define TEST_COUNT 50000', getline('.'))
set nocst
call assert_fails('tag TEST_COUNT', 'E426')
" CleanUp
call CscopeSetupOrClean(0)
" cscope command should fail after killing scope connection.
call assert_fails('cscope find s main', 'E567')
endfunc
" vim: shiftwidth=2 sts=2 expandtab

View File

@@ -194,3 +194,16 @@ func Test_funcref()
let OneByRef = funcref('One')
call assert_equal(2, OneByRef())
endfunc
func Test_setmatches()
hi def link 1 Comment
hi def link 2 PreProc
let set = [{"group": 1, "pattern": 2, "id": 3, "priority": 4}]
let exp = [{"group": '1', "pattern": '2', "id": 3, "priority": 4}]
if has('conceal')
let set[0]['conceal'] = 5
let exp[0]['conceal'] = '5'
endif
call setmatches(set)
call assert_equal(exp, getmatches())
endfunc

28
src/testdir/test_gui.vim Normal file
View File

@@ -0,0 +1,28 @@
" Tests specifically for the GUI
if !has('gui') || ($DISPLAY == "" && !has('gui_running'))
finish
endif
" For KDE set a font, empty 'guifont' may cause a hang.
func SetUp()
if has("gui_kde")
set guifont=Courier\ 10\ Pitch/8/-1/5/50/0/0/0/0/0
endif
endfunc
" Test for resetting "secure" flag after GUI has started.
" Must be run first.
func Test_1_set_secure()
set exrc secure
gui -f
call assert_equal(1, has('gui_running'))
endfunc
func Test_shell_command()
new
r !echo hello
call assert_equal('hello', substitute(getline(2), '\W', '', 'g'))
bwipe!
call assert_true(1, match(execute('winpos'), 'Window position: X \d\+, Y \d\+') >= 0)
endfunc

View File

@@ -0,0 +1,19 @@
" This test is in a separate file, because it usually causes reports for memory
" leaks under valgrind. That is because when fork/exec fails memory is not
" freed. Since the process exists right away it's not a real leak.
source shared.vim
func Test_job_start_fails()
if has('job')
let g:job = job_start('axdfxsdf')
if has('unix')
call WaitFor('job_status(g:job) == "dead"')
call assert_equal('dead', job_status(g:job))
else
call WaitFor('job_status(g:job) == "fail"')
call assert_equal('fail', job_status(g:job))
endif
unlet g:job
endif
endfunc

View File

@@ -270,3 +270,17 @@ func Test_closure_refcount()
delfunc LambdaFoo
delfunc LambdaBar
endfunc
func Test_named_function_closure()
func! Afoo()
let x = 14
func! s:Abar() closure
return x
endfunc
call assert_equal(14, s:Abar())
endfunc
call Afoo()
call assert_equal(14, s:Abar())
call test_garbagecollect_now()
call assert_equal(14, s:Abar())
endfunc

View File

@@ -1,27 +1,5 @@
" Test binding arguments to a Funcref.
" NOTE: This function may cause memory leaks to be reported.
" That is because when fork/exec fails memory is not freed. Since the process
" exists right away it's not a real leak.
func Test_job_start_fails()
if has('job')
let job = job_start('axdfxsdf')
for i in range(100)
let status = job_status(job)
if status == 'dead' || status == 'fail'
break
endif
sleep 10m
endfor
if has('unix')
call assert_equal('dead', job_status(job))
else
call assert_equal('fail', job_status(job))
endif
unlet job
endif
endfunc
func MyFunc(arg1, arg2, arg3)
return a:arg1 . '/' . a:arg2 . '/' . a:arg3
endfunc

View File

@@ -3,14 +3,209 @@
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 ''
func! ListMonths()
if g:setting != ''
exe ":set" g:setting
endif
let mth=copy(g:months)
let entered = strcharpart(getline('.'),0,col('.'))
if !empty(entered)
let mth=filter(mth, 'v:val=~"^".entered')
endif
call complete(1, mth)
return ''
endfunc
func! Test_popup_complete()
new
inoremap <f5> <c-r>=ListMonths()<cr>
" <C-E> - select original typed text before the completion started
call feedkeys("aJu\<f5>\<down>\<c-e>\<esc>", 'tx')
call assert_equal(["Ju"], getline(1,2))
%d
" <C-Y> - accept current match
call feedkeys("a\<f5>". repeat("\<down>",7). "\<c-y>\<esc>", 'tx')
call assert_equal(["August"], getline(1,2))
%d
" <BS> - Delete one character from the inserted text (state: 1)
" TODO: This should not end the completion, but it does.
" This should according to the documentation:
" January
" but instead, this does
" Januar
" (idea is, C-L inserts the match from the popup menu
" but if the menu is closed, it will insert the character <c-l>
call feedkeys("aJ\<f5>\<bs>\<c-l>\<esc>", 'tx')
call assert_equal(["Januar "], getline(1,2))
%d
" any-non special character: Stop completion without changing the match
" and insert the typed character
call feedkeys("a\<f5>20", 'tx')
call assert_equal(["January20"], getline(1,2))
%d
" any-non printable, non-white character: Add this character and
" reduce number of matches
call feedkeys("aJu\<f5>\<c-p>l\<c-y>", 'tx')
call assert_equal(["Jul"], getline(1,2))
%d
" any-non printable, non-white character: Add this character and
" reduce number of matches
call feedkeys("aJu\<f5>\<c-p>l\<c-n>\<c-y>", 'tx')
call assert_equal(["July"], getline(1,2))
%d
" any-non printable, non-white character: Add this character and
" reduce number of matches
call feedkeys("aJu\<f5>\<c-p>l\<c-e>", 'tx')
call assert_equal(["Jul"], getline(1,2))
%d
" <BS> - Delete one character from the inserted text (state: 2)
call feedkeys("a\<f5>\<c-n>\<bs>", 'tx')
call assert_equal(["Februar"], getline(1,2))
%d
" <c-l> - Insert one character from the current match
call feedkeys("aJ\<f5>".repeat("\<c-n>",3)."\<c-l>\<esc>", 'tx')
call assert_equal(["J "], getline(1,2))
%d
" <c-l> - Insert one character from the current match
call feedkeys("aJ\<f5>".repeat("\<c-n>",4)."\<c-l>\<esc>", 'tx')
call assert_equal(["January "], getline(1,2))
%d
" <c-y> - Accept current selected match
call feedkeys("aJ\<f5>\<c-y>\<esc>", 'tx')
call assert_equal(["January"], getline(1,2))
%d
" <c-e> - End completion, go back to what was there before selecting a match
call feedkeys("aJu\<f5>\<c-e>\<esc>", 'tx')
call assert_equal(["Ju"], getline(1,2))
%d
" <PageUp> - Select a match several entries back
call feedkeys("a\<f5>\<PageUp>\<c-y>\<esc>", 'tx')
call assert_equal([""], getline(1,2))
%d
" <PageUp><PageUp> - Select a match several entries back
call feedkeys("a\<f5>\<PageUp>\<PageUp>\<c-y>\<esc>", 'tx')
call assert_equal(["December"], getline(1,2))
%d
" <PageUp><PageUp><PageUp> - Select a match several entries back
call feedkeys("a\<f5>\<PageUp>\<PageUp>\<PageUp>\<c-y>\<esc>", 'tx')
call assert_equal(["February"], getline(1,2))
%d
" <PageDown> - Select a match several entries further
call feedkeys("a\<f5>\<PageDown>\<c-y>\<esc>", 'tx')
call assert_equal(["November"], getline(1,2))
%d
" <PageDown><PageDown> - Select a match several entries further
call feedkeys("a\<f5>\<PageDown>\<PageDown>\<c-y>\<esc>", 'tx')
call assert_equal(["December"], getline(1,2))
%d
" <PageDown><PageDown><PageDown> - Select a match several entries further
call feedkeys("a\<f5>\<PageDown>\<PageDown>\<PageDown>\<c-y>\<esc>", 'tx')
call assert_equal([""], getline(1,2))
%d
" <PageDown><PageDown><PageDown><PageDown> - Select a match several entries further
call feedkeys("a\<f5>".repeat("\<PageDown>",4)."\<c-y>\<esc>", 'tx')
call assert_equal(["October"], getline(1,2))
%d
" <Up> - Select a match don't insert yet
call feedkeys("a\<f5>\<Up>\<c-y>\<esc>", 'tx')
call assert_equal([""], getline(1,2))
%d
" <Up><Up> - Select a match don't insert yet
call feedkeys("a\<f5>\<Up>\<Up>\<c-y>\<esc>", 'tx')
call assert_equal(["December"], getline(1,2))
%d
" <Up><Up><Up> - Select a match don't insert yet
call feedkeys("a\<f5>\<Up>\<Up>\<Up>\<c-y>\<esc>", 'tx')
call assert_equal(["November"], getline(1,2))
%d
" <Tab> - Stop completion and insert the match
call feedkeys("a\<f5>\<Tab>\<c-y>\<esc>", 'tx')
call assert_equal(["January "], getline(1,2))
%d
" <Space> - Stop completion and insert the match
call feedkeys("a\<f5>".repeat("\<c-p>",5)." \<esc>", 'tx')
call assert_equal(["September "], getline(1,2))
%d
" <Enter> - Use the text and insert line break (state: 1)
call feedkeys("a\<f5>\<enter>\<esc>", 'tx')
call assert_equal(["January", ''], getline(1,2))
%d
" <Enter> - Insert the current selected text (state: 2)
call feedkeys("a\<f5>".repeat("\<Up>",5)."\<enter>\<esc>", 'tx')
call assert_equal(["September"], getline(1,2))
%d
" Insert match immediately, if there is only one match
" <c-y> selects a character from the line above
call append(0, ["December2015"])
call feedkeys("aD\<f5>\<C-Y>\<C-Y>\<C-Y>\<C-Y>\<enter>\<esc>", 'tx')
call assert_equal(["December2015", "December2015", ""], getline(1,3))
%d
" Insert match immediately, if there is only one match
" <c-e> Should select a character from the line below
call append(1, ["December2015"])
:1
call feedkeys("aD\<f5>\<C-E>\<C-E>\<C-E>\<C-E>\<enter>\<esc>", 'tx')
call assert_equal(["December2015", "", "December2015"], getline(1,3))
%d
" use menuone for 'completeopt'
" Since for the first <c-y> the menu is still shown, will only select
" three letters from the line above
set completeopt&vim
set completeopt+=menuone
call append(0, ["December2015"])
call feedkeys("aD\<f5>\<C-Y>\<C-Y>\<C-Y>\<C-Y>\<enter>\<esc>", 'tx')
call assert_equal(["December2015", "December201", ""], getline(1,3))
%d
" use longest for 'completeopt'
set completeopt&vim
call feedkeys("aM\<f5>\<C-N>\<C-P>\<c-e>\<enter>\<esc>", 'tx')
set completeopt+=longest
call feedkeys("aM\<f5>\<C-N>\<C-P>\<c-e>\<enter>\<esc>", 'tx')
call assert_equal(["M", "Ma", ""], getline(1,3))
%d
" use noselect/noinsert for 'completeopt'
set completeopt&vim
call feedkeys("aM\<f5>\<enter>\<esc>", 'tx')
set completeopt+=noselect
call feedkeys("aM\<f5>\<enter>\<esc>", 'tx')
set completeopt-=noselect completeopt+=noinsert
call feedkeys("aM\<f5>\<enter>\<esc>", 'tx')
call assert_equal(["March", "M", "March"], getline(1,4))
%d
endfu
func! Test_popup_completion_insertmode()
new
inoremap <F5> <C-R>=ListMonths()<CR>
@@ -18,22 +213,25 @@ func! Test_popup_completion_insertmode()
call feedkeys("a\<f5>\<down>\<enter>\<esc>", 'tx')
call assert_equal('February', getline(1))
%d
" Set noinsertmode
let g:setting = 'noinsertmode'
call feedkeys("a\<f5>\<down>\<enter>\<esc>", 'tx')
call assert_equal('February', getline(1))
call assert_false(pumvisible())
%d
" Go through all matches, until none is selected
let g:setting = ''
call feedkeys("a\<f5>". repeat("\<c-n>",12)."\<enter>\<esc>", 'tx')
call assert_equal('', getline(1))
%d
" select previous entry
call feedkeys("a\<f5>\<c-p>\<enter>\<esc>", 'tx')
call assert_equal('', getline(1))
%d
" select last entry
call feedkeys("a\<f5>\<c-p>\<c-p>\<enter>\<esc>", 'tx')
call assert_equal('December', getline(1))
bwipe!
iunmap <F5>
endfunc
@@ -66,3 +264,5 @@ function! Test() abort
call complete(1, ['source', 'soundfold'])
return ''
endfunction
" vim: shiftwidth=2 sts=2 expandtab

View File

@@ -407,6 +407,7 @@ endfunction
function Test_helpgrep()
call s:test_xhelpgrep('c')
helpclose
call s:test_xhelpgrep('l')
endfunc

View File

@@ -15,11 +15,12 @@
#if defined(FEAT_EVAL) || defined(PROTO)
/* function flags */
#define FC_ABORT 1 /* abort function on error */
#define FC_RANGE 2 /* function accepts range */
#define FC_DICT 4 /* Dict function, uses "self" */
#define FC_CLOSURE 8 /* closure, uses outer scope variables */
#define FC_DELETED 16 /* :delfunction used while uf_refcount > 0 */
#define FC_ABORT 0x01 /* abort function on error */
#define FC_RANGE 0x02 /* function accepts range */
#define FC_DICT 0x04 /* Dict function, uses "self" */
#define FC_CLOSURE 0x08 /* closure, uses outer scope variables */
#define FC_DELETED 0x10 /* :delfunction used while uf_refcount > 0 */
#define FC_REMOVED 0x20 /* function redefined while uf_refcount > 0 */
/* From user function to hashitem and back. */
#define UF2HIKEY(fp) ((fp)->uf_name)
@@ -64,7 +65,7 @@ static int
# endif
prof_self_cmp(const void *s1, const void *s2);
#endif
static void funccal_unref(funccall_T *fc, ufunc_T *fp);
static void funccal_unref(funccall_T *fc, ufunc_T *fp, int force);
void
func_init()
@@ -178,14 +179,17 @@ err_ret:
static int
register_closure(ufunc_T *fp)
{
funccal_unref(fp->uf_scoped, NULL);
if (fp->uf_scoped == current_funccal)
/* no change */
return OK;
funccal_unref(fp->uf_scoped, fp, FALSE);
fp->uf_scoped = current_funccal;
current_funccal->fc_refcount++;
if (ga_grow(&current_funccal->fc_funcs, 1) == FAIL)
return FAIL;
((ufunc_T **)current_funccal->fc_funcs.ga_data)
[current_funccal->fc_funcs.ga_len++] = fp;
func_ptr_ref(current_funccal->func);
return OK;
}
@@ -598,14 +602,12 @@ free_funccal(
{
ufunc_T *fp = ((ufunc_T **)(fc->fc_funcs.ga_data))[i];
if (fp != NULL)
{
/* Function may have been redefined and point to another
* funccall_T, don't clear it then. */
if (fp->uf_scoped == fc)
fp->uf_scoped = NULL;
func_ptr_unref(fc->func);
}
/* When garbage collecting a funccall_T may be freed before the
* function that references it, clear its uf_scoped field.
* The function may have been redefined and point to another
* funccall_T, don't clear it then. */
if (fp != NULL && fp->uf_scoped == fc)
fp->uf_scoped = NULL;
}
ga_clear(&fc->fc_funcs);
@@ -1024,67 +1026,60 @@ call_user_func(
/*
* Unreference "fc": decrement the reference count and free it when it
* becomes zero. If "fp" is not NULL, "fp" is detached from "fc".
* becomes zero. "fp" is detached from "fc".
* When "force" is TRUE we are exiting.
*/
static void
funccal_unref(funccall_T *fc, ufunc_T *fp)
funccal_unref(funccall_T *fc, ufunc_T *fp, int force)
{
funccall_T **pfc;
int i;
int freed = FALSE;
if (fc == NULL)
return;
if (--fc->fc_refcount <= 0)
{
if (--fc->fc_refcount <= 0 && (force || (
fc->l_varlist.lv_refcount == DO_NOT_FREE_CNT
&& fc->l_vars.dv_refcount == DO_NOT_FREE_CNT
&& fc->l_avars.dv_refcount == DO_NOT_FREE_CNT)))
for (pfc = &previous_funccal; *pfc != NULL; pfc = &(*pfc)->caller)
{
if (fc == *pfc)
{
if (fc->l_varlist.lv_refcount == DO_NOT_FREE_CNT
&& fc->l_vars.dv_refcount == DO_NOT_FREE_CNT
&& fc->l_avars.dv_refcount == DO_NOT_FREE_CNT)
{
*pfc = fc->caller;
free_funccal(fc, TRUE);
freed = TRUE;
}
break;
*pfc = fc->caller;
free_funccal(fc, TRUE);
return;
}
}
}
if (!freed)
{
func_ptr_unref(fc->func);
if (fp != NULL)
for (i = 0; i < fc->fc_funcs.ga_len; ++i)
{
if (((ufunc_T **)(fc->fc_funcs.ga_data))[i] == fp)
((ufunc_T **)(fc->fc_funcs.ga_data))[i] = NULL;
}
}
for (i = 0; i < fc->fc_funcs.ga_len; ++i)
if (((ufunc_T **)(fc->fc_funcs.ga_data))[i] == fp)
((ufunc_T **)(fc->fc_funcs.ga_data))[i] = NULL;
}
/*
* Remove the function from the function hashtable. If the function was
* deleted while it still has references this was already done.
* Return TRUE if the entry was deleted, FALSE if it wasn't found.
*/
static void
static int
func_remove(ufunc_T *fp)
{
hashitem_T *hi = hash_find(&func_hashtab, UF2HIKEY(fp));
if (!HASHITEM_EMPTY(hi))
{
hash_remove(&func_hashtab, hi);
return TRUE;
}
return FALSE;
}
/*
* Free a function and remove it from the list of functions.
* When "force" is TRUE we are exiting.
*/
static void
func_free(ufunc_T *fp)
func_free(ufunc_T *fp, int force)
{
/* clear this function */
ga_clear_strings(&(fp->uf_args));
@@ -1094,9 +1089,12 @@ func_free(ufunc_T *fp)
vim_free(fp->uf_tml_total);
vim_free(fp->uf_tml_self);
#endif
func_remove(fp);
/* only remove it when not done already, otherwise we would remove a newer
* version of the function */
if ((fp->uf_flags & (FC_DELETED | FC_REMOVED)) == 0)
func_remove(fp);
funccal_unref(fp->uf_scoped, fp);
funccal_unref(fp->uf_scoped, fp, force);
vim_free(fp);
}
@@ -1113,7 +1111,7 @@ free_all_functions(void)
for (hi = func_hashtab.ht_array; ; ++hi)
if (!HASHITEM_EMPTY(hi))
{
func_free(HI2UF(hi));
func_free(HI2UF(hi), TRUE);
break;
}
hash_clear(&func_hashtab);
@@ -1327,7 +1325,7 @@ call_func(
if (--fp->uf_calls <= 0 && fp->uf_refcount <= 0)
/* Function was unreferenced while being used, free it
* now. */
func_free(fp);
func_free(fp, FALSE);
if (did_save_redo)
restoreRedobuff();
restore_search_patterns();
@@ -1670,6 +1668,20 @@ theend:
return name;
}
/*
* There are two kinds of function names:
* 1. ordinary names, function defined with :function
* 2. numbered functions and lambdas
* For the first we only count the name stored in func_hashtab as a reference,
* using function() does not count as a reference, because the function is
* looked up by name.
*/
static int
func_name_refcount(char_u *name)
{
return isdigit(*name) || *name == '<';
}
/*
* ":function"
*/
@@ -1717,7 +1729,7 @@ ex_function(exarg_T *eap)
{
--todo;
fp = HI2UF(hi);
if (!isdigit(*fp->uf_name))
if (!func_name_refcount(fp->uf_name))
list_func_head(fp, FALSE);
}
}
@@ -2158,6 +2170,7 @@ ex_function(exarg_T *eap)
/* This function is referenced somewhere, don't redefine it but
* create a new one. */
--fp->uf_refcount;
fp->uf_flags |= FC_REMOVED;
fp = NULL;
overwrite = TRUE;
}
@@ -2705,22 +2718,21 @@ ex_delfunction(exarg_T *eap)
}
else
{
/* Normal functions (not numbered functions and lambdas) have a
/* A normal function (not a numbered function or lambda) has a
* refcount of 1 for the entry in the hashtable. When deleting
* them and the refcount is more than one, it should be kept.
* Numbered functions and lambdas snould be kept if the refcount is
* it and the refcount is more than one, it should be kept.
* A numbered function and lambda snould be kept if the refcount is
* one or more. */
if (fp->uf_refcount > (isdigit(fp->uf_name[0])
|| fp->uf_name[0] == '<' ? 0 : 1))
if (fp->uf_refcount > (func_name_refcount(fp->uf_name) ? 0 : 1))
{
/* Function is still referenced somewhere. Don't free it but
* do remove it from the hashtable. */
func_remove(fp);
if (func_remove(fp))
fp->uf_refcount--;
fp->uf_flags |= FC_DELETED;
fp->uf_refcount--;
}
else
func_free(fp);
func_free(fp, FALSE);
}
}
}
@@ -2734,7 +2746,7 @@ func_unref(char_u *name)
{
ufunc_T *fp = NULL;
if (name == NULL)
if (name == NULL || !func_name_refcount(name))
return;
fp = find_func(name);
if (fp == NULL && isdigit(*name))
@@ -2749,7 +2761,7 @@ func_unref(char_u *name)
/* Only delete it when it's not being used. Otherwise it's done
* when "uf_calls" becomes zero. */
if (fp->uf_calls == 0)
func_free(fp);
func_free(fp, FALSE);
}
}
@@ -2765,7 +2777,7 @@ func_ptr_unref(ufunc_T *fp)
/* Only delete it when it's not being used. Otherwise it's done
* when "uf_calls" becomes zero. */
if (fp->uf_calls == 0)
func_free(fp);
func_free(fp, FALSE);
}
}
@@ -2777,7 +2789,7 @@ func_ref(char_u *name)
{
ufunc_T *fp;
if (name == NULL)
if (name == NULL || !func_name_refcount(name))
return;
fp = find_func(name);
if (fp != NULL)
@@ -3571,11 +3583,12 @@ get_current_funccal_dict(hashtab_T *ht)
* Search hashitem in parent scope.
*/
hashitem_T *
find_hi_in_scoped_ht(char_u *name, char_u **varname, hashtab_T **pht)
find_hi_in_scoped_ht(char_u *name, hashtab_T **pht)
{
funccall_T *old_current_funccal = current_funccal;
hashtab_T *ht;
hashitem_T *hi = NULL;
char_u *varname;
if (current_funccal == NULL || current_funccal->func->uf_scoped == NULL)
return NULL;
@@ -3584,10 +3597,10 @@ find_hi_in_scoped_ht(char_u *name, char_u **varname, hashtab_T **pht)
current_funccal = current_funccal->func->uf_scoped;
while (current_funccal != NULL)
{
ht = find_var_ht(name, varname);
if (ht != NULL && **varname != NUL)
ht = find_var_ht(name, &varname);
if (ht != NULL && *varname != NUL)
{
hi = hash_find(ht, *varname);
hi = hash_find(ht, varname);
if (!HASHITEM_EMPTY(hi))
{
*pht = ht;
@@ -3607,11 +3620,12 @@ find_hi_in_scoped_ht(char_u *name, char_u **varname, hashtab_T **pht)
* Search variable in parent scope.
*/
dictitem_T *
find_var_in_scoped_ht(char_u *name, char_u **varname, int no_autoload)
find_var_in_scoped_ht(char_u *name, int no_autoload)
{
dictitem_T *v = NULL;
funccall_T *old_current_funccal = current_funccal;
hashtab_T *ht;
char_u *varname;
if (current_funccal == NULL || current_funccal->func->uf_scoped == NULL)
return NULL;
@@ -3620,11 +3634,10 @@ find_var_in_scoped_ht(char_u *name, char_u **varname, int no_autoload)
current_funccal = current_funccal->func->uf_scoped;
while (current_funccal)
{
ht = find_var_ht(name, varname ? &(*varname) : NULL);
if (ht != NULL)
ht = find_var_ht(name, &varname);
if (ht != NULL && *varname != NUL)
{
v = find_var_in_ht(ht, *name,
varname ? *varname : NULL, no_autoload);
v = find_var_in_ht(ht, *name, varname, no_autoload);
if (v != NULL)
break;
}
@@ -3657,6 +3670,21 @@ set_ref_in_previous_funccal(int copyID)
return abort;
}
static int
set_ref_in_funccal(funccall_T *fc, int copyID)
{
int abort = FALSE;
if (fc->fc_copyID != copyID)
{
fc->fc_copyID = copyID;
abort = abort || set_ref_in_ht(&fc->l_vars.dv_hashtab, copyID, NULL);
abort = abort || set_ref_in_ht(&fc->l_avars.dv_hashtab, copyID, NULL);
abort = abort || set_ref_in_func(NULL, fc->func, copyID);
}
return abort;
}
/*
* Set "copyID" in all local vars and arguments in the call stack.
*/
@@ -3667,10 +3695,31 @@ set_ref_in_call_stack(int copyID)
funccall_T *fc;
for (fc = current_funccal; fc != NULL; fc = fc->caller)
abort = abort || set_ref_in_funccal(fc, copyID);
return abort;
}
/*
* Set "copyID" in all functions available by name.
*/
int
set_ref_in_functions(int copyID)
{
int todo;
hashitem_T *hi = NULL;
int abort = FALSE;
ufunc_T *fp;
todo = (int)func_hashtab.ht_used;
for (hi = func_hashtab.ht_array; todo > 0 && !got_int; ++hi)
{
fc->fc_copyID = copyID;
abort = abort || set_ref_in_ht(&fc->l_vars.dv_hashtab, copyID, NULL);
abort = abort || set_ref_in_ht(&fc->l_avars.dv_hashtab, copyID, NULL);
if (!HASHITEM_EMPTY(hi))
{
--todo;
fp = HI2UF(hi);
if (!func_name_refcount(fp->uf_name))
abort = abort || set_ref_in_func(NULL, fp, copyID);
}
}
return abort;
}
@@ -3692,9 +3741,6 @@ set_ref_in_func_args(int copyID)
/*
* Mark all lists and dicts referenced through function "name" with "copyID".
* "list_stack" is used to add lists to be marked. Can be NULL.
* "ht_stack" is used to add hashtabs to be marked. Can be NULL.
*
* Returns TRUE if setting references failed somehow.
*/
int
@@ -3706,6 +3752,7 @@ set_ref_in_func(char_u *name, ufunc_T *fp_in, int copyID)
char_u fname_buf[FLEN_FIXED + 1];
char_u *tofree = NULL;
char_u *fname;
int abort = FALSE;
if (name == NULL && fp_in == NULL)
return FALSE;
@@ -3718,17 +3765,10 @@ set_ref_in_func(char_u *name, ufunc_T *fp_in, int copyID)
if (fp != NULL)
{
for (fc = fp->uf_scoped; fc != NULL; fc = fc->func->uf_scoped)
{
if (fc->fc_copyID != copyID)
{
fc->fc_copyID = copyID;
set_ref_in_ht(&fc->l_vars.dv_hashtab, copyID, NULL);
set_ref_in_ht(&fc->l_avars.dv_hashtab, copyID, NULL);
}
}
abort = abort || set_ref_in_funccal(fc, copyID);
}
vim_free(tofree);
return FALSE;
return abort;
}
#endif /* FEAT_EVAL */

View File

@@ -763,6 +763,50 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
2161,
/**/
2160,
/**/
2159,
/**/
2158,
/**/
2157,
/**/
2156,
/**/
2155,
/**/
2154,
/**/
2153,
/**/
2152,
/**/
2151,
/**/
2150,
/**/
2149,
/**/
2148,
/**/
2147,
/**/
2146,
/**/
2145,
/**/
2144,
/**/
2143,
/**/
2142,
/**/
2141,
/**/
2140,
/**/
2139,
/**/

View File

@@ -561,6 +561,7 @@ typedef unsigned long u8char_T; /* long should be 32 bits or more */
# endif
/* These are in os_win32.c */
extern char *(*dyn_libintl_gettext)(const char *msgid);
extern char *(*dyn_libintl_ngettext)(const char *msgid, const char *msgid_plural, unsigned long n);
extern char *(*dyn_libintl_bindtextdomain)(const char *domainname, const char *dirname);
extern char *(*dyn_libintl_bind_textdomain_codeset)(const char *domainname, const char *codeset);
extern char *(*dyn_libintl_textdomain)(const char *domainname);
@@ -574,6 +575,7 @@ extern char *(*dyn_libintl_textdomain)(const char *domainname);
#ifdef FEAT_GETTEXT
# ifdef DYNAMIC_GETTEXT
# define _(x) (*dyn_libintl_gettext)((char *)(x))
# define ngettext(x, xs, n) (*dyn_libintl_ngettext)((char *)(x), (char *)(xs), (n))
# define N_(x) x
# define bindtextdomain(domain, dir) (*dyn_libintl_bindtextdomain)((domain), (dir))
# define bind_textdomain_codeset(domain, codeset) (*dyn_libintl_bind_textdomain_codeset)((domain), (codeset))
@@ -592,6 +594,7 @@ extern char *(*dyn_libintl_textdomain)(const char *domainname);
# endif
#else
# define _(x) ((char *)(x))
# define ngettext(x, xs, n) (((n) == 1) ? (char *)(x) : (char *)(xs))
# define N_(x) x
# ifdef bindtextdomain
# undef bindtextdomain
@@ -1501,6 +1504,8 @@ typedef UINT32_TYPEDEF UINT32_T;
# define MSG_BUF_CLEN MSG_BUF_LEN /* cell length */
#endif
#define FOLD_TEXT_LEN 51 /* buffer size for get_foldtext() */
/* Size of the buffer used for tgetent(). Unfortunately this is largely
* undocumented, some systems use 1024. Using a buffer that is too small
* causes a buffer overrun and a crash. Use the maximum known value to stay