aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
Commit message (Collapse)AuthorAge
...
* | | terminal: 'scrollback'Justin M. Keyes2017-02-26
| |/ |/| | | | | Closes #2637
* | Merge remote-tracking branch 'origin/master' into lambdaJames McCoy2017-02-22
|\ \
| * | eval.c: has("unnamedplus"). (#6136)Kurt Bonatz2017-02-18
| | | | | | | | | | | | | | | Return 1 for UNIX with a functioning clipboard provider. Closes #6103
| * | *: Fix linter errorsZyX2017-02-15
| | |
| * | *: Partial string handling refactoringZyX2017-02-15
| |/ | | | | | | | | | | | | | | Main points: - Replace `char_u` with `char` in some cases. - Remove `str[len] = NUL` hack in some cases when `str` may be considered `const`.
* | vim-patch:8.0.0297Michael Ennen2017-02-14
| | | | | | | | | | | | | | Problem: Double free on exit when using a closure. (James McCoy) Solution: Split free_al_functions in two parts. (closes #1428) https://github.com/vim/vim/commit/03ff9bcbc968f7d306e4a4e334e226fdde62ca82
* | Allow lambdas to be used with jobs, timers and dictwatchers.Michael Ennen2017-02-14
| |
* | vim-patch:7.4.2235Michael Ennen2017-02-14
| | | | | | | | | | | | | | Problem: submatch() does not check for a valid argument. Solution: Give an error if the argument is out of range. (Dominique Pelle) https://github.com/vim/vim/commit/989f592f7ffcbafdc4ec35cee4dc65bd053e2077
* | vim-patch:7.4.2233Michael Ennen2017-02-14
| | | | | | | | | | | | | | Problem: Crash when using funcref() with invalid name. (Dominique Pelle) Solution: Check for NULL translated name. https://github.com/vim/vim/commit/843b884461de1c79a1d2748549776fb13fc94360
* | vim-patch:7.4.2197Michael Ennen2017-02-14
| | | | | | | | | | | | | | Problem: All functions are freed on exit, which may hide leaks. Solution: Only free named functions, not reference counted ones. https://github.com/vim/vim/commit/c257487035f83aabe1c7e07f0552309e98f1bcb1
* | vim-patch:7.4.2143Michael Ennen2017-02-14
| | | | | | | | | | | | | | | | Problem: A funccal is garbage collected while it can still be used. Solution: Set copyID in all referenced functions. Do not list lambda functions with ":function". https://github.com/vim/vim/commit/bc7ce675b2d1c9fb58c067eff3edd59abc30aba4
* | vim-patch:7.4.2142Michael Ennen2017-02-14
| | | | | | | | | | | | | | | | | | Problem: Leaking memory when redefining a function. Solution: Don't increment the function reference count when it's found by name. Don't remove the wrong function from the hashtab. More reference counting fixes. https://github.com/vim/vim/commit/8dd3a43d75550e9b5736066124c97697564f769e
* | vim-patch:7.4.2141Michael Ennen2017-02-14
| | | | | | | | | | | | | | | | Problem: Coverity reports bogus NULL check. Solution: When checking for a variable in the funccal scope don't pass the varname. https://github.com/vim/vim/commit/ba96e9af388804364425185b47eed14988302865
* | vim-patch:7.4.2139Michael Ennen2017-02-14
| | | | | | | | | | | | | | Problem: :delfunction causes illegal memory access. Solution: Correct logic when deciding to free a function. https://github.com/vim/vim/commit/0588d4f9d2741f35a271400a37fddbdd72d84219
* | vim-patch:7.4.2137Michael Ennen2017-02-14
| | | | | | | | | | | | | | | | | | Problem: Using function() with a name will find another function when it is redefined. Solution: Add funcref(). Refer to lambda using a partial. Fix several reference counting issues. https://github.com/vim/vim/commit/437bafe4c8a83ed71ee006eda7f54b65a90f0d4c
* | vim-patch:7.4.2136Michael Ennen2017-02-14
| | | | | | | | | | | | | | Problem: Closure function fails. Solution: Don't reset uf_scoped when it points to another funccal. https://github.com/vim/vim/commit/580164481924ed8611eb79f0247a0eb1ca0b3b9a
* | vim-patch:7.4.2134Michael Ennen2017-02-14
| | | | | | | | | | | | | | Problem: No error for using function() badly. Solution: Check for passing wrong function name. (Ken Takata) https://github.com/vim/vim/commit/b54c3ff3174dbb5dfbfcabdf95200b047beaa644
* | vim-patch:7.4.2121Michael Ennen2017-02-14
| | | | | | | | | | | | | | Problem: No easy way to check if lambda and closure are supported. Solution: Add the +lambda feature. https://github.com/vim/vim/commit/9532fe7fbe1b14531931e83bd9f8054efdcf7509
* | vim-patch:7.4.2120Michael Ennen2017-02-14
| | | | | | | | | | | | | | | | Problem: User defined functions can't be a closure. Solution: Add the "closure" argument. Allow using :unlet on a bound variable. (Yasuhiro Matsumoto, Ken Takata) https://github.com/vim/vim/commit/10ce39a0d52272a3dfff2feb8c631529f29e6740
* | vim-patch:7.4.2119Michael Ennen2017-02-14
| | | | | | | | | | | | | | | | Problem: Closures are not supported. Solution: Capture variables in lambdas from the outer scope. (Yasuhiro Matsumoto, Ken Takata) https://github.com/vim/vim/commit/1e96d9bf98f9ab84d5af7f98d6a961d91b17364f
* | vim-patch:7.4.2104Michael Ennen2017-02-14
| | | | | | | | | | | | | | Problem: Code duplication when unreferencing a function. Solution: De-duplicate. https://github.com/vim/vim/commit/97baee80f0906ee2f651ee1215ec033e84f866ad
* | vim-patch:7.4.2096Michael Ennen2017-02-14
| | | | | | | | | | | | | | Problem: Lambda functions show up with completion. Solution: Don't show lambda functions. (Ken Takata) https://github.com/vim/vim/commit/b49edc11a1872fa99befa9a4a8ea6c8537868038
* | vim-patch:7.4.2090Michael Ennen2017-02-14
| | | | | | | | | | | | | | | | Problem: Using submatch() in a lambda passed to substitute() is verbose. Solution: Use a static list and pass it as an optional argument to the function. Fix memory leak. https://github.com/vim/vim/commit/df48fb456fb6bf63d94cad9b302ff01d8ee8d311
* | 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
| |