aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval_defs.h
Commit message (Collapse)AuthorAge
* multicursor: v:cascading #42289Evgeni Chasnovski8 days
| | | | | Problem: No way to check if cascade is in action. Solution: Add `v:cascading` variable.
* feat(:restart): v:startreason #40186Nathan Zeng2026-06-18
| | | | | | | | Problem: It's clumsy for scripts to handle a "restart", without custom mappings or global vars. Solution: Introduce `v:startreason`
* feat(server): add v:useractive, use it in serverlist(info=true) #39423Szymon Wilczek2026-05-07
| | | | | | | | | | | | Problem: When showing the :connect menu, it is useful to know which servers are most-recently active. But we don't have a good way to detect that. Solution: - Introduce `v:useractive`. - Include this timestamp in `serverlist({info=true})`. Co-authored-by: Justin M. Keyes <justinkz@gmail.com> Signed-off-by: Szymon Wilczek <swilczek.lx@gmail.com>
* feat(:restart): v:starttime, v:exitreason #39282Justin M. Keyes2026-04-22
| | | | | | | | | | | | Problem: - The `ZR` feature makes it more obvious that we need some sort of flag so that an `ExitPre` / `QuitPre` / `VimLeave` handler can handle restarts differently than a normal exit. For example, it's common that users want `:mksession` on restart, but perhaps not on a normal exit. - Nvim has no way to report its "uptime". Solution: - Introduce `v:starttime` - Introduce `v:exitreason`
* feat(startup): provide v:argf for file arguments #35889Sanzhar Kuandyk2026-02-25
| | | | | | | | | | | | | | | | | | Problem: - `:args` and `argv()` can change after startup. - `v:arg` includes options/commands, not just files. - Plugins (e.g. Oil) may rewrite directory args. Solution: - New read-only var `v:argf`: snapshot of file/dir args at startup. - Unaffected by `:args` or plugins. - Unlike `v:argv`, excludes options/commands. - Paths are resolved to absolute paths when possible Example: nvim file1.txt dir1 file2.txt :echo v:argf " ['/home/user/project/file1.txt', '/home/user/project/dir1', '/home/user/project/file2.txt']
* vim-patch:9.1.1892: Not possible to know once Vim is done with sourcing ↵zeertzjq2025-11-02
| | | | | | | | | | | | | | | | | | vimrc (#36429) Problem: A plugin does not know when startup scripts were already triggered. This is useful to determine if a function is called inside vimrc or after (like when sourcing 'plugin/' files). Solution: Add the v:vim_did_init variable (Evgeni Chasnovski) closes: vim/vim#18668 https://github.com/vim/vim/commit/294bce21ee837aab209a1008d0efc3e305cf188f Nvim has two more steps between sourcing startup scripts and loading plugins. Set this variable after these two steps. Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
* vim-patch:partial:8.1.1939: code for handling v: variables in generic eval ↵Jan Edmund Lazo2025-10-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | file (#35968) Problem: Code for handling v: variables in generic eval file. Solution: Move v: variables to evalvars.c. (Yegappan Lakshmanan, closes vim/vim#4872) https://github.com/vim/vim/commit/e5cdf153bcb348c68011b308c8988cea42d6ddeb Remove direct reference to "vimvars" for following functions: - assert_error() - get_vim_var_nr() - get_vim_var_list() - get_vim_var_dict() - get_vim_var_str() - set_cmdarg() - set_reg_var() - set_vcount() - set_vexception() - set_vthrowpoint() - set_vim_var_bool() - set_vim_var_dict() - set_vim_var_list() - set_vim_var_nr() - set_vim_var_special() - set_vim_var_string() - set_vim_var_type() Reorder functions based on v8.2.4930 for eval_one_expr_in_str() and eval_all_expr_in_str(). Co-authored-by: Bram Moolenaar <Bram@vim.org>
* refactor(typval)!: remove distinction of binary and nonbinary stringsbfredl2024-06-27
| | | | | | | | | | | | | | | | | | | | | This is a breaking change which will make refactor of typval and shada code a lot easier. In particular, code that would use or check for v:msgpack_types.binary in the wild would be broken. This appears to be rarely used in existing plugins. Also some cases where v:msgpack_type.string would be used to represent a binary string of "string" type, we use a BLOB instead, which is vimscripts native type for binary blobs, and already was used for BIN formats when necessary. msgpackdump(msgpackparse(data)) no longer preserves the distinction of BIN and STR strings. This is very common behavior for language-specific msgpack bindings. Nvim uses msgpack as a tool to serialize its data. Nvim is not a tool to bit-perfectly manipulate arbitrary msgpack data out in the wild. The changed tests should indicate how behavior changes in various edge cases.
* refactor(IWYU): move evalarg_T to eval_defs.h (#26716)zeertzjq2023-12-23
|
* eval: Split eval.c into smaller filesZyX2017-03-29
|
* ci: Check that `#include "*.h"` works as a single includeEiichi NISHINA2017-03-27
| | | | | | | | | | | Lesser form of include-what-you-use: at least guarantees that header file did not forget to include something through some other included file. Activate run_single_includes_tests on CI. Fix some IWYU violations. References #5321
* vim-patch:7.4.2095James McCoy2017-02-27
| | | | | | | | | | Problem: Man test fails when run with the GUI. Solution: Adjust for different behavior of GUI. Add assert_inrange(). https://github.com/vim/vim/commit/61c04493b00f85d0b97436260a9ef9ab82143b78 Only changes related to assert_inrange() were included, since we have a distinct man plugin.
* eval: Refactor item_lockZyX2017-02-23
| | | If I am not mistaking, this commit should not change any functionality.
* 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.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.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.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
* eval: Add id() function and make printf("%p") return something useful (#6095)Nikolai Aleksandrovich Pavlov2017-02-11
|
* Fixes.Michael Ennen2016-12-12
|
* vim-patch:7.4.1836Michael Ennen2016-12-12
| | | | | | | | | Problem: When using a partial on a dictionary it always gets bound to that dictionary. Solution: Make a difference between binding a function to a dictionary explicitly or automatically. https://github.com/vim/vim/commit/1d429610bf9e99a6252be8abbc910d6667e4d1da
* vim-patch:7.4.1559Michael Ennen2016-12-12
| | | | | | | Problem: Passing cookie to a callback is clumsy. Solution: Change function() to take arguments and return a partial. https://github.com/vim/vim/commit/1735bc988c546cc962c5f94792815b4d7cb79710
* vim-patch:7.4.1648Jurica Bradaric2016-09-28
| | | | | | | | Problem: Compiler has a problem copying a string into di_key[]. (Yegappan Lakshmanan) Solution: Add dictitem16_T. https://github.com/vim/vim/commit/bee6c0cf86a75faa2aa893f2c9db82fd944a89a5
* vim-patch:7.4.1703James McCoy2016-07-23
| | | | | | | Problem: Can't assert for not equal and not matching. Solution: Add assert_notmatch() and assert_notequal(). https://github.com/vim/vim/commit/b50e5f56861deb867478997397f7c784a7043233
* *: Fix linter errorsZyX2016-06-24
| | | | | | | | | Also adds one exception to linter rules: typedef struct { kvec_t(Object) stack; } EncodedData; is completely valid (from the style guide point of view) code.
* eval: Also make clear_tv non-recursiveZyX2016-06-24
|
* eval: Change dv_lock type to VarLockStatusZyX2016-04-18
|
* eval: Remove v:noneZyX2016-04-18
| | | | | To get v:none back just rever this commit. This will not make json*() functions compatible with Vim though.
* eval: Add special variables v:false, v:null, v:noneZyX2016-04-18
|
* eval: Add special variable typeZyX2016-04-18
|
* eval_defs.h: fix commentJustin M. Keyes2016-01-27
|
* vim-patch:7.4.698Jurica Bradaric2016-01-27
| | | | | | | | Problem: Various problems with locked and fixed lists and dictionaries. Solution: Disallow changing locked items, fix a crash, add tests. (Olaf Dabrunz) https://github.com/vim/vim/commit/9bc174b69d2775b0f27ed74bf372608d18c9f3d4
* eval: Replace internal_refcount hack with proper copyID settingZyX2015-12-13
|
* eval: Implement dictionary change notificationsThiago de Arruda2015-11-09
|
* *: Make ShaDa code use VimL values for additional_\* dataZyX2015-10-08
|
* vim-patch:7.4.609oni-link2015-09-07
| | | | | | | | | Problem: For complicated list and dict use the garbage collector can run out of stack space. Solution: Use a stack of dicts and lists to be marked, thus making it iterative instead of recursive. (Ben Fritz) https://github.com/vim/vim/commit/2459a5ecaa43c8549ea53e9364253ff891676da5
* eval: Remove most of msgpack* functions limitationsZyX2015-08-02
|
* eval: Add internal_refcount field to dict_TThiago de Arruda2015-04-02
| | | | | | | | Due to the way vimscript garbage collection handles cyclic references, its not possible to rely on incrementing `dv_refcount` to prevent dicts still used internally from being collected: If a object with dv_refcount > 0 isn't reachable by vimscript code, it will be freed when `garbage_collect()` is called. Add the `internal_refcount` field to prevent this.
* Introduce nvim namespace: Fix define guards.Eliseo Martínez2014-05-15
| | | | | | Change define guards from NEOVIM_XXX_H to NVIM_XXX_H: - Change header files. - Change clint correct guard name calculation.
* Introduce nvim namespace: Fix project-local includes.Eliseo Martínez2014-05-15
| | | | Prepend 'nvim/' in all project-local (non-system) includes.
* Introduce nvim namespace: Move files.Eliseo Martínez2014-05-15
Move files from src/ to src/nvim/. - src/nvim/ becomes the new root dir for nvim executable sources. - src/libnvim/ is planned to become root dir of the neovim library.