aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
Commit message (Collapse)AuthorAge
...
* vim-patch:8.0.0659: no test for conceal modeJustin M. Keyes2018-01-21
| | | | | | | Problem: No test for conceal mode. Solution: Add a conceal mode test. (Dominique Pelle, closes vim/vim#1783) https://github.com/vim/vim/commit/4d785895d1f8b54cdd3fabd87446ca692f49e94e
* vim-patch:8.0.0655: not easy to make sure a function does not existJustin M. Keyes2018-01-21
| | | | | | | Problem: Not easy to make sure a function does not exist. Solution: Add ! as an optional argument to :delfunc. https://github.com/vim/vim/commit/d6abcd154cdc6a8dd4b7c6ccad37617ea8a1b4aa
* get_buffer_lines: Return a string, when requested, on invalid inputJames McCoy2018-01-15
| | | | Closes #7859
* Merge #7858 'vim-patch: spell-related patches'Justin M. Keyes2018-01-16
|\
| * vim-patch:8.0.1419: cursor column is not updated after ]sJustin M. Keyes2018-01-16
| | | | | | | | | | | | | | Problem: Cursor column is not updated after ]s. (Gary Johnson) Solution: Set the curswant flag. https://github.com/vim/vim/commit/b73fa629d6d3d705c1f8e8d5f8109fc9abd7bb6f
* | vim-patch:8.0.0151,3,4 #7389Justin M. Keyes2018-01-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vim-patch:8.0.0151 Problem: To pass buffer content to system() and systemlist() one has to first create a string or list. Solution: Allow passing a buffer number. (LemonBoy, closes vim/vim#1240) https://github.com/vim/vim/commit/12c4492dd35e0cd83c8816be2ec849b836109882 vim-patch:8.0.0153 Problem: system() test fails on MS-Windows. Solution: Deal when extra space and CR. https://github.com/vim/vim/commit/9d9c35651712b88c81f1ae11091de1fd0bbbd35c vim-patch:8.0.0154 Problem: system() test fails on OS/X. Solution: Deal with leading spaces. https://github.com/vim/vim/commit/31f19ce0a052f7c76d44a9a190e468c79cf5d56d
* | Merge #7806 from ZyX-I/list-statJustin M. Keyes2018-01-15
|\ \ | | | | | | Add a way to collect list usage statistics
| * | eval/typval: Log list actionsZyX2018-01-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New logging is guarded by cmake LOG_LIST_ACTIONS define. To make it more efficient it is allocated as a linked list with chunks of length 2^(7+chunk_num); that uses basically the same idea as behind increasing kvec length (make appending O(1) (amortized)), but reduces constant by not bothering to move memory around what realloc() would surely do: it is not like we need random access to log entries here to justify usage of a single continuous memory block.
| * | *: Provide list length when allocating listsZyX2018-01-14
| |/
* / coverity/161216: get_user_input: RETURN_LOCALJustin M. Keyes2018-01-11
|/ | | | | | | | | | | | | | | | | | | *** CID 161216: Memory - illegal accesses (RETURN_LOCAL) /src/nvim/eval.c: 11143 in get_user_input() 11137 rettv->vval.v_string = 11138 (char_u *)getcmdline_prompt(inputsecret_flag ? NUL : '@', p, echo_attr, 11139 xp_type, xp_arg, input_callback); 11140 ex_normal_busy = save_ex_normal_busy; 11141 callback_free(&input_callback); 11142 >>> CID 161216: Memory - illegal accesses (RETURN_LOCAL) >>> Using "cancelreturn", which points to an out-of-scope variable "def". 11143 if (rettv->vval.v_string == NULL && cancelreturn != NULL) { 11144 rettv->vval.v_string = (char_u *)xstrdup(cancelreturn); 11145 } 11146 11147 xfree(xp_arg); 11148
* api: nvim_command_output: direct implJustin M. Keyes2018-01-10
|
* api: change nvim_command_output behaviorJustin M. Keyes2018-01-10
| | | | | | | | | | | | | | | | | | | Implement nvim_command_output with `execute({cmd},"silent")`. Behavior changes: - does not provoke any hit-enter prompt - no longer prepends a newline char - does not capture some noise (like the "[New File]" message, see the change to tabnewentered_spec.lua) Technically ("bug-for-bug") this a breaking change. But the previous behavior of nvim_command_output meant that it probably wasn't used for anything outside of tests. Also remove the undocumented `v:command_output` variable which was a hack introduced only for the purposes of nvim_command_output. closes #7726
* vim-patch:8.0.0352: not easy to see when a typval needs to be clearedckelsel2018-01-08
| | | | | | | | Problem: The condition for when a typval needs to be cleared is too complicated. Solution: Init the type to VAR_UNKNOWN and clear it always. https://github.com/vim/vim/commit/f06e5a549f42396be3478ccc1b5f03be64e1173e
* Merge #7805 'eval.c: fix some scan-build warnings'Justin M. Keyes2018-01-03
|\
| * Add null check when adding variable to dict.Paul Rigge2018-01-02
| |
| * Add null pointer assertions for do_unlet_var.Paul Rigge2018-01-02
| |
| * Refactor profiling check in call_user_func.Paul Rigge2018-01-02
| | | | | | | | | | | | | | | | | | do_profiling is a global variable, and as such the clang static analyzer has trouble making arguments about it. This commit does one comparison against do_profiling and puts the result in a local variable. This prevents errors from the value of do_profiling changing between comparisons.
| * Add assertions for watchersPaul Rigge2018-01-02
| | | | | | | | | | | | The clang static analyzer convinced itself lp->ll_newkey could be NULL. This adds an assertion that checks this doesn't actually happen, as well as a parallel assertion for di->di_key.
| * Add assertion in set_var_lval for null pointer.Paul Rigge2018-01-02
|/ | | | If the lval is a index into a list, li should not be null.
* eval: Fix linter errorsZyX2017-12-31
|
* eval,lua/converter: Fix problems spotted in reviewZyX2017-12-31
|
* eval: Refactor some potentially dangerous list appendsZyX2017-12-25
|
* eval: Remove magic numbers from find_some_match() type argumentZyX2017-12-25
|
* eval: Replace some tv_list_item_remove() callsZyX2017-12-24
| | | | | There is nothing wrong with them, just it is generally better to remove a range then to remove items individually.
* eval: Rename tv_list_remove_items() to tv_list_drop_items()ZyX2017-12-24
| | | tv_list_remove_items() may cause confusion with tv_list_item_remove()
* eval/typval: Make tv_list_item_remove return pointer to the next itemZyX2017-12-24
|
* *: Remove most calls to tv_list_item_allocZyX2017-12-24
| | | | Still left calls in eval/typval.c and test/unit/eval/helpers.lua. Latter is the only reason why function did not receive `static` modifier.
* Merge branch 'master' into hide-container-implZyX2017-12-23
|\
| * vim-patch:8.0.0590: cannot add a context to locationsJames McCoy2017-12-19
| | | | | | | | | | | | | | | | Problem: Cannot add a context to locations. Solution: Add the "context" entry in location entries. (Yegappan Lakshmanan, closes vim/vim#1012) https://github.com/vim/vim/commit/8f77c5a4ec756f3f866bd6b18feb6fca6f2a2e91
| * vim-patch:8.0.0517: there is no way to remove quickfix listsJames McCoy2017-12-18
| | | | | | | | | | | | | | | | Problem: There is no way to remove quickfix lists (for testing). Solution: Add the 'f' action to setqflist(). Add tests. (Yegappan Lakshmanan) https://github.com/vim/vim/commit/b6fa30ccc39cdb7f1d07b99fe2f4c6b61671dac2
* | eval: Fix some issues found in reviewZyX2017-12-17
| |
* | Merge branch 'master' into hide-container-implZyX2017-12-16
|\|
| * vim-patch:8.0.0074Michael Schupikov2017-12-15
| | | | | | | | | | | | | | | | | | | | Problem: Cannot make Vim fail on an internal error. Solution: Add IEMSG() and IEMSG2(). (Domenique Pelle) Avoid reporting an internal error without mentioning where. https://github.com/vim/vim/commit/95f096030ed1a8afea028f2ea295d6f6a70f466f Signed-off-by: Michael Schupikov <michael@schupikov.de>
* | eval: Fix linter errorZyX2017-12-16
| |
* | window: Fix matchaddpos() and enhance error reportingZyX2017-12-15
| |
* | clint,eval: Make linter check for direct usage of list attributesZyX2017-12-12
| |
* | *: Fix linter errorsZyX2017-12-12
| |
* | eval: Fix add()ZyX2017-12-11
| |
* | *: Fix linter errorsZyX2017-12-11
| |
* | *: Finish hiding list implementationZyX2017-12-11
| |
* | *: Fix test failuresZyX2017-12-11
| |
* | eval: Still check for NULL when doing :unletZyX2017-12-10
| |
* | eval: Fix uniq() crash in legacy test 055ZyX2017-12-10
| |
* | eval: Fix setmatches(), setqflist() and setloclist()ZyX2017-12-10
| |
* | eval,functests: Fix tests and complete() and setline() behaviourZyX2017-12-10
| |
* | eval: Fix writefile()ZyX2017-12-10
| |
* | eval: Fix inputlist()ZyX2017-12-10
| |
* | *: Start hiding list implementationZyX2017-12-10
|/ | | | Most of files, except for eval.c and eval/* were only processed by perl.
* Viml: Make filter and map handle null list correctFlorianGit2017-12-03
| | | | | | | | | | | | | | | | | | | filter('v:_null_list, 'v:val') should return v:_null_list and a similar statement should hold for map. Changes after review * Test inserted in legacy test suite has been removed by reverting the commit adding it. * Change the fix to tv_copy the argument before returning. * Readd the two tests on crashes, and modified their expected return value. * Move the test from 'incorrect behaviour' section to 'correct behaviour section' * Add analogous tests for v:_null_dict Always copy list or dictionary to return variable If the type of input is correct (i.e. either a list or a dictionary), this should also be returned.
* channels: improvements to bufferingBjörn Linse2017-11-25
|