aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
Commit message (Collapse)AuthorAge
...
| * | *: Use const char * in set_one_cmd_contextZyX2017-03-29
| | | | | | | | | Also renames functions added in master and renamed here.
| * | eval: Fix -Werror=unitialized from QBZyX2017-03-29
| | |
| * | eval: Do not supply S_LEN to strncmpZyX2017-03-29
| | | | | | | | | It may be a macro as well.
| * | eval: Fix extend() behaviour with NULL lists and dictionariesZyX2017-03-29
| | | | | | | | | | | | | | | Ref #4615 Ref vim/vim#768
| * | eval: Use tv_is_func in place of ==VAR_FUNC||==VAR_PARTIALZyX2017-03-29
| | | | | | | | | | | | Also fixes same error as in vim/vim#1557
| * | eval: Do not use S_LEN as snprintf argumentZyX2017-03-29
| | |
| * | eval: Fix SEGV in test49ZyX2017-03-29
| | |
| * | eval: Fix len argument to xstrlcatZyX2017-03-29
| | |
| * | eval: Fix linter errorsZyX2017-03-29
| | |
| * | *: Make some more things const and with lengthZyX2017-03-29
| | |
| * | eval: Make dictionary watchers work with empty keysZyX2017-03-29
| | | | | | | | | | | | | | | | | | | | | | | | Looks like dict_notifications_spec test used to depend on some state which should not be preserved. Changed all `setup()` calls to `before_each()` and added necessary state in addition to changes required to test empty keys. Note: unit tests for tv_dict_watcher* are still needed.
| * | eval: Move part of dictwatcher* functions to eval/typvalZyX2017-03-29
| | |
| * | unittests: Add tests for tv_list_find*() functionsZyX2017-03-29
| | | | | | | | | | | | | | | | | | | | | | | | Additional modifications: - More `const` qualifiers in tested functions. - `tv_list_find_str()` second argument is more in-line with other `tv_list_find*()` functions.
| * | unittests: Test tv_list_copyZyX2017-03-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also found some bugs: 1. var_item_copy() always fails to copy v:_null_list and v:_null_dict. Fixing this should mean fixing `deepcopy(v:_null_list)` which should’ve been, but was not listed in #4615. This also fixes `deepcopy(v:_null_dict)`. 2. var_item_copy() crashes when trying to copy NULL string with `conv != NULL`. 3. `conv` argument is ignored when copying list unless `deep` is true, but it was not reflected in documentation. 4. `tv_dict_item_alloc_len()` allocated more memory then needed. 5. typvalt2lua was not able to handle self-referencing containers.
| * | eval: Move copy_tv to eval/typvalZyX2017-03-29
| | |
| * | eval: Fix max_min functionsZyX2017-03-29
| | | | | | | | | | | | | | | | | | Found two bugs: 1. Multiple unneeded error messages, vim/vim#1039. 2. Unformatted error string, vim/vim#1040.
| * | typval.h: Allow non-var expressions in TV_DICT_ITER first argumentZyX2017-03-29
| | |
| * | eval: Make sort always stableZyX2017-03-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Should fix test failures on QB: 20:00:51,837 INFO - not ok 420 - sort() sorts “wrong” values between -0.0001 and 0.0001, preserving order 20:00:51,837 INFO - # test/functional/eval/sort_spec.lua @ 21 20:00:51,837 INFO - # Failure message: test/functional/eval/sort_spec.lua:39: Expected objects to be the same. 20:00:51,837 INFO - # Passed in: 20:00:51,837 INFO - # (string) '[-1.0e-4, v:true, v:false, v:null, function('tr'), {'a': 42}, 'check', [], 1.0e-4]' 20:00:51,837 INFO - # Expected: 20:00:51,837 INFO - # (string) '[-1.0e-4, function('tr'), v:true, v:false, v:null, [], {'a': 42}, 'check', 1.0e-4]' 20:00:51,837 INFO - # stack traceback: 20:00:51,837 INFO - # test/functional/eval/sort_spec.lua:39: in function <test/functional/eval/sort_spec.lua:22> 20:00:51,837 INFO - #
| * | eval: Remove eval_expr() completelyZyX2017-03-29
| | |
| * | eval: Move remaining get_tv_string* functions to eval/typval.cZyX2017-03-29
| | |
| * | eval: Move free_tv to eval/typval.h, remove most of its usagesZyX2017-03-29
| | |
| * | eval: Move get_tv_number[_chk] to eval/typval.cZyX2017-03-29
| | |
| * | eval: Refactor get_tv_lnum_bufZyX2017-03-29
| | |
| * | eval: Move get_tv_lnum and get_tv_float to eval/typval.hZyX2017-03-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | Additionally - Rename former tv_get_float to tv_get_float_chk due to name conflict (former get_tv_float is better suited for being tv_get_float). - Add E907 error to get_tv_float() and test that it is being raised when appropriate.
| * | eval: Move get_tv_string_buf() to eval/typval.cZyX2017-03-29
| | |
| * | eval,*: Move get_tv_string to typval.cZyX2017-03-29
| | | | | | | | | | | | Function was renamed and changed to return `const char *`.
| * | eval: Move get_float_arg to typval.hZyX2017-03-29
| | | | | | | | | | | | | | | | | | Assuming `inline` is there for a reason, so it is kept and function was moved to typval.h and not to typval.c which does not have problems with #including message.h.
| * | eval: Split and move dict_add_nr_str to typval.cZyX2017-03-29
| | | | | | | | | | | | Function was split into tv_dict_add_nr() and tv_dict_add_str().
| * | eval: Move dict_add_list and dict_add_dict to typval.cZyX2017-03-29
| | |
| * | eval: Move dict_set_keys_readonly to typval.cZyX2017-03-29
| | |
| * | eval: Move get_dict_callback to typval.cZyX2017-03-29
| | |
| * | eval: Make setmatches() return -1 in case of some failuresZyX2017-03-29
| | |
| * | *: Move some dictionary functions to typval.h and use char*ZyX2017-03-29
| | | | | | | | | | | | Also fixes buffer reusage in setmatches() and complete().
| * | eval: Split eval.c into smaller filesZyX2017-03-29
| | |
| * | getcompletion("cmdline") (#6376)Justin M. Keyes2017-03-27
| | | | | | | | | Closes #5823
* | | eval,functests: Fix linter errorsZyX2017-03-27
| | |
* | | executor: Add :lua debug.debug mockZyX2017-03-27
| | |
* | | api: Reserve more numbers for internal callsZyX2017-03-27
| | | | | | | | | | | | | | | | | | Reasoning; currently INTERNAL_CALL is mostly used to determine whether it is needed to deal with NL-used-as-NUL problem. This code is useful for nvim_… API calls done from VimL, but not for API calls done from lua, yet lua needs to supply something as channel_id.
* | | executor: Make sure it works with API valuesZyX2017-03-27
| | |
* | | *: Silence linterZyX2017-03-27
| | |
* | | viml/executor: Directly generate typval_T valuesZyX2017-03-27
| | | | | | | | | | | | | | | Note: this will *still* crash when using API in cases similar to the one described in first commit. Just it needs different code to reproduce.
* | | eval: Add luaeval functionZyX2017-03-27
|/ / | | | | | | | | | | | | | | | | | | | | | | No tests yet, no documentation update, no :lua* stuff, no vim module. converter.c should also work with typval_T, not Object. Known problem: luaeval("1", {}) results in PANIC: unprotected error in call to Lua API (attempt to index a nil value) Ref #3823
* | refactor: Remove allow_keys global (#6346)Matthew Malcomson2017-03-25
| | | | | | | | | | | | * The allow_keys global is unused in nvim, remove it * clint
* | vim-patch:7.4.2329 (#6341)Jurica Bradarić2017-03-23
| | | | | | | | | | | | Problem: Error for min() and max() contains %s. (Nikolay Pavlov) Solution: Pass the function name. (closes vim/vim#1040) https://github.com/vim/vim/commit/26b84339fd8766898bcf6a259cbc2e0c38689726
* | Merge #6312 from lonerover/vim-7.4.2255Justin M. Keyes2017-03-22
|\ \ | | | | | | vim-patch: 7.4.2255,7.42256
| * | vim-patch:7.4.2256lonerover2017-03-21
| |/ | | | | | | | | | | | | Problem: Coverity complains about null pointer check. Solution: Remove wrong and superfluous error check. https://github.com/vim/vim/commit/db249f26edf7a5f88d1f4468d08ec5b84f5ab7ad
* | vim-patch:7.4.2283lonerover2017-03-22
| | | | | | | | | | | | | | Problem: Part of ":oldfiles" command isn't cleared. (Lifepillar) Solution: Clear the rest of the line. (closes 1018) https://github.com/vim/vim/commit/885c00eabe6d1fd757d4f0eb531ad3a15a35ec04
* | vim-patch:7.4.2293 (#6307)Jack Bracewell2017-03-21
|/ | | | | | | The original patch makes all the modeline comments consistent, but these have been removed in the neovim source. However there as a correction of a comment included in the patch that we can use. https://github.com/vim/vim/commit/edf3f97ae2af024708ebb4ac614227327033ca47
* vim-patch:7.4.2249 (#6303)Jack Bracewell2017-03-17
| | | | | | Problem: Missing colon in error message. Solution: Add the colon. (Dominique Pelle) https://github.com/vim/vim/commit/ba2099034f92a2814494f37bddb0c57d034401b4
* Merge #6252 from jamessan/vim-7.4.2069Justin M. Keyes2017-03-15
|\ | | | | vim-patch:7.4.2069,7.4.2101,7.4.2222,7.4.2223