Commit Graph

7098 Commits

Author SHA1 Message Date
ZyX
dd48d7b94b eval: Fix typo 2017-01-07 00:17:31 +03:00
ZyX
527636f158 functests: Add tests for new fixes 2017-01-06 23:52:31 +03:00
ZyX
1052009b37 eval/typval_encode: Dump empty dictionary before checking for refcycle
Otherwise copyID will stay forever on empty dictionaries.
2017-01-06 23:32:04 +03:00
ZyX
10c6e68db6 eval: Work with reference cycles in partials (self) properly 2017-01-06 22:57:34 +03:00
ZyX
6584fb723a eval/typval_encode: Use TYPVAL_ENCODE_CONV_EMPTY_DICT for partials 2017-01-06 22:48:50 +03:00
ZyX
7f11ec00fd eval/typval_encode.h: Remove documentation that is located in *.c.h 2017-01-06 22:38:46 +03:00
ZyX
c93ce07628 *: Remove // fname() comments near typval_encode includes 2017-01-04 19:04:15 +03:00
ZyX
358097ac5f eval/encode: Always check the return value of encode_vim_to_\* 2017-01-04 19:02:39 +03:00
ZyX
3c64b814d2 unittests: Fix linter errors 2017-01-03 23:58:12 +03:00
ZyX
136b382e64 tests: Add tests for partials dumping
Also fixed dumping of partials by encode_vim_to_object and added code which is 
able to work with partials and dictionaries to test/unit/eval/helpers.lua 
(mostly copied from #5119, except for partials handling).
2017-01-03 22:51:29 +03:00
ZyX
efc624c2fe eval: Fix errorneous early exit when converting lists and dictionaries 2017-01-03 17:28:57 +03:00
ZyX
f21725946c eval/encode: Fail when stringifying NULL functions 2017-01-03 16:13:21 +03:00
ZyX
06cca5dc59 eval/typval_encode: Handle NULL partials properly 2017-01-03 07:44:54 +03:00
ZyX
9c84f3ba3e eval/typval_encode: Provide proper values as dict argument 2017-01-03 07:41:05 +03:00
ZyX
a5bdd64a5e eval: Fix unused variable error in release builds 2017-01-03 07:14:54 +03:00
ZyX
a52238707c eval/encode: Fix 4 new linter failures 2017-01-03 06:39:23 +03:00
ZyX
ff8944105d eval/typval_encode: Refactor arguments to argument macroses
Fixed local test failures somewhere in process.
2017-01-03 06:39:23 +03:00
ZyX
5ba24318e2 eval: Do not free partial contents if partial is still referenced
Should fix some tests, including core/job_partial tests.
2017-01-03 06:39:23 +03:00
ZyX
67b53361ba eval/typval_encode: Rename some \*tv variables
Renames `tv` function argument to `top_tv` and `cur_tv` variable to `tv`, so 
`tv` will mean something more or less the same in both 
_TYPVAL_ENCODE_CONVERT_ONE_VALUE and _TYPVAL_ENCODE_ENCODE functions.
2017-01-03 06:39:23 +03:00
ZyX
e2d81cc479 eval: Do not free partial lists as lists 2017-01-03 06:39:23 +03:00
ZyX
901e7805ee eval: Fix case when cur_mpsv is NULL
Should only happen when clearing VAR_FUNC typval which is not placed inside 
a container.
2017-01-03 06:39:23 +03:00
ZyX
759e736b0a eval/typval_encode: Fix infinite loop
Occurs when trying to dump a partial with attached self dictionary which
references that partial. “Infinite” loop should normally result in Neovim killed
by OOM killer.

Also moved the place when partials are unreferenced by clear_tv: from
…FUNC_START to …FUNC_END.
2017-01-03 06:39:23 +03:00
ZyX
affa3c2baa api/helpers: Fix unused variable error in release build 2017-01-03 06:39:23 +03:00
ZyX
dd27fcfda5 eval/typval_encode: Fix linter errors 2017-01-03 06:39:23 +03:00
ZyX
38ab553eb2 clint: Allow including .c.h files multiple times
Except when they are system just in case. There should be no .c.h system files 
though, but if there will be it is unlikely that they inherit the same 
convention.
2017-01-03 06:39:23 +03:00
ZyX
27343bc5b2 eval/typval_encode: Fix crashes 2017-01-03 06:39:23 +03:00
ZyX
b3163d06b3 eval/typval_encode: Refactor big-big macros into .c.h file
This makes gdb backtraces much more meaningful: specifically I now know at which 
line it crashes in place of seeing that it crashes at 
TYPVAL_ENCODE_DEFINE_CONV_FUNCTIONS macros invocation.
2017-01-03 06:39:23 +03:00
ZyX
c5c75513b8 eval/typval_encode: Make partial conversions not recursive
Is known to crash in the current state.

Ref #5825.
2017-01-03 06:39:23 +03:00
James McCoy
efe1476d42 Merge pull request #5743 from jamessan/na-vim-patches
version.c: Mark NA patches
2017-01-02 13:57:26 -05:00
James McCoy
af2b5abcd6
lint 2017-01-02 07:18:18 -05:00
James McCoy
9264f4cbbb
Mark 'execute()' patches applied
vim-patch:7.4.1996

Problem:    Capturing the output of a command takes a few commands.
Solution:   Add evalcmd().

1e5e1231ac

vim-patch:7.4.1999

Problem:    evalcmd() doesn't work recursively.
Solution:   Use redir_evalcmd instead of redir_vname.

bc5d6dd1dd

vim-patch:7.4.2000

Problem:    Evalcmd test fails.
Solution:   Add missing piece.

245a7cb6d3

vim-patch:7.4.2005

Problem:    After using evalcmd() message output is in the wrong position.
            (Christian Brabandt)
Solution:   Reset msg_col.

ee1deb4a00
2017-01-02 07:11:02 -05:00
James McCoy
5b8bdca564
vim-patch:7.4.1861
Problem:    Compiler warnings with 64 bit compiler.
Solution:   Change int to size_t. (Mike William)

b055066a1d

Functional changes had already been made when package feature was
initially merged.
2017-01-02 07:11:02 -05:00
James McCoy
94a08e8186
vim-patch:7.4.1839
Problem:    Cannot get the items stored in a partial.
Solution:   Support using get() on a partial.

2bbf8eff6f

The content of this was already applied in the partials PR, but no
commit mentioned the upstream patch.
2017-01-02 07:11:02 -05:00
James McCoy
be177bce8f
vim-patch:7.4.1781
Problem:    synIDattr() does not respect 'guicolors'.
Solution:   Change the conditition for the mode. (Christian Brabandt)

da5b3dcf06
2017-01-02 07:11:02 -05:00
James McCoy
27b5fa59f5
vim-patch:7.4.1656
Problem:    Crash when using partial with a timer.
Solution:   Increment partial reference count. (Hirohito Higashi)

92e35efaf6

The content of this was already applied in the partials PR, but no
commit mentioned the upstream patch.
2017-01-02 07:11:01 -05:00
James McCoy
67d57f6917
version.c: Mark NA patches
- 1727: garbagecollect_for_testing()
- 1761,1762: NA Coverity issue
- 1769: Adding attributes to if_pyth's sys.stdout
- 1812: Athena/Motif GUI fixes
- 1838: Rename of test functions (e.g., garbagecollect_for_testing()) to start with "test_"
- 1844: More test function renames
- 1888: Calculating sleep time for RealWaitForChar
- 1903,1904,1905,1907,1911,1936: viminfo merging
- 1955: Fix for 64-bit Vim linking against 32-bit Perl due to differing time_t
- 1971: settmode() change for Solaris
- 2073: Reading rgb.txt
- 2093: Netbeans test
- 2094: GUI color allocation changes
- 2132, 2198: job tests
2017-01-02 07:10:49 -05:00
James McCoy
f7639e2490 Merge pull request #5859 from jamessan/vim-7.4.1866
vim-patch:7.4.1866,7.4.1868
2017-01-02 06:39:47 -05:00
James McCoy
945540b782
vim-patch:7.4.1868
Problem:    Setting really_exiting causes memory leaks to be reported.
Solution:   Add the in_free_all_mem flag.

b89a25f17e
2017-01-01 23:20:31 -05:00
James McCoy
1feaa450cb
vim-patch:7.4.1866
Problem:    Invalid memory access when exiting with EXITFREE defined.
            (Dominique Pelle)
Solution:   Set "really_exiting" and skip error messages.

a96732150c

This fails to build, due to a00c2e0ecb
removing really_exiting from globals.h, but the next commit fixes the
build failure.
2017-01-01 23:20:24 -05:00
James McCoy
c5f4b92ff9 Merge pull request #5613 from jamessan/vim-7.4.2183
vim-patch:7.4.2183,7.4.2194,7.4.2201,7.4.2204,0952131,7.4.2215,7.4.2225,7.4.2226,7.4.2272,7.4.2273,7.4.2277,7.4.2294
2017-01-01 15:12:33 -05:00
Justin M. Keyes
57ce8b5648 Merge #5855 from lonerover/vim-7.4.2019
vim-patch:7.4.2019,7.4.2028
2017-01-01 16:30:21 +01:00
rover
13e2e22073 vim-patch:7.4.2028
Problem:    cppcheck warns for using index before limits check.
Solution:   Swap the expressions. (Dominique Pelle)

5498a41f5a
2017-01-01 23:18:30 +08:00
Shougo
3d3545bbc1 vim-patch:7.4.1834 (#5854)
Problem:    Possible crash when conceal is active.
Solution:   Check for the screen to be valid when redrawing a line.

908be43879
2017-01-01 16:07:49 +01:00
Anmol Sethi
f6c4e0961d man.vim: remove newline from man errors (#5852) 2017-01-01 15:09:27 +01:00
rover
6705652928 vim-patch:7.4.2019
Problem:    When ignoring case utf_fold() may consume a lot of time.
Solution:   Optimize for ASCII.

c4a927ca8d
2017-01-01 21:15:50 +08:00
Justin M. Keyes
61d4ca214f Merge #5804 from brcolow/vim-7.4.1793
vim-patch:7.4.17[83,85,93]
2016-12-31 23:43:49 +01:00
Michael Ennen
137dfdcc4e vim-patch:7.4.1785
Problem:    Regexp test fails on windows.
Solution:   set 'isprint' to the right value for testing.

490465bda6
2016-12-31 14:38:27 -07:00
Michael Ennen
e8ccaa7a52 vim-patch:7.4.1783
Problem:    The old regexp engine doesn't handle character classes correctly.
            (Manuel Ortega)
Solution:   Use regmbc() instead of regc().  Add a test.

af98a49dd0
2016-12-31 14:38:27 -07:00
Michael Ennen
415495273c vim-patch:7.4.1793
Problem:    Some character classes may differ between systems.  On OS/X the
            regexp test fails.
Solution:   Make this less dependent on the system. (idea by Kazunobu Kuriyama)

e8aee7dcf9
2016-12-31 14:38:27 -07:00
lonerover
5366242789 vim-patch:7.4.1970 (#5850)
Problem:    Using ":insert" in an empty buffer sets the jump mark. (Ingo
            Karkat)
Solution:   Don't adjust marks when replacing the empty line in an empty
            buffer. (closes vim/vim#892)

70e136e1d8
2016-12-31 17:32:50 +01:00