aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
Commit message (Collapse)AuthorAge
...
* | vim-patch:7.4.2072Michael Ennen2017-02-14
| | | | | | | | | | | | | | Problem: substitute() does not support a Funcref argument. Solution: Support a Funcref like it supports a string starting with "\=". https://github.com/vim/vim/commit/72ab729c3dcdea0fba44d8e676602c847e841bcd
* | vim-patch:7.4.2044Michael Ennen2017-02-14
| | | | | | | | | | | | | | | | Problem: filter() and map() either require a string or defining a function. Solution: Support lambda, a short way to define a function that evaluates an expression. (Yasuhiro Matsumoto, Ken Takata) https://github.com/vim/vim/commit/069c1e7fa9f45a665064f7f2c17da84d6a48f544
* | vim-patch:7.4.2002Michael Ennen2017-02-14
| | | | | | | | | | | | | | Problem: Crash when passing number to filter() or map(). Solution: Convert to a string. (Ozaki Kiichi) https://github.com/vim/vim/commit/a06ec8f345eabb66e5b7d7c0192cfebdde63115d
* | vim-patch:7.4.1989Michael Ennen2017-02-14
| | | | | | | | | | | | | | | | Problem: filter() and map() only accept a string argument. Solution: Implement using a Funcref argument (Yasuhiro Matsumoto, Ken Takata) https://github.com/vim/vim/commit/b33c7eb5b813cb631b2b0ca5c4029e1788a09bde
* | vim-patch:7.4.1727Michael Ennen2017-02-14
|/ | | | | | | | Problem: Cannot detect a crash in tests when caused by garbagecollect(). Solution: Add garbagecollect_for_testing(). Do not free a job if is still useful. https://github.com/vim/vim/commit/ebf7dfa6f121c82f97d2adca3d45fbaba9ad8f7e
* eval: Add id() function and make printf("%p") return something useful (#6095)Nikolai Aleksandrovich Pavlov2017-02-11
|
* process_spawn: Return status code (#6075)Justin M. Keyes2017-02-09
|
* Merge pull request #5913 from mhinz/buf-lookup-patchesJames McCoy2017-02-06
|\ | | | | vim-patch:7.4.2017,7.4.2018,7.4.2021,7.4.2022,7.4.2023,7.4.2024
| * vim-patch:7.4.2022Marco Hinz2017-02-04
| | | | | | | | | | | | | | Problem: Warnings from 64 bit compiler. Solution: Add type casts. (Mike Williams) https://github.com/vim/vim/commit/25065ec375a8a55462f6c07c76dc1a72a770ac19
* | eval: set_ref_in_item(): remove dead codeJustin M. Keyes2017-02-06
| | | | | | | | Missed in 25438f149fda66375ed54a735e4477f3f4d87338
* | refactor: fix warningsJustin M. Keyes2017-02-04
|/
* refactor: Remove strncpy/STRNCPY. (#6008)Justin M. Keyes2017-01-26
| | | | | | | | | | | | | | | Closes #731 References #851 Note: This does not remove some intentional legacy usages of strncpy. - memcpy isn't equivalent because it doesn't check the string length of `src`, and doesn't zero-out the remainder of `dst`. - xstrlcpy isn't equivalent because it doesn't zero-out the remainder of `dst`. Some Vim logic depends on that (e.g. ex_append which calls vim_strnsave). Helped-by: Douglas Schneider <ds3@ualberta.ca> Helped-by: oni-link <knil.ino@gmail.com> Helped-by: James McCoy <jamessan@jamessan.com>
* coverity/155513: Do not assume xcalloc can return NULLZyX2017-01-23
|
* vim-patch:7.4.2065 (#5950)Shougo2017-01-15
| | | | | | Problem: Compiler warns for uninitialzed variable. (John Marriott) Solution: Set lnum to the right value. https://github.com/vim/vim/commit/69aa099641616268bfcde9dc3aa313c677846b12
* vim-patch:7.4.2160 (#5952)Shougo2017-01-15
| | | | | | Problem: setmatches() mixes up values. (Nikolai Pavlov) Solution: Save the string instead of reusing a shared buffer. https://github.com/vim/vim/commit/7dc5e2e486fe0287601968e535902a41a39f65bb
* job: Consume content from rbuffer before invoking the callback againJames McCoy2017-01-14
| | | | | | | | | | While a job callback is active, it may be invoked again. Since the data handled by the first invocation of the callback hasn't been marked as consumed, the subsequent invocation will see the same data. Reported-by: Daniel Hahler Patch-by: oni-link Closes #5889
* eval: Remove dictwatcher from watchers queue before freeing itJames McCoy2017-01-12
| | | | | | | | | | | | | | This fixes a use-after-free noticed by ASAN which would occur when a dictwatcher was still active on a dictionary when the dictionary was freed. fun! MakeWatch() let d = {'foo': 'bar'} call dictwatcheradd(d, 'foo', function('...')) endfun Patch-by: oni-link Closes #5930
* system([...]): Set v:shell_error=-1 if not executable.Rui Abreu Ferreira2017-01-11
| | | | | | | | Do _not_ set v:shell_error on parameter validation error. system([...]) does not invoke a shell, so this change is somewhat questionable. But `:help v:shell_error` is sufficiently vague to allow -1 in this case.
* vim-patch:7.4.2009James McCoy2017-01-10
| | | | | | | Problem: Messages test fails. Solution: Don't set redir_execute before returning. https://github.com/vim/vim/commit/ed59aa60d3905f935283727f4a7b33c81a00174b
* vim-patch:7.4.2008James McCoy2017-01-10
| | | | | | | | Problem: evalcmd() has a confusing name. Solution: Rename to execute(). Make silent optional. Support a list of commands. https://github.com/vim/vim/commit/79815f1ec77406f2f21a618c053e5793b597db7a
* memory: Restore entered_free_all_mem functionalityZyX2017-01-07
|
* eval: Fix failing testZyX2017-01-07
|
* unittest: Add dict_items functionZyX2017-01-07
|
* eval: Make sure that copyID is reset when neededZyX2017-01-07
| | | | | Works by making value pushed on stack represent the exhausted list. Fixes #5901, except for dictionaries which need similar adjustment.
* Merge pull request #5826 from ZyX-I/fix-typval_encodeJames McCoy2017-01-06
|\ | | | | Refactor eval/typval_encode.h
| * eval: Fix typoZyX2017-01-07
| |
| * eval: Work with reference cycles in partials (self) properlyZyX2017-01-06
| |
| * eval/typval_encode: Use TYPVAL_ENCODE_CONV_EMPTY_DICT for partialsZyX2017-01-06
| |
| * *: Remove `// fname()` comments near typval_encode includesZyX2017-01-04
| |
| * eval: Fix errorneous early exit when converting lists and dictionariesZyX2017-01-03
| |
| * eval: Fix unused variable error in release buildsZyX2017-01-03
| |
| * eval/typval_encode: Refactor arguments to argument macrosesZyX2017-01-03
| | | | | | Fixed local test failures somewhere in process.
| * eval: Do not free partial contents if partial is still referencedZyX2017-01-03
| | | | | | Should fix some tests, including core/job_partial tests.
| * eval: Do not free partial lists as listsZyX2017-01-03
| |
| * eval: Fix case when cur_mpsv is NULLZyX2017-01-03
| | | | | | | | Should only happen when clearing VAR_FUNC typval which is not placed inside a container.
| * eval/typval_encode: Fix infinite loopZyX2017-01-03
| | | | | | | | | | | | | | | | | | 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.
| * eval/typval_encode: Refactor big-big macros into .c.h fileZyX2017-01-03
| | | | | | | | | | 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.
| * eval/typval_encode: Make partial conversions not recursiveZyX2017-01-03
| | | | | | | | | | | | Is known to crash in the current state. Ref #5825.
* | eval.c: filter_map(): avoid maybe-uninitialized warning (#5897)Michael Schupikov2017-01-06
| | | | | | maybe-uninitialized warning observed with -Ofast.
* | Merge #5872 justinmk/test_autochdirJustin M. Keyes2017-01-04
|\ \
| * | refactor: Remove VimL function `test()`Justin M. Keyes2017-01-04
| | | | | | | | | | | | vim-patch:7.4.1838
| * | refactor: Remove VimL function `test_autochdir()`Justin M. Keyes2017-01-04
| | | | | | | | | | | | | | | | | | | | | - Eliminate global test_autochdir. - Eliminate VimL function test_autochdir() - Use a lua test instead. Fails correctly after reverting 0c4347997954 / vim-patch:7.4.2015.
| * | vim-patch:6f1d9aShougo Matsushita2017-01-02
| | | | | | | | | | | | | | | | | | Updated runtime files. https://github.com/vim/vim/commit/6f1d9a096bf22d50c727dca73abbfb8e3ff55176
| * | vim-patch:7.4.2015Shougo Matsushita2017-01-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: When a file gets a name when writing it 'acd' is not effective. (Dan Church) Solution: Invoke DO_AUTOCHDIR after writing the file. (Allen Haim, closes vim/vim#777, closes vim/vim#803) Add test_autochdir() to enable 'acd' before "starting" is reset. https://github.com/vim/vim/commit/5c71994f4ee5f87d4cce990dbc9684c70b1e108b
* | | vim-patch:7.4.2043 (#5871)lonerover2017-01-04
| | | | | | | | | | | | | | | | | | Problem: setbuvfar() causes a screen redraw. Solution: Only use aucmd_prepbuf() for options. https://github.com/vim/vim/commit/93431df9eb02f7cf3d7f2142bb1bef24c5f325b2
* | | fix lint errorlonerover2017-01-03
| | |
* | | vim-patch:7.4.1847lonerover2017-01-03
| |/ |/| | | | | | | | | | | | | | | 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. https://github.com/vim/vim/commit/13ddc5c35921efa69e980284117b6db6465e019c
* | lintJames McCoy2017-01-02
| |
* | vim-patch:7.4.1868James McCoy2017-01-01
| | | | | | | | | | | | | | Problem: Setting really_exiting causes memory leaks to be reported. Solution: Add the in_free_all_mem flag. https://github.com/vim/vim/commit/b89a25f17e274dc308c584ea69a129ffbb26bc3d
* | vim-patch:7.4.1866James McCoy2017-01-01
|/ | | | | | | | | | | | Problem: Invalid memory access when exiting with EXITFREE defined. (Dominique Pelle) Solution: Set "really_exiting" and skip error messages. https://github.com/vim/vim/commit/a96732150cda2f242133228579b05437a39b8daa This fails to build, due to a00c2e0ecbaec366364cecb5efbdb456c8c543ef removing really_exiting from globals.h, but the next commit fixes the build failure.