aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval/funcs.c
Commit message (Collapse)AuthorAge
...
| * vim-patch:partial:9.0.0359: error message for wrong argument type is not ↵zeertzjq2023-04-25
| | | | | | | | | | | | | | | | | | | | | | | | | | specific (#23315) Problem: Error message for wrong argument type is not specific. Solution: Include more information in the error. (Yegappan Lakshmanan, closes vim/vim#11037) https://github.com/vim/vim/commit/8deb2b30c77035bb682ccf80b781455ac1d6038b Skip reduce() and deepcopy() changes because of missing patches. Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
| * fix(timer): allow timer_info() to get info about current timerzeertzjq2023-04-25
| |
| * vim-patch:8.2.5019: cannot get the first screen column of a character (#23312)zeertzjq2023-04-25
| | | | | | | | | | | | | | | | | | Problem: Cannot get the first screen column of a character. Solution: Let virtcol() optionally return a list. (closes vim/vim#10482, closes vim/vim#7964) https://github.com/vim/vim/commit/0f7a3e1de6f71e8e1423fe594890d6aa7f94e132 Co-authored-by: LemonBoy <thatlemon@gmail.com>
| * vim-patch:9.0.0335: checks for Dictionary argument often give a vague error ↵zeertzjq2023-04-25
| | | | | | | | | | | | | | | | | | | | | | | | (#23309) Problem: Checks for Dictionary argument often give a vague error message. Solution: Give a useful error message. (Yegappan Lakshmanan, closes vim/vim#11009) https://github.com/vim/vim/commit/04c4c5746e15884768d2cb41370c3276a196cd4c Cherry-pick removal of E922 from docs from patch 9.0.1403. Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
| * build: update uncrustify to 0.76Lewis Russell2023-04-19
| |
| * vim-patch:9.0.1007: there is no way to get a list of swap file nameszeertzjq2023-04-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: There is no way to get a list of swap file names. Solution: Add the swapfilelist() function. Use it in the test script to clean up. Remove deleting individual swap files. https://github.com/vim/vim/commit/c216a7a21a25a701b84b79abc1ba6ab0baa3a311 vim-patch:9.0.1005: a failed test may leave a swap file behind Problem: A failed test may leave a swap file behind. Solution: Delete the swap file to avoid another test to fail. Use another file name. https://github.com/vim/vim/commit/d0f8d39d20f8d42f7451f781f7be0bcd20e06741 Cherry-pick test_window_cmd.vim changes from patch 8.2.1593. Remove FUNC_ATTR_UNUSED from eval functions as fptr is always unused. Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * vim-patch:9.0.1400: find_file_in_path() is not reentrant (#23146)zeertzjq2023-04-17
| | | | | | | | | | | | | | | | | | Problem: find_file_in_path() is not reentrant. Solution: Instead of global variables pass pointers to the functions. (closes vim/vim#12093) https://github.com/vim/vim/commit/5145c9a829cd43cb9e7962b181bf99226eb3a53f Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * vim-patch:9.0.0419: the :defer command does not check the function argumentszeertzjq2023-04-17
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: The :defer command does not check the function argument count and types. Solution: Check the function arguments when adding a deferred function. https://github.com/vim/vim/commit/169003289fb4b2ad18fd7f5807e0d05efff0be85 Cherry-pick check_internal_func() from Vim, but use EvalFuncDef pointer as first argument. Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * vim-patch:9.0.0411: only created files can be cleaned up with one callzeertzjq2023-04-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Only created files can be cleaned up with one call. Solution: Add flags to mkdir() to delete with a deferred function. Expand the writefile() name to a full path to handle changing directory. https://github.com/vim/vim/commit/6f14da15ac900589f2f413d77898b9bff3b31ece vim-patch:8.2.3742: dec mouse test fails without gnome terminfo entry Problem: Dec mouse test fails without gnome terminfo entry. Solution: Check if there is a gnome entry. Also fix 'acd' test on MS-Windows. (Dominique Pellé, closes vim/vim#9282) https://github.com/vim/vim/commit/f589fd3e1047cdf90566b68aaf9a13389e54d26a Cherry-pick test_autochdir.vim changes from patch 9.0.0313. Cherry-pick test_autocmd.vim changes from patch 9.0.0323. Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * vim-patch:9.0.0379: cleaning up after writefile() is a hasslezeertzjq2023-04-16
| | | | | | | | | | | | | | | | | | | | Problem: Cleaning up after writefile() is a hassle. Solution: Add the 'D' flag to defer deleting the written file. Very useful in tests. https://github.com/vim/vim/commit/806a273f3c84ecd475913d901890bb1929be9a0a Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * vim-patch:8.2.2848: crash whn calling partialzeertzjq2023-04-16
| | | | | | | | | | | | | | | | | | Problem: Crash whn calling partial. Solution: Check for NULL pointer. (Dominique Pellé, closes vim/vim#8202) https://github.com/vim/vim/commit/fe8ebdbe5c4e116311c0c0d5937b89ded5c92d01 Co-authored-by: Dominique Pelle <dominique.pelle@gmail.com>
| * vim-patch:8.2.1945: crash when passing NULL function to reduce()zeertzjq2023-04-16
| | | | | | | | | | | | | | | | | | | | Problem: Crash when passing NULL function to reduce(). Solution: Check for NULL pointer and give an error. (Dominique Pellé, closes vim/vim#7243) https://github.com/vim/vim/commit/0d90e728fe089ff1bb34d6a17f5591a96b57f734 Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * vim-patch:8.2.1111: inconsistent naming of get_list_tv() and eval_dict() ↵zeertzjq2023-04-14
| | | | | | | | | | | | | | | | | | | | | | (#23086) Problem: Inconsistent naming of get_list_tv() and eval_dict(). Solution: Rename get_list_tv() to eval_list(). Similarly for eval_number(), eval_string(), eval_lit_string() and a few others. https://github.com/vim/vim/commit/9a78e6df17033223ebdf499f2b02b2538601c52d Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * vim-patch:8.2.1047: Vim9: script cannot use line continuation like :def functionzeertzjq2023-04-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Vim9: script cannot use line continuation like in a :def function. Solution: Pass the getline function pointer to the eval() functions. Use it for addition and multiplication operators. https://github.com/vim/vim/commit/5409f5d8c95007216ae1190565a7a8ee9ebd7100 Omit source_nextline() and eval_next_non_blank(): Vim9 script only. N/A patches for version.c: vim-patch:8.2.1048: build failure without the eval feature Problem: Build failure without the eval feature. Solution: Add dummy typedef. https://github.com/vim/vim/commit/9d40c63c7dc8c3eb3886c58dcd334bc7f37eceba 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 Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * vim-patch:8.2.{0695,0725,0734,0753,0818,0819,0822} (#23075)zeertzjq2023-04-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vim-patch:8.2.0695: Vim9: cannot define a function inside a function Problem: Vim9: cannot define a function inside a function. Solution: Initial support for :def inside :def. https://github.com/vim/vim/commit/04b12697838b232b8b17c553ccc74cf1f1bdb81c vim-patch:8.2.0725: Vim9: cannot call a function declared later in Vim9 script Problem: Vim9: cannot call a function declared later in Vim9 script. Solution: Make two passes through the script file. https://github.com/vim/vim/commit/09689a02840be40fa7bb10b1921fb5bc5b2908f1 vim-patch:8.2.0734: Vim9: leaking memory when using :finish Problem: Vim9: leaking memory when using :finish. Solution: Do not check for next line in third pass. https://github.com/vim/vim/commit/04816717dfea6e2469ff4c9d40f68b59aaf03724 vim-patch:8.2.0753: Vim9: expressions are evaluated in the discovery phase Problem: Vim9: expressions are evaluated in the discovery phase. Solution: Bail out if an expression is not a constant. Require a type for declared constants. https://github.com/vim/vim/commit/32e351179eacfc84f64cd5029e221582d400bb38 vim-patch:8.2.0818: Vim9: using a discovery phase doesn't work well Problem: Vim9: using a discovery phase doesn't work well. Solution: Remove the discovery phase, instead compile a function only when it is used. Add :defcompile to compile def functions earlier. https://github.com/vim/vim/commit/822ba24743af9ee1b5e7f656a7a61a38f3638bca vim-patch:8.2.0819: compiler warning for unused variable Problem: Compiler warning for unused variable. Solution: Remove the variable. https://github.com/vim/vim/commit/f40e51a880a95f94dbbbecc9476559506c2cc345 vim-patch:8.2.0822: Vim9: code left over from discovery phase Problem: Vim9: code left over from discovery phase. Solution: Remove the dead code. https://github.com/vim/vim/commit/2eec37926db6d31beb36f162ac00357a30c093c8 Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * refactor: remove redundant castsii142023-04-07
| |
| * refactor: remove redundant castsii142023-04-07
| |
| * refactor: remove redundant const char * castsii142023-04-07
| |
| * refactor: remove use of reserved c++ keywordsii142023-04-06
| | | | | | | | | | | | libnvim couldn't be easily used in C++ due to the use of reserved keywords. Additionally, add explicit casts to *alloc function calls used in inline functions, as C++ doesn't allow implicit casts from void pointers.
| * refactor: make error message definitions constii142023-04-05
| | | | | | | | message.c functions now take const char * as a format. Error message definitions can be made const.
| * refactor: remove char_u (#22829)dundargoc2023-04-02
| | | | | | Closes https://github.com/neovim/neovim/issues/459
| * refactor: add const and remove unnecessary casts (#22841)ii142023-04-01
| |
| * refactor(PVS/V1048): remove duplicated assignments (#21873)Lucas Merritt2023-03-25
| |
| * vim-patch:9.0.1380: CTRL-X on 2**64 subtracts two (#22530)zeertzjq2023-03-05
| | | | | | | | | | | | | | | | Problem: CTRL-X on 2**64 subtracts two. (James McCoy) Solution: Correct computation for large number. (closes vim/vim#12103) https://github.com/vim/vim/commit/5fb78c3fa5c996c08a65431d698bd2c251eef5c7 Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * vim-patch:9.0.0430: cannot use repeat() with a blobzeertzjq2023-02-28
| | | | | | | | | | | | | | | | | | Problem: Cannot use repeat() with a blob. Solution: Implement blob repeat. (closes vim/vim#11090) https://github.com/vim/vim/commit/375141e1f80dced9be738568a3418f65813f4a2f Co-authored-by: Bakudankun <bakudankun@gmail.com>
| * vim-patch:9.0.0795: readblob() always reads the whole filezeertzjq2023-02-28
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: readblob() always reads the whole file. Solution: Add arguments to read part of the file. (Ken Takata, closes vim/vim#11402) https://github.com/vim/vim/commit/11df3aeee548b959ccd4b9a4d3c44651eab6b3ce Remove trailing whitespace in test as done in patch 9.0.1257. Move the help for rand() before range(). Co-authored-by: K.Takata <kentkt@csc.jp>
| * Merge #22382 has('gui_running')Justin M. Keyes2023-02-28
| |\
| | * feat(ui): restore has('gui_running')Justin M. Keyes2023-02-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: has('gui_running') is still common in the wild and our answer has changed over time, causing frustration. https://github.com/vimpostor/vim-tpipeline/commit/95a6ccbe9f33bc42dd4cee45731d8bc3fbcd92d1 Solution: Use stdin_tty/stdout_tty to decide if a UI is (not) a GUI.
| * | vim-patch:8.2.2782: Vim9: blob operations not fully testedzeertzjq2023-02-28
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Vim9: blob operations not fully tested. Solution: Make more blob tests run in Vim9 script. Fix filter(). Make insert() give an error for a null blob, like add(). https://github.com/vim/vim/commit/39211cba723a2cb58a97c7e08826713164b86efc vim-patch:8.2.3284: no error for insert() or remove() changing a locked blob Problem: No error for insert() or remove() changing a locked blob. Solution: Check a blob is not locked before changing it. (Sean Dewar, closes vim/vim#8696) https://github.com/vim/vim/commit/80d7395dcfe96158428da6bb3d28a6eee1244e28 Co-authored-by: Bram Moolenaar <Bram@vim.org> Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com>
| * vim-patch:8.2.2336: Vim9: not possible to extend dictionary with different ↵zeertzjq2023-02-27
| | | | | | | | | | | | | | | | | | | | | | type (#22425) Problem: Vim9: it is not possible to extend a dictionary with different item types. Solution: Add extendnew(). (closes vim/vim#7666) https://github.com/vim/vim/commit/b0e6b513648db7035046613431a4aa9d71ef4653 Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * vim-patch:9.0.0204: indexof() may leak memoryzeertzjq2023-02-27
| | | | | | | | | | | | | | | | | | Problem: indexof() may leak memory. Solution: Free allocated values. (Yegappan Lakshmanan, closes vim/vim#10916) https://github.com/vim/vim/commit/63acae13f57c5ad4c8ec3146d0c458550b9e984e Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
| * vim-patch:partial:9.0.0202: code and help for indexof() is not idealzeertzjq2023-02-27
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Code and help for indexof() is not ideal. Solution: Refactor the code, improve the help. (Yegappan Lakshmanan, closes vim/vim#10908) https://github.com/vim/vim/commit/3fbf6cd355de2212e9227f57d545592aae3f688f Skip CHECK_LIST_MATERIALIZE and set_vim_var_type(). Use tv_list_uidx() instead of lv_idx. Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
| * vim-patch:9.0.0196: finding value in list may require a for loopzeertzjq2023-02-27
| | | | | | | | | | | | | | | | | | Problem: Finding value in list may require a for loop. Solution: Add indexof(). (Yegappan Lakshmanan, closes vim/vim#10903) https://github.com/vim/vim/commit/b218655d5a485f5b193fb18d7240837d42b89812 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
| * vim-patch:8.2.4629: flattennew() makes a deep copy unnecessarilyzeertzjq2023-02-24
| | | | | | | | | | | | | | | | | | Problem: flattennew() makes a deep copy unnecessarily. Solution: Use a shallow copy. (issue vim/vim#10012) https://github.com/vim/vim/commit/c6c1ec4da53db9d292fa3dd081c20123f8261178 Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * vim-patch:8.2.4627: flatten() does not use maxdepth correctlyzeertzjq2023-02-24
| | | | | | | | | | | | | | | | | | Problem: flatten() does not use maxdepth correctly. Solution: Use a recursive implementation. (closes vim/vim#10020) https://github.com/vim/vim/commit/acf7d73a7f5cdd63b34de777a4ce5eb3e2ba0ab3 Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * vim-patch:8.2.2449: Vim9: flatten() always changes the list typezeertzjq2023-02-24
| | | | | | | | | | | | | | | | | | Problem: Vim9: flatten() always changes the list type. Solution: Disallow using flatten() and add flattennew(). https://github.com/vim/vim/commit/3b690069730805a147d45d92eaca4dc838272d1d Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * refactor: replace char_u with char (#21901)dundargoc2023-02-11
| | | | | | | | | | refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
| * build: enable MSVC level 3 warnings (#21934)dundargoc2023-02-11
| | | | | | | | | | | | MSVC has 4 different warning levels: 1 (severe), 2 (significant), 3 (production quality) and 4 (informational). Enabling level 3 warnings mostly revealed conversion problems, similar to GCC/clang -Wconversion flag.
| * refactor!: remove has("debug") (#22060)dundargoc2023-01-30
| | | | | | | | | | This value can not be relied on as it doesn't work for multi-configuration generators. I don't think this undocumented option is used much, if at all, so I think we should remove it.
| * vim-patch:9.0.1231: completion of :runtime does not handle {where} argumentzeertzjq2023-01-26
| | | | | | | | | | | | | | Problem: Completion of :runtime does not handle {where} argument. Solution: Parse the {where} argument. (closes vim/vim#11863) https://github.com/vim/vim/commit/3770f4c9cde7b5fcd10b6fa2e665cd0b69450fb2
| * vim-patch:9.0.1245: code is indented more than necessary (#21998)zeertzjq2023-01-26
| | | | | | | | | | | | | | | | | | Problem: Code is indented more than necessary. Solution: Use an early return where it makes sense. (Yegappan Lakshmanan, closes vim/vim#11879) https://github.com/vim/vim/commit/032713f8299abd92fcfb1e490d1ae5c1ecadde41 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* | Merge remote-tracking branch 'upstream/master' into userregJosh Rahm2023-01-25
|\|
| * feat!: make iconv a non-optional depLewis Russell2023-01-23
| |
| * vim-patch:9.0.1233: search() loops forever if "skip" is TRUE for all matches ↵zeertzjq2023-01-23
| | | | | | | | | | | | | | | | | | | | (#21956) Problem: search() loops forever if "skip" is TRUE for all matches. Solution: Keep the position of the first match. https://github.com/vim/vim/commit/3d79f0a4309995956bd8889940cca22f7a15881d Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * refactor: use uint8_t for blobs and ga_append() (#21916)zeertzjq2023-01-21
| | | | | | | | | | | | A blob is used as a sequence of bytes and usually accessed individually, not as as a NUL-terminuated string, so uint8_t should be better. Not sure about ga_append(), but using uint8_t leads to fewer casts.
| * refactor: replace char_u with char 25 (#21838)dundargoc2023-01-19
| | | | | | | | | | refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
| * vim-patch:8.2.1698: cannot lock a variable in legacy Vim script like in Vim9 ↵zeertzjq2023-01-19
| | | | | | | | | | | | | | | | | | | | (#21883) Problem: Cannot lock a variable in legacy Vim script like in Vim9. Solution: Make ":lockvar 0" work. https://github.com/vim/vim/commit/a187c43cfe8863d48b2159d695fedcb71f8525c1 Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * refactor: replace char_u with char 24 (#21823)dundargoc2023-01-18
| | | | | | | | | | refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
| * refactor: replace char_u with char 23 (#21798)dundargoc2023-01-18
| | | | | | Work on https://github.com/neovim/neovim/issues/459
| * refactor: replace char_u with char 22 (#21786)dundargoc2023-01-17
| | | | | | Work on https://github.com/neovim/neovim/issues/459