Commit Graph

7164 Commits

Author SHA1 Message Date
Anmol Sethi
d8a97d7b79 man.vim: do not set ft=man on files with extension man (#5831)
Closes #5806
2017-01-04 13:01:03 +01:00
ZyX
d82f5d1ba2 plugin/msgpack: Support character constants like '\0' 2017-01-04 14:53:02 +03:00
ZyX
a934144e04 doc: Document that character constants are supported 2017-01-04 14:52:13 +03:00
Justin M. Keyes
6f9be2464c Merge #5872 justinmk/test_autochdir 2017-01-04 08:24:36 +01:00
Justin M. Keyes
af828f2257 Merge #5864 from ZyX-I/fix-5857
unittest: Allow multiple indirect includes
2017-01-04 11:54:11 +01:00
Justin M. Keyes
a63675c384 test/helpers.rmdir(): Windows: Change to top-level dir on failure.
On Windows, if the nvim process has a directory open the lua process
cannot remove it. After failing once, it's safe to force `nvim` to the
top-level directory. Then try again.
2017-01-04 07:23:13 +01:00
Justin M. Keyes
e43f7425ee refactor: Remove VimL function test()
vim-patch:7.4.1838
2017-01-04 07:23:13 +01:00
Justin M. Keyes
097c8dccca refactor: Remove VimL function test_autochdir()
- Eliminate global test_autochdir.
- Eliminate VimL function test_autochdir()
- Use a lua test instead. Fails correctly after reverting
  0c43479979 / vim-patch:7.4.2015.
2017-01-04 07:23:13 +01:00
lonerover
c56411ed87 vim-patch:7.4.2043 (#5871)
Problem:    setbuvfar() causes a screen redraw.
Solution:   Only use aucmd_prepbuf() for options.

93431df9eb
2017-01-04 06:16:21 +01:00
Justin M. Keyes
e03b43bd07 test: skip_fragile(), TEST_SKIP_FRAGILE
Let build systems define TEST_SKIP_FRAGILE to skip tests that are known to be
resource-intensive (unreliable on slow systems).

References https://github.com/neovim/neovim/pull/5488#issuecomment-265622113
2017-01-04 04:24:18 +01:00
Justin M. Keyes
f4d326cf10 test: ctrl_c_spec
- Improve test reliability by only checking for a line with the string
  we are interested in ("Interrupt").
- Try to avoid OOM by loading an existing big file instead of looping to
  create one.
2017-01-04 03:18:30 +01:00
Marco Hinz
15259c4b84 clipboard: show error message only once and put in history (#5870) 2017-01-04 00:45:31 +01:00
Shougo
9cb31ecdb0 syntax/ruby.vim, perl.vim: Preserve 'foldmethod'. (#5858) 2017-01-03 23:53:59 +01:00
ZyX
3c64b814d2 unittests: Fix linter errors 2017-01-03 23:58:12 +03:00
ZyX
937b6fac8f unittest: Fix linter errors 2017-01-03 22:54:55 +03:00
ZyX
b38e725428 unittest: Refactor preprocess.lua
Keeps arguments separated and not joined as a single string as long as possible. 
Abstracts away additional arguments so that Gcc:preprocess should work for 
compilers with different conventions should they be supported.
2017-01-03 22:54:55 +03:00
ZyX
2151ddbd73 unittest: Move nil checks to Gcc:preprocess 2017-01-03 22:54:54 +03:00
ZyX
0d7b779cab unittest: Record previous defines in another place
Previous commit made preprocess.lua know how its output will be used. This moves 
state to cimport, making only it know which is cleaner.
2017-01-03 22:54:54 +03:00
ZyX
410d18ef5c unittest: Allow multiple indirect includes
Works by saving all preprocessor defines and reusing them on each run. This also
saves NVIM_HEADER_H defines. Saving other defines is needed for defines like
`Map(foo, bar)` which are sometimes used to declare types or functions. Saving
types or function declarations is not needed because they are recorded as luajit
state.

Fixes #5857
2017-01-03 22:54:54 +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
James McCoy
3b793d0453 Merge pull request #5835 from lonerover/vim-7.4.1847
vim-patch:7.4.1847
2017-01-03 11:36:56 -05:00
lonerover
17dc20369e fix lint error 2017-01-03 10:42:44 -05:00
lonerover
1bea73a21e vim-patch:7.4.1847
Problem:    Getting an item from a NULL dict crashes.  Setting a register to a
            NULL list crashes. (Nikolai Pavlov, issue vim/vim#768)  Comparing a NULL
            dict with a NULL dict fails.
Solution:   Properly check for NULL.

13ddc5c359
2017-01-03 10:38:56 -05: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
Tommy Allen
fd9cc8b0b2 automation: Generate API documentation (#5798)
runtime: Add underscore to {} helpSpecial syntax pattern

docs: Added generated api-funcs.txt
2017-01-03 13:11:19 +01: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