aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval/userfunc.c
Commit message (Collapse)AuthorAge
* fixup! vim-patch:8.1.1310: named function arguments are never optionalJan Edmund Lazo2021-02-22
|
* vim-patch:8.1.1310: named function arguments are never optionalerw72021-02-22
| | | | | | | Problem: Named function arguments are never optional. Solution: Support optional function arguments with a default value. (Andy Massimino, closes vim/vim#3952) https://github.com/vim/vim/commit/42ae78cfff171fbd7412306083fe200245d7a7a6
* vim-patch:8.2.0928: many type casts are used for vim_strnsave()Jan Edmund Lazo2020-12-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Many type casts are used for vim_strnsave(). Solution: Make the length argument size_t instead of int. (Ken Takata, closes vim/vim#5633) Remove some type casts. https://github.com/vim/vim/commit/df44a27b53586fccfc6a3aedc89061fdd9a515ff N/A patches for version.c: vim-patch:8.2.0315: build failure on HP-UX system Problem: Build failure on HP-UX system. Solution: Use LONG_LONG_MIN instead of LLONG_MIN. Add type casts for switch statement. (John Marriott) https://github.com/vim/vim/commit/c593bec4120f122e8a9129ec461968f1bd214435 vim-patch:8.2.1052: build failure with older compilers Problem: Build failure with older compilers. Solution: Move declaration to start of block. https://github.com/vim/vim/commit/7acde51832f383f9a6d2e740cd0420b433ea841a vim-patch:8.2.2229: build failure without the +eval feature Problem: build failure without the +eval feature. Solution: Add #ifdef. https://github.com/vim/vim/commit/39cb2dab18e85fc60f116a4543e433616872b690 vim-patch:8.2.2232: compiler error for falling through into next case Problem: Compiler error for falling through into next case. Solution: Move FALLTHROUGH below the #endif https://github.com/vim/vim/commit/9618a25b9c054f0ee4e267d2db96b6e7c113ed7a
* vim-patch:8.2.2142: memory leak when heredoc is not terminatedJan Edmund Lazo2020-12-22
| | | | | | Problem: Memory leak when heredoc is not terminated. Solution: Free heredoc_trimmed. https://github.com/vim/vim/commit/fffdf4754f4fd789c64596bdd9ea069725e63784
* eval: use VAR_UNLOCKED enum, not the direct valueJan Edmund Lazo2020-11-21
|
* vim-patch:8.2.0506: Coverity complains about ignoring return valueJan Edmund Lazo2020-10-25
| | | | | | Problem: Coverity complains about ignoring return value. Solution: Add (void). https://github.com/vim/vim/commit/d1e9dc272355fe3ab112af5f04b0516b2e9a4fa6
* vim-patch:8.2.0268: trycatch test failsJan Edmund Lazo2020-10-21
| | | | | | | Problem: Trycatch test fails. Solution: When calling function fails only check for following command, do not give another error. https://github.com/vim/vim/commit/40d9da2a4395025169ebaf53a63618adfa737e96
* userfunc: abort early on invalid refsJan Edmund Lazo2020-09-30
| | | | Cherry-pick set_ref_in_call_stack() changes from patch 8.1.1575.
* vim-patch:8.2.0042: clearing funccal values twiceJan Edmund Lazo2020-09-30
| | | | | | Problem: Clearing funccal values twice. Solution: Remove clearing individual fields. https://github.com/vim/vim/commit/eac7ce01e92f3dee6bbccaf7e88680fe2ce286eb
* vim-patch:8.2.0499: calling a lambda is slower than evaluating a stringJan Edmund Lazo2020-09-30
| | | | | | | | | | Problem: Calling a lambda is slower than evaluating a string. Solution: Make calling a lambda faster. (Ken Takata, closes vim/vim#5727) https://github.com/vim/vim/commit/f10806b25090879fdc1a86cc0da2f4f34fd21921 Port "uf_flags" constants from patch 8.2.1054 to sync with Vim. Port user_func_error() from patch 8.2.0149. Port Test_lambda_scope() changes from patch 8.1.0736 so that it passes.
* vim-patch:8.1.1319: computing function length name in many placesJan Edmund Lazo2020-09-30
| | | | | | | | | | | Problem: Computing function length name in many places. Solution: compute name length in call_func(). https://github.com/vim/vim/commit/6ed8819822994512c160006bd1204aa11ae3c494 In call_func(), reassign "len" param to (int)STRLEN(funcname) instead of using vim_strsave() which runs strlen(). "len" param is checked for v:lua functions. call_func() states that strlen() is used if "len" is set to -1.
* vim-patch:8.1.1563: crash when using closureserw72020-09-30
| | | | | | | Problem: Crash when using closures. Solution: Set reference in varlist of funccal when running the garbage collector. (Ozaki Kiichi, closes vim/vim#4554, closes vim/vim#4547) https://github.com/vim/vim/commit/6e5000d493b4f385f901eb97f3ce0c8088373403
* lua: cleanup naming conventions of executor functionsBjörn Linse2020-09-10
|
* vim-patch:8.2.0607: gcc warns for using uninitialized variableJan Edmund Lazo2020-08-19
| | | | | | Problem: Gcc warns for using uninitialized variable. (John Marriott) Solution: Set name_end also for environment variables. https://github.com/vim/vim/commit/2bb76accc66d17f2c027c04396082c46f410bfea
* userfunc: fix pvs/v547Jan Edmund Lazo2020-08-15
| | | | xcalloc() never returns NULL.
* lua: Add ability to pass tables with __callTJ DeVries2020-07-10
| | | | | | | | | | | | vim-patch:8.2.1054: not so easy to pass a lua function to Vim vim-patch:8.2.1084: Lua: registering function has useless code I think I have also opened up the possibility for people to use these callbacks elsewhere, since I've added a new struct that we should be able to use. Also, this should allow us to determine what the state of a list is in Lua or a dictionary in Lua, since we now can track the luaref as we go.
* lua: Add ability to pass lua functions directly to vimLTJ DeVries2020-07-10
|
* vim-patch:8.1.0917: double free when running out of memoryJan Edmund Lazo2020-06-04
| | | | | | Problem: Double free when running out of memory. Solution: Remove one free. (Ken Takata, closes vim/vim#3955) https://github.com/vim/vim/commit/445e71c5ee06015064cf0642cac8190cfe8fbc59
* vim-patch:8.1.1485: double free when garbage_collect() is used in autocommanderw72020-05-25
| | | | | | Problem: Double free when garbage_collect() is used in autocommand. Solution: Have garbage collection also set the copyID in funccal_stack. https://github.com/vim/vim/commit/c07f67ad0e9c48a07d49f2d67eb63e183a22386a
* vim-patch:8.1.1007: using closure may consume a lot of memoryerw72020-05-07
| | | | | | | Problem: Using closure may consume a lot of memory. Solution: unreference items that are no longer needed. Add a test. (Ozaki Kiichi, closes vim/vim#3961) https://github.com/vim/vim/commit/209b8e3e3bf7a4a3d102134124120f6c7f57d560
* vim-patch:8.1.0475: memory not freed on exit when quit in autocmderw72020-05-07
| | | | | | Problem: Memory not freed on exit when quit in autocmd. Solution: Remember funccal stack when executing autocmd. https://github.com/vim/vim/commit/27e80c885bcb5c5cf6a6462d71d6c81b06ba2451
* vim-patch:8.1.0868: crash if triggering garbage collector after a function callJan Edmund Lazo2020-05-03
| | | | | | | | Problem: Crash if triggering garbage collector after a function call. (Michael Henry) Solution: Don't call the garbage collector right away, do it later. (closes vim/vim#3894) https://github.com/vim/vim/commit/889da2f2438c8168f9a25dc776360b81109bad44
* vim-patch:8.1.0800: may use a lot of memory when a function refers itselfJan Edmund Lazo2020-05-03
| | | | | | | | Problem: May use a lot of memory when a function creates a cyclic reference. Solution: After saving a funccal many times, invoke the garbage collector. (closes vim/vim#3835) https://github.com/vim/vim/commit/4456ab527a6a5faae9287f3bd2e52cc18966cfb0
* Merge #11851 'eval.c: factor out eval/userfunc.c'Justin M. Keyes2020-04-26
| | | | vim-patch:7.4.2058
* rename: user_funcs -> userfuncJakub Łuczyński2020-02-13
Lets stick with vim for now