aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
Commit message (Collapse)AuthorAge
...
| * vim-patch:9.1.0329: String interpolation fails for Dict type (#28335)zeertzjq2024-04-15
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: String interpolation fails for Dict type Solution: Support Dict data type properly, also support :put =Dict (without having to convert it to string() first) (Yegappan Lakshmanan) fixes: vim/vim#14529 closes: vim/vim#14541 https://github.com/vim/vim/commit/f01493c55062c01b1cdf9b1e946577f4d1bdddf3 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
| * vim-patch:9.0.2180: POSIX function name in exarg causes issues (#28308)zeertzjq2024-04-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: POSIX function name in exarg struct causes issues on OpenVMS Solution: Rename getline member in exarg struct to ea_getline, remove isinf() workaround for VMS There are compilers that do not treat well POSIX functions - like getline - usage in the structs. Older VMS compilers could digest this... but the newer OpenVMS compilers ( like VSI C x86-64 X7.4-843 (GEM 50XB9) ) cannot deal with these structs. This could be limited to getline() that is defined via getdelim() and might not affect all POSIX functions in general - but avoiding POSIX function names usage in the structs is a "safe side" practice without compromising the functionality or the code readability. The previous OpenVMS X86 port used a workaround limiting the compiler capabilities using __CRTL_VER_OVERRIDE=80400000 In order to make the OpenVMS port future proof, this pull request proposes a possible solution. closes: vim/vim#13704 https://github.com/vim/vim/commit/6fdb6280821a822768df5689a5d727e37d38306c Co-authored-by: Zoltan Arpadffy <zoltan.arpadffy@gmail.com>
| * fix(prompt): emit change event for prompt newline (#28260)zeertzjq2024-04-10
| | | | | | Co-authored-by: Ilia Choly <ilia.choly@gmail.com>
| * vim-patch:8.2.0981: Vim9: cannot compile "[var, var] = list" (#28247)zeertzjq2024-04-09
| | | | | | | | | | | | | | | | Problem: Vim9: cannot compile "[var, var] = list". Solution: Implement list assignment. https://github.com/vim/vim/commit/47a519a933e8bcaf703a5feaac5c01491a658ee3 Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * vim-patch:8.2.2605: Vim9: string index and slice does not include composing ↵zeertzjq2024-03-23
| | | | | | | | | | | | | | | | | | | | | | chars Problem: Vim9: string index and slice does not include composing chars. Solution: Include composing characters. (issue vim/vim#6563) https://github.com/vim/vim/commit/0289a093a4d65c6280a3be118d1d3696d1aa74da Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * vim-patch:8.2.2318: Vim9: string and list index work differentlyzeertzjq2024-03-23
| | | | | | | | | | | | | | | | | | Problem: Vim9: string and list index work differently. Solution: Make string index work like list index. (closes vim/vim#7643) https://github.com/vim/vim/commit/e7525c552060dd04aacdbca6bb5fe6460cf4da60 Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * fix(pager): handle consecutive newlines properly (#27913)zeertzjq2024-03-18
| |
| * vim-patch:9.1.0168: too many STRLEN() calls (#27823)zeertzjq2024-03-12
| | | | | | | | | | | | | | | | | | | | | | Problem: too many STRLEN() calls Solution: Make use of ml_get_len() calls instead (John Marriott) closes: vim/vim#14123 https://github.com/vim/vim/commit/bfcc895482c717c9f6d86890d789ec739c3016b4 Co-authored-by: John Marriott <basilisk@internode.on.net>
* | Merge remote-tracking branch 'upstream/master' into userregJosh Rahm2024-03-09
|\|
| * fix(eval): skip over v:lua properly (#27517)zeertzjq2024-02-18
| | | | | | | | Problem: Error when parsing v:lua in a ternary expression. Solution: Set rettv->v_type for v:lua even if not evaluating.
| * refactor(eval): use arena when converting typvals to Objectbfredl2024-02-15
| | | | | | | | | | | | | | | | | | | | | | | | Note: this contains two _temporary_ changes which can be reverted once the Arena vs no-Arena distinction in API wrappers has been removed. Both nlua_push_Object and object_to_vim_take_luaref() has been changed to take the object argument as a pointer. This is not going to be necessary once these are only used with arena (or not at all) allocated Objects. The object_to_vim() variant which leaves luaref untouched might need to stay for a little longer.
| * refactor(lua): use Arena when converting from lua stack to API argsbfredl2024-02-13
| | | | | | | | | | | | | | | | | | | | | | | | and for return value of nlua_exec/nlua_call_ref, as this uses the same family of functions. NB: the handling of luaref:s is a bit of a mess. add api_luarefs_free_XX functions as a stop-gap as refactoring luarefs is a can of worms for another PR:s. as a minor feature/bug-fix, nvim_buf_call and nvim_win_call now preserves arbitrary return values.
| * vim-patch:partial:9.0.1196: code is indented more than necessary (#27315)zeertzjq2024-02-03
| | | | | | | | | | | | | | | | | | | | | | Problem: Code is indented more than necessary. Solution: Use an early return where it makes sense. (Yegappan Lakshmanan, closes vim/vim#11813) https://github.com/vim/vim/commit/e8575988969579f9e1439181ae338b2ff74054a8 Skip list_alloc_with_items(). Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
| * vim-patch:9.0.1105: code is indented too much (#27314)zeertzjq2024-02-03
| | | | | | | | | | | | | | | | | | | | Problem: Code is indented too much. Solution: Use an early return. (Yegappan Lakshmanan, closes vim/vim#11756) https://github.com/vim/vim/commit/87c1cbbe984e60582f2536e4d3c2ce88cd474bb7 Omit free_eval_tofree_later(): Vim9 script only. Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
| * vim-patch:partial:9.1.0027: Vim is missing a foreach() func (#27037)zeertzjq2024-01-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Vim is missing a foreach() func Solution: Implement foreach({expr1}, {expr2}) function, which applies {expr2} for each item in {expr1} without changing it (Ernie Rael) closes: vim/vim#12166 https://github.com/vim/vim/commit/e79e2077607e8f829ba823308c91104a795736ba Partial port as this doesn't handle non-materialized range() lists. vim-patch:c92b8bed1fa6 runtime(help): delete duplicate help tag E741 (vim/vim#13861) https://github.com/vim/vim/commit/c92b8bed1fa632569c8358feb3b72dd6a0844ef7 Co-authored-by: Ernie Rael <errael@raelity.com>
| * vim-patch:8.1.1968: crash when using nested map() (#27029)zeertzjq2024-01-16
| | | | | | | | | | | | | | | | | | | | | | Problem: Crash when using nested map(). Solution: Clear the pointer in prepare_vimvar(). (Ozaki Kiichi, closes vim/vim#4890, closes vim/vim#4891) https://github.com/vim/vim/commit/27da7de7c547dbf983ed7dd901ea59be4e7c9ab2 Cherry-pick Test_filter_map_nested() from patch 8.1.1964. Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * refactor(IWYU): fix headersdundargoc2024-01-11
| | | | | | | | | | | | Remove `export` pramgas from defs headers as it causes IWYU to believe that the definitions from the defs headers comes from main header, which is not what we really want.
| * feat(terminal): trigger TermRequest autocommand events (#22159)Ghjuvan Lacambre2024-01-09
| | | | | | | | | | | | | | | | | | | | This commit implements a new TermRequest autocommand event and has Neovim emit this event when children of terminal buffers emit an OSC or DCS sequence libvterm does not handle. The TermRequest autocommand event has additional data in the v:termrequest variable. Co-authored-by: Gregory Anders <greg@gpanders.com>
| * refactor: follow style guidedundargoc2023-12-30
| |
| * feat(health): make :checkhealth support more split modifiers (#26731)zeertzjq2023-12-25
| |
| * feat(health): checkhealth buffer can show in a split window (#26714)Pablo Arias2023-12-25
| | | | | | | | | | | | :checkhealth now respects :vertical and :horizontal. For example: :vertical checkhealth foo bar will open the healthcheck buffer in a vertical split.
| * refactor(IWYU): move evalarg_T to eval_defs.h (#26716)zeertzjq2023-12-23
| |
| * vim-patch:9.0.2183: Maximum callback depth is not configurable (#26703)zeertzjq2023-12-22
| | | | | | | | | | | | | | | | | | Problem: Maximum callback depth is not configurable. Solution: Revert patch 9.0.2103. Set 'maxfuncdepth' in test. fixes: vim/vim#13732 closes: vim/vim#13736 https://github.com/vim/vim/commit/fe583b1e5987fbfdb5f2141c133dbff9665ed301
| * refactor: run IWYU on entire repodundargoc2023-12-21
| | | | | | | | Reference: https://github.com/neovim/neovim/issues/6371.
| * refactor(IWYU): move decor provider types to decoration_defs.h (#26692)zeertzjq2023-12-21
| |
| * refactor: use `bool` to represent boolean valuesdundargoc2023-12-19
| |
| * docs: add style rule regarding initializationdundargoc2023-12-18
| | | | | | | | | | Specifically, specify that each initialization should be done on a separate line.
| * refactor: move non-symbols to defs.h headersdundargoc2023-12-17
| |
| * refactor(options): remove option type macrosFamiu Haque2023-12-14
| | | | | | | | | | | | | | | | Problem: We have `P_(BOOL|NUM|STRING)` macros to represent an option's type, which is redundant because `OptValType` can already do that. The current implementation of option type flags is also too limited to allow adding multitype options in the future. Solution: Remove `P_(BOOL|NUM|STRING)` and replace it with a new `type_flags` attribute in `vimoption_T`. Also do some groundwork for adding multitype options in the future. Side-effects: Attempting to set an invalid keycode option (e.g. `set t_foo=123`) no longer gives an error.
| * refactor(options): convert `opt_idx` variables to `OptIndex`Famiu Haque2023-12-09
| |
| * refactor(options): reduce `findoption()` usageFamiu Haque2023-12-09
| | | | | | | | | | | | Problem: Many places in the code use `findoption()` to access an option using its name, even if the option index is available. This is very slow because it requires looping through the options array over and over. Solution: Use option index instead of name wherever possible. Also introduce an `OptIndex` enum which contains the index for every option as enum constants, this eliminates the need to pass static option names as strings.
| * refactor: format casting of negative number better (#26482)zeertzjq2023-12-09
| |
| * refactor(options): split `get_option_value()` into smaller functionsFamiu Haque2023-12-07
| | | | | | | | | | | | Problem: Currently, `get_option_value()` returns 3 separate things: The actual value of the option, whether the option is hidden, and the option flags. This makes the function difficult to refactor, modify or otherwise reason about. Solution: Split `get_option_value()` into 3 functions, each with a single purpose. This also affects `get_option_value_for()`.
| * vim-patch:8.2.3695: confusing error for missing key (#26420)zeertzjq2023-12-06
| | | | | | | | | | | | | | | | Problem: Confusing error for missing key. Solution: Use the actualy key for the error. (closes vim/vim#9241) https://github.com/vim/vim/commit/5c1ec439f0a69e9aa7ece9bbb7d916f48f58be1e Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * vim-patch:8.1.1583: set_ref_in_list() only sets ref in items (#26418)zeertzjq2023-12-06
| | | | | | | | | | | | | | | | | | | | | | Problem: Set_ref_in_list() only sets ref in items. Solution: Rename to set_ref_in_list_items() to avoid confusion. https://github.com/vim/vim/commit/7be3ab25891fec711d8a2d9d242711a9155852b6 Omit set_ref_in_list() and set_ref_in_dict(): only used in popup window, if_pyth and if_lua. Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * refactor: free more reachable memory with EXITFREE (#26349)zeertzjq2023-12-02
| | | | | | Discovered using __sanitizer_print_memory_profile().
| * refactor(IWYU): fix includes for cmdhist.h (#26324)zeertzjq2023-11-30
| |
| * refactor(IWYU): move typedefs out of globals.h (#26322)zeertzjq2023-11-30
| |
| * build: don't define FUNC_ATTR_* as empty in headers (#26317)zeertzjq2023-11-30
| | | | | | | | | | | | FUNC_ATTR_* should only be used in .c files with generated headers. Defining FUNC_ATTR_* as empty in headers causes misuses of them to be silently ignored. Instead don't define them by default, and only define them as empty after a .c file has included its generated header.
* | Merge remote-tracking branch 'upstream/master' into userreguserregJosh Rahm2023-11-29
|\|
| * refactor: fix headers with IWYUdundargoc2023-11-28
| |
| * refactor: move hashtab types to hashtab_defs.h (#26262)zeertzjq2023-11-28
| |
| * refactor: rename types.h to types_defs.hdundargoc2023-11-27
| |
| * build(IWYU): fix includes for undo_defs.hdundargoc2023-11-27
| |
| * build(IWYU): fix includes for func_attr.hdundargoc2023-11-27
| |
| * build: enable IWYU on macdundargoc2023-11-27
| |
| * build(IWYU): replace most private mappings with pragmas (#26247)zeertzjq2023-11-27
| |
| * refactor: enable formatting for ternariesdundargoc2023-11-20
| | | | | | | | | | | | This requires removing the "Inner expression should be aligned" rule from clint as it prevents essentially any formatting regarding ternary operators.
| * refactor(grid): make screen rendering more multibyte than ever beforebfredl2023-11-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: buffer text with composing chars are converted from UTF-8 to an array of up to seven UTF-32 values and then converted back to UTF-8 strings. Solution: Convert buffer text directly to UTF-8 based schar_T values. The limit of the text size is now in schar_T bytes, which is currently 31+1 but easily could be raised as it no longer multiplies the size of the entire screen grid when not used, the full size is only required for temporary scratch buffers. Also does some general cleanup to win_line text handling, which was unnecessarily complicated due to multibyte rendering being an "opt-in" feature long ago. Nowadays, a char is just a char, regardless if it consists of one ASCII byte or multiple bytes.
| * refactor: remove B_SPELL macro (#26063)zeertzjq2023-11-16
| |