aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval/funcs.c
Commit message (Collapse)AuthorAge
...
* vim-patch:8.2.1102: Coverity gets confused by an unnecessary NULL checkJan Edmund Lazo2020-10-25
| | | | | | Problem: Coverity gets confused by an unnecessary NULL check. Solution: Remove the check for NULL. https://github.com/vim/vim/commit/90049492215aa458b90215b8e0fc50f04d5ad270
* vim-patch:8.1.1056: no eval function for RubyAlex Genco2020-10-21
| | | | | | Problem: No eval function for Ruby. Solution: Add rubyeval(). (Ozaki Kiichi, closes vim/vim#4152) https://github.com/vim/vim/commit/e99be0e6d28fad96efd2b2be23fa38e7559e80e1
* vim-patch:8.2.1804: resolve('/') returns an empty string (#13121)Jan Edmund Lazo2020-10-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: resolve('/') returns an empty string. Solution: Don't remove single slash. (closes vim/vim#7074) https://github.com/vim/vim/commit/50c4e9e08fb0981892e33afb9fe3751aa6df1fa4 Cherry-pick the test rename from Test_resolve() to Test_resolve_unix() from patch 8.1.0894. N/A patches for version.c: vim-patch:8.1.0929: no error when requesting ConPTY but it's not available Problem: No error when requesting ConPTY but it's not available. Solution: Add an error message. (Hirohito Higashi, closes vim/vim#3967) https://github.com/vim/vim/commit/5acd9872580a12ca1138275bf65d1cb9349e2a53 vim-patch:8.1.1535: popup select test fails on Mac Problem: Popup select test fails on Mac. Solution: Skip test if clipboard feature not available. https://github.com/vim/vim/commit/650a63748c349bbb60adb912273e9bedd2b677c5 vim-patch:8.1.1536: popup select test still fails on Mac Problem: Popup select test still fails on Mac. Solution: Set 'clipboard' to "autoselect" https://github.com/vim/vim/commit/1755ec4278ee6dccdbb8030fd5a4cf6054211f81 vim-patch:8.1.1604: popup window scroll test is flaky Problem: Popup window scroll test is flaky. Solution: Add a delay between scroll events. https://github.com/vim/vim/commit/13b47c37a650ab6045680a9e5513ef6ad71ee93f vim-patch:8.1.1668: popup window test is a bit flaky on some systems Problem: Popup window test is a bit flaky on some systems. Solution: Clear the command line. (Naruhiko Nishino, closes vim/vim#4656) https://github.com/vim/vim/commit/8ccabf624ef4eb7ebe3e4d52449bc0bc545810f2 vim-patch:8.1.1935: test for text property popup window is flaky Problem: Test for text property popup window is flaky. Solution: Remove the undo message https://github.com/vim/vim/commit/57441d6fa0ba44be8dc16d6469a8659afc2f3b81 vim-patch:8.1.2347: MacOS: build fails Problem: MacOS: build fails. Solution: Don't define _XOPEN_SOURCE for Mac. https://github.com/vim/vim/commit/84f903326d44db9b75fc3a39d4866f636f9ad4cd vim-patch:8.2.0351: terminal in popup test is still a bit flaky Problem: Terminal in popup test is still a bit flaky. Solution: Clear and redraw before opening the popup. https://github.com/vim/vim/commit/3e919d2924c87eb8fee62603788fcc3ced2a0031 vim-patch:8.2.0752: terminal in popup window test is a bit flaky Problem: Terminal in popup window test is a bit flaky. Solution: Wait for shell job status to be "run". Mark as flaky test. https://github.com/vim/vim/commit/e06a28f5e30f439545ac125d54ffc4e6bd6daada vim-patch:8.2.1087: possible memory leak when file expansion fails Problem: Possible memory leak when file expansion fails. Solution: Clear the grow array when returning FAIL. Use an error message instead of an empty string. https://github.com/vim/vim/commit/566cc8c72bb8036f015a435800f28ef9f6a9a3b6 vim-patch:8.2.1863: json code not sufficiently tested Problem: Json code not sufficiently tested. Solution: Add more test cases. (Dominique Pellé, closes vim/vim#7166) https://github.com/vim/vim/commit/e3c65ce4e59143736bb2e0fba93c21283aa92a35
* vim-patch:8.2.0868: trim() always trims both endsskippi2020-10-17
| | | | | | | Problem: trim() always trims both ends. Solution: Add an argument to only trim the beginning or end. (Yegappan Lakshmanan, closes vim/vim#6126) https://github.com/vim/vim/commit/2245ae18e3480057f98fc0e5d9f18091f32a5de0
* vim-patch:8.2.1850: "vat" does not select tags correctly over line breakJan Edmund Lazo2020-10-15
| | | | | | | | | | | Problem: "vat" does not select tags correctly over line break. Solution: Adjust the search pattern. (Aufar Gilbran, closes vim/vim#7136) https://github.com/vim/vim/commit/a604ccc959c3bff88d3d5bc3c965819fc326d239 Use 'const char*' for spat,mpat,epat params of do_searchpair() to reduce (char_u *) casts. Cherry-pick Test_string_html_objects() changes from patch 8.2.0655.
* 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.
* screen: more work on fold_line replacementBjörn Linse2020-09-24
|
* lua: cleanup naming conventions of executor functionsBjörn Linse2020-09-10
|
* support for :perl, :perlfile, :perldo and perleval()Jacques Germishuys2020-08-30
|
* Merge pull request #12510 from jamessan/clang-implicit-fallthroughJames McCoy2020-08-26
|\
| * Disable -Wimplicit-fallthrough for funcs.generated.hJames McCoy2020-08-23
| | | | | | | | | | | | This is code generated by gperf, so there's nothing we can do about it. The code does have /*FALLTHROUGH*/ comments but clang doesn't recognize them.
* | vim-patch:8.2.1517: cannot easily get the character under the cursorJan Edmund Lazo2020-08-23
|/ | | | | | Problem: Cannot easily get the character under the cursor. Solution: Add the {chars} argument to strpart(). https://github.com/vim/vim/commit/6c53fca02301ff871cddc1c74c388e23e53a424a
* vim-patch:8.2.0814: clang warning for implicit conversionJan Edmund Lazo2020-08-21
| | | | | | Problem: Clang warning for implicit conversion. Solution: Add type cast. (Dominique Pelle, closes vim/vim#6124) https://github.com/vim/vim/commit/3718427ba3c28ccab30726880389e44070640d3b
* vim-patch:8.1.2341: not so easy to interrupt a script programaticallyJan Edmund Lazo2020-08-14
| | | | | | Problem: Not so easy to interrupt a script programatically. Solution: Add the interrupt() function. (Yasuhiro Matsumoto, closes vim/vim#2834) https://github.com/vim/vim/commit/67a2deb9cb4ac2224cb1e4d240a5d0659f036264
* Merge remote-tracking branch 'upstream/master' into libcallnrJames McCoy2020-08-08
|
* vim-patch:8.2.1265: crash with EXITFREE when split() failsJan Edmund Lazo2020-08-02
| | | | | | Problem: Crash with EXITFREE when split() fails. Solution: Restore 'cpoptions'. https://github.com/vim/vim/commit/7d5e744162c1e971e5a863e89787cadc8e56051c
* Merge pull request #12575 from cbarrete/vim-8.2.0935Matthieu Coudron2020-07-20
|\ | | | | [RFC] vim-patch:8.2.{0935,0937}
| * vim-patch:8.2.0935: flattening a list with existing code is slowCédric Barreteau2020-07-15
| | | | | | | | | | | | Problem: Flattening a list with existing code is slow. Solution: Add flatten(). (Mopp, closes vim/vim#3676) https://github.com/vim/vim/commit/077a1e670ad69ef4cefc22103ca6635bd269e764
* | vim-patch:8.2.0893: assert_equalfile() does not take a third argumentJan Edmund Lazo2020-07-19
|/ | | | | | Problem: Assert_equalfile() does not take a third argument. Solution: Implement the third argument. (Gary Johnson) https://github.com/vim/vim/commit/fb517bac2384798bb5142ed1f75f965f93984c0a
* 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.
* Add overlapped option to jobstarterw72020-06-10
| | | | | | | When UV_OVERLAPPED_PIPE was used for the pipe passed to the child process, a problem occurred with the standard input of the .Net Framework application (#11809). Therefore, add the overlapped option to jobstart() and change it so that it is set only when necessary
* vim-patch:8.2.0111: VAR_SPECIAL is also used for booleansBilly Su2020-06-06
| | | | | | Problem: VAR_SPECIAL is also used for booleans. Solution: Add VAR_BOOL for better type checking. https://github.com/vim/vim/commit/9b4a15d5dba354d2e1e02871470bad103f34769a
* Merge pull request #10905 from erw7/vim-8.1.0475Matthieu Coudron2020-05-25
|\ | | | | vim-patch:8.1.{475,800,868,1007,1027,1031,1033,1037,1058,1435,1484,1485}
| * 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
* | matchdelete: fix porting (#12328)Shougo2020-05-17
| | | | | | really use win and not curwin
* | vim-patch:8.1.1084: cannot delete a match from another window (#12325)Shougo2020-05-16
| | | | | | | | | | | | Problem: Cannot delete a match from another window. (Paul Jolly) Solution: Add window ID argument to matchdelete(), clearmatches(), getmatches() and setmatches(). (Andy Massimino, closes vim/vim#4178) https://github.com/vim/vim/commit/aff749145e23c0f20b5158d1d3a942948ed138e3
* | vim-patch:8.1.1186: readdir() allocates list twiceJan Edmund Lazo2020-05-11
|/ | | | | | Problem: readdir() allocates list twice. Solution: Remove second allocation. Also check for zero length. https://github.com/vim/vim/commit/334ad415040f9592451ec99498cd99f90d6e33e6
* vim-patch:8.1.1120: cannot easily get directory entry matches #12222Hennadii Chernyshchyk2020-05-05
| | | | | | | Problem: Cannot easily get directory entry matches. Solution: Add the readdir() function. (Yasuhiro Matsumoto, closes vim/vim#2439) https://github.com/vim/vim/commit/543c9b1921d7605498b54afdef518e312f1b4515 closes #12212
* funcs: Fix a memory leak in f_expand (#12227)erw72020-05-04
| | | | | | | | | | | | | | | | | :echo expand('%', v:false, v:true) ==423== 28 bytes in 1 blocks are definitely lost in loss record 124 of 420 ==423== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==423== by 0x2AD09C: try_malloc (memory.c:71) ==423== by 0x2AD0B8: xmalloc (memory.c:105) ==423== by 0x2AE05D: xmallocz (memory.c:182) ==423== by 0x1F7CF4: vim_strnsave (strings.c:68) ==423== by 0x318813: eval_vars (ex_docmd.c:8885) ==423== by 0x34F5FC: f_expand (funcs.c:2058) ==423== by 0x36D023: call_func (eval.c:6419) ==423== by 0x370C28: get_func_tv.lto_priv.707 (eval.c:6150) ==423== by 0x372748: eval7 (eval.c:4326) ==423== by 0x37291A: eval6 (eval.c:4036) ==423== by 0x372BF6: eval5 (eval.c:3884)
* lsp: use vim.tbl_isempty to check sign (#12190)Hirokazu Hata2020-04-28
| | | | | ref: #12164 fix #12201 sign_getdefined() returns a list, {} if the sign is not defined.
* 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
| * fix: includesJakub Łuczyński2020-02-13
| |
* | Merge pull request #12047 from erw7/fix-resolve-on-windowsMatthieu Coudron2020-04-19
|\ \ | | | | | | | | | Change resolve() to resolve symbolic links on Windows Neovim worked the same way as vim for shortcuts, but didn't handle symbolic links and junction cases. This PR implements the same behavior for symbolic links and junctions as for vim.
| * | Change to canonicalize only when reparse point in includederw72020-04-02
| | |
| * | Change resolve() to resolve symbolic links on Windowserw72020-04-02
| | |
* | | vim-patch:8.2.0507: getbufvar() may get the wrong dictionaryJan Edmund Lazo2020-04-13
| | | | | | | | | | | | | | | | | | Problem: Getbufvar() may get the wrong dictionary. (David le Blanc) Solution: Check for empty name. (closes vim/vim#5878) https://github.com/vim/vim/commit/5259275347667a90fb88d8ea74331f88ad68edfc
* | | vim-patch:8.2.0473: variables declared in an outer scopeJan Edmund Lazo2020-04-13
| | | | | | | | | | | | | | | | | | Problem: Variables declared in an outer scope. Solution: Decleare variables only in the scope where they are used. https://github.com/vim/vim/commit/8601545338581c01e328cdc3a72c0b12d92c54cf
* | | vim-patch:8.1.1745: compiler warning for unused argumentJan Edmund Lazo2020-04-13
| | | | | | | | | | | | | | | | | | Problem: Compiler warning for unused argument. Solution: Add UNUSED. Change comments to new style. https://github.com/vim/vim/commit/1f164b19685d8ad709b11f3f1933685469251e30
* | | vim-patch:8.1.2378: using old C style commentsJan Edmund Lazo2020-04-12
|/ / | | | | | | | | | | Problem: Using old C style comments. Solution: Use // comments where appropriate. https://github.com/vim/vim/commit/5d18efecfd6c45d69f55268948a22cd0465bb955
* | vim-patch:8.1.0881: can execute shell commands in rvim through interfacesJan Edmund Lazo2020-03-01
| | | | | | | | | | | | | | Problem: Can execute shell commands in rvim through interfaces. Solution: Disable using interfaces in restricted mode. Allow for writing file with writefile(), histadd() and a few others. https://github.com/vim/vim/commit/8c62a08faf89663e5633dc5036cd8695c80f1075
* | pvs/v1048: variable was assigned same valueJan Edmund Lazo2020-03-01
| |
* | vim-patch:8.1.1510: a plugin cannot easily expand a command like done internallyJan Edmund Lazo2020-03-01
| | | | | | | | | | | | Problem: A plugin cannot easily expand a command like done internally. Solution: Add the expandcmd() function. (Yegappan Lakshmanan, closes vim/vim#4514) https://github.com/vim/vim/commit/80dad48c5095d30873a42ec82628bdb213125d8e
* | vim-patch:8.1.0619: :echomsg and :echoerr do not handle List and DictJan Edmund Lazo2020-02-29
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: :echomsg and :echoerr do not handle List and Dict like :echo does. (Daniel Hahler) Solution: Be more tolerant about the expression result type. https://github.com/vim/vim/commit/461a7fcfce3cd6414f990037e6468af3b5ccf119 Add lua functional tests for :echo,:echon,:echomsg,:echoerr because nvim did not port "test_" functions from Vim that modify internal state. Testing :echoerr via try/catch is sufficient.
* | vim-patch:8.1.1122: char2nr() does not handle composing charactersJan Edmund Lazo2020-02-20
|/ | | | | | | | Problem: char2nr() does not handle composing characters. Solution: Add str2list() and list2str(). (Ozaki Kiichi, closes vim/vim#4190) https://github.com/vim/vim/commit/9d40128afd7fcd038ff6532722b55b1a8c189ce8 'utf8' optional param is noop unlike Vim.
* vim-patch:8.1.0091: MS-Windows: Cannot interrupt gdb when program is runningerw72020-02-12
| | | | | | | Problem: MS-Windows: Cannot interrupt gdb when program is running. Solution: Add debugbreak() and use it in the terminal debugger. Respect 'modified' in a prompt buffer. https://github.com/vim/vim/commit/4551c0a9fcdbdef52836d4852686d54b5e47fdaf
* vim-patch:8.1.0069: cannot handle pressing CTRL-C in a prompt buffererw72020-02-12
| | | | | | Problem: Cannot handle pressing CTRL-C in a prompt buffer. Solution: Add prompt_setinterrupt(). https://github.com/vim/vim/commit/0e5979a6d491f68c4a8c86fab489016919329a6b
* vim-patch:8.1.0027: difficult to make a plugin that feeds a line to a joberw72020-02-12
| | | | | | Problem: Difficult to make a plugin that feeds a line to a job. Solution: Add the nitial code for the "prompt" buftype. https://github.com/vim/vim/commit/f273245f6433d5d43a5671306b520a3230c35787
* eval.c: factor out eval/funcs.c #11828Jakub Łuczyński2020-02-10
close #11828 ref #5081 cf. vim patch 7.4.2063