aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.h
Commit message (Collapse)AuthorAge
* vim-patch:8.1.1689: profiling code is spread outzeertzjq2022-08-12
| | | | | | | Problem: Profiling code is spread out. Solution: Move more profiling code to profiler.c. (Yegappan Lakshmanan, closes vim/vim#4668) https://github.com/vim/vim/commit/660a10ad41c14363326f83451c3c425201923119
* refactor: move FunPtr to types.h (#19466)zeertzjq2022-07-22
| | | | | This type itself is not eval-specific. Moving it to types.h can avoid including eval/funcs.h in many headers, and types.h is already included by many headers.
* refactor(uncrustify): set maximum number of consecutive newlines to 2 (#18695)dundargoc2022-05-25
|
* refactor: move macro definiton outside of enumsDundar Goc2022-05-06
| | | | | | Uncrustify version 0.75 assumes the macro inside the enum is an enum element, and thus adds a comma after it. This breaks neovim and makes it impossible to build it.
* feat(server): set $NVIM, unset $NVIM_LISTEN_ADDRESS #11009Justin M. Keyes2022-05-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PROBLEM ------------------------------------------------------------------------ $NVIM_LISTEN_ADDRESS has conflicting purposes as both a parameter ("the current process should listen on this address") and a descriptor ("the current process is a child of this address"). This contradiction means the presence of NVIM_LISTEN_ADDRESS is ambiguous, so child Nvim always tries to listen on its _parent's_ socket. This is the cause of lots of "Failed to start server" spam in our test/CI logs: WARN 2022-04-30… server_start:154: Failed to start server: address already in use: \\.\pipe\nvim-4480-0 WARN 2022-04-30… server_start:154: Failed to start server: address already in use: \\.\pipe\nvim-2168-0 SOLUTION ------------------------------------------------------------------------ 1. Set $NVIM to the parent v:servername, *only* in child processes. - Now the correct way to detect a "parent" Nvim is to check for $NVIM. 2. Do NOT set $NVIM_LISTEN_ADDRESS in child processes. 3. On startup if $NVIM_LISTEN_ADDRESS exists, unset it immediately after server init. 4. Open a channel to parent automatically, expose it as v:parent. Fixes #3118 Fixes #6764 Fixes #9336 Ref https://github.com/neovim/neovim/pull/8247#issuecomment-380275696 Ref #8696
* refactor: replace char_u variables and functions with charDundar Goc2022-05-03
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor(uncrustify): change rules to better align with the style guideDundar Goc2022-04-29
| | | | | | | | | | | | | Add space around arithmetic operators '+' and '-'. Remove space between back-to-back parentheses, i.e. ')(' vs. ') ('. Remove space between '((' or '))' of control statements. Add space between ')' and '{' of control statements. Remove space between function name and '(' on function declaration. Collapse empty blocks between '{' and '}'. Remove newline at the end of the file. Remove newline between 'enum' and '{'. Remove newline between '}' and ')' in a function invocation. Remove newline between '}' and 'while' of 'do' statement.
* refactor(misc1): move out autocmd related functionsBjörn Linse2021-12-09
|
* Merge pull request #16107 from zeertzjq/vim-8.1.1542Jan Edmund Lazo2021-12-06
|\ | | | | vim-patch:8.1.1542,8.2.3549: an OptionSet autocommand does not get enough info
| * vim-patch:8.1.1542: an OptionSet autocommand does not get enough infozeertzjq2021-11-22
| | | | | | | | | | | | | | Problem: An OptionSet autocommand does not get enough info. Solution: Add v:option_command, v:option_oldlocal and v:option_oldglobal. (Latrice Wilgus, closes vim/vim#4118) https://github.com/vim/vim/commit/d7c968794710f338d491072171df48f96612cf72
* | lint (#16526)Jan Edmund Lazo2021-12-05
|/
* refactor: uncrustify #16090dundargoc2021-10-29
|
* refactor: format all C files under nvim/ #15977dundargoc2021-10-12
| | | | | | | | * refactor: format all C files under nvim * refactor: disable formatting for Vim-owned files: * src/nvim/indent_c.c * src/nvim/regexp.c * src/nvim/regexp_nfa.c * src/nvim/testdir/samples/memfile_test.c
* vim-patch:8.1.0736: code for Blob not sufficiently testedSean Dewar2021-09-15
| | | | | | | | | Problem: Code for Blob not sufficiently tested. Solution: Add more tests. Fix uncovered crash. Add test_null_blob(). https://github.com/vim/vim/commit/c0f5a78c15b194f23bedb82e6825e34f481e6532 eval0 and ex_echo's emsg-specific changes have already been ported. These tests uncover another crash that was fixed in v8.1.0738.
* vim-patch:8.1.0735: cannot handle binary dataSean Dewar2021-09-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Cannot handle binary data. Solution: Add the Blob type. (Yasuhiro Matsumoto, closes vim/vim#3638) https://github.com/vim/vim/commit/6e5ea8d2a995b32bbc5972edc4f827b959f2702f Nvim-specific Blob conversions are implemented in future commits. Refactor write_blob() to use a FileDescriptor, as f_writefile() was refactored to use one (does not apply to read_blob()). Use var_check_lock() in f_add() for Blobs from v8.1.0897. Add a modeline to test_blob.vim and fix some doc typos. Include if_perl.txt's VIM::Blob() documentation. Interestingly, this function already worked before this port, as it just returns a Blob string literal, not an actual Blob object. N/A patches for version.c: vim-patch:8.1.0741: viminfo with Blob is not tested Problem: Viminfo with Blob is not tested. Solution: Extend the viminfo test. Fix reading a blob. Fixed storing a special variable value. https://github.com/vim/vim/commit/8c8b8bb56c724cc1bfc3d8520eec33f2d399697c vim-patch:8.1.1022: may use NULL pointer when out of memory Problem: May use NULL pointer when out of memory. (Coverity) Solution: Check for blob_alloc() returning NULL. https://github.com/vim/vim/commit/e142a9467a7f6845a426d8db6efedf246d3c13ac
* Merge pull request #14403 from seandewar/vim-8.2.1933Jan Edmund Lazo2021-05-09
|\ | | | | vim-patch:8.2.{0174,1933,1935,1946,2286,2287}
| * eval: port v:collateSean Dewar2021-04-20
| | | | | | | | Cherry-picked from patch v8.2.0988. Required for patch v8.2.1933.
* | vim-patch:8.2.2388: no easy way to get the maximum or mininum number valueJan Edmund Lazo2021-04-27
| | | | | | | | | | | | Problem: No easy way to get the maximum or mininum number value. Solution: Add v:numbermax and v:numbermin. https://github.com/vim/vim/commit/57d5a01cb45d6edb16c3835a49b42d6d8fc0163e
* | vim-patch:8.2.0296: mixing up "long long" and __int64 may cause problemsJan Edmund Lazo2021-04-27
|/ | | | | | | Problem: Mixing up "long long" and __int64 may cause problems. (John Marriott) Solution: Pass varnumber_T to vim_snprintf(). Add v:numbersize. https://github.com/vim/vim/commit/f9706e9df0e37d214fb08eda30ba29627e97a607
* vim-patch:8.2.2319: "exptype_T" can be read as "expected type"Jan Edmund Lazo2021-04-11
| | | | | | | | Problem: "exptype_T" can be read as "expected type". Solution: Rename to "exprtype_T", expression type. https://github.com/vim/vim/commit/657137ca487c60d63989236115115161def270a5 Vim9 changes omitted.
* vim-patch:8.2.0069: ETYPE_ is used for two different enumsJan Edmund Lazo2021-04-11
| | | | | | Problem: ETYPE_ is used for two different enums. Solution: Rename one to use EXPR_. https://github.com/vim/vim/commit/87396072c5c468f0c129e4ec7cd944ac897b7752
* vim-patch:8.2.0044: expression type is used inconsistentlyJan Edmund Lazo2021-04-11
| | | | | | | Problem: Expression type is used inconsistently. Solution: Add "ETYPE_IS" and "ETYPE_ISNOT" as separate enum values. Rename "TYPE_" to "ETYPE_" to avoid confusion. https://github.com/vim/vim/commit/07a3db89b8953bd0964895badb3b662f7514bc10
* eval: add v:_null_stringJan Edmund Lazo2021-04-08
| | | | | | | | | | Replacement for Vim's test_null_string(). Vim uses it to verify that its codebase handles null strings. Preparation for the Test_null_list() in patch v8.2.1822. Use v:_null_string, not non-existent env var, for null string tests. Mention v:_null_string in id() because id(v:_null_string) returns (nil).
* vim-patch:8.0.1505: debugger can't break on a conditionJan Edmund Lazo2021-04-08
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Debugger can't break on a condition. (Charles Campbell) Solution: Add ":breakadd expr". (Christian Brabandt, closes vim/vim#859) https://github.com/vim/vim/commit/c6f9f739d32084923c3031cbf6f581f8c8bf7fd2 Do not port "has_watchexpr()" to avoid dead code. "has_watchexpr()" always returns 0 because "debug_expr" is always 0. Restore "eval_expr()" as a wrapper to allocate "typval_T" for "eval0()". Remove it in later patches. Include "typval_compare()" changes from patch v8.1.0958, partially ported in 8b60368c1b9e23f0695557da170d416d71f7e6a3. Close https://github.com/neovim/neovim/pull/12373 N/A patches for version.c: vim-patch:8.2.2720: GTK menu tooltip moves the cursor Problem: GTK menu tooltip moves the cursor. Solution: Position the cursor after displaying the tooltip. Do not show the tooltip when editing the command line. https://github.com/vim/vim/commit/01ac0a1f664c5b1ffd5c9ef196d4b47edf2fd494
* vim-patch:8.2.2070: can't get the exit value in VimLeave(Pre) autocommands ↵Jan Edmund Lazo2021-02-20
| | | | | | | | | | | | | | | | | (#13981) Problem: Can't get the exit value in VimLeave or VimLeavePre autocommands. Solution: Add v:exiting like in Neovim. (Yegappan Lakshmanan, closes vim/vim#7395) https://github.com/vim/vim/commit/f0068c5154a99b86b2c4515a4b93c003b2445cf4 Rearrange VimVarIndex enums and vimvars[] entries to sync with Vim. N/A patches for version.c: vim-patch:8.2.2535: MS-Windows: cannot run all vim9 tests Problem: MS-Windows: cannot run all vim9 tests. Solution: Make test_vim9 target work. https://github.com/vim/vim/commit/723ef5db980b2e69ef8bdc0dd448cb645491c464
* eval: ll_range,ll_empty2 members are boolJan Edmund Lazo2021-02-06
|
* vim-patch:8.1.2285: padding in structures wastes memoryJan Edmund Lazo2021-02-06
| | | | | | | | | Problem: Padding in structures wastes memory. Solution: Move fields to avoid padding. (Dominique Pelle, closes vim/vim#5202) https://github.com/vim/vim/commit/d6beab0248cdb0b7073e97d98d65de7138cb3386 Skip "ml_line_len" member of "struct memline". Patch v8.1.0579 was not ported.
* vim-patch:8.2.0602: :unlet $VAR does not work properly (#13238)Sean Dewar2020-12-02
| | | | | | | Problem: :unlet $VAR does not work properly. Solution: Make ":lockvar $VAR" fail. Check the "skip" flag. https://github.com/vim/vim/commit/7e0868efcf094f2cc59fa4e18af3a8dc7aedd64f Include patch 8.2.0601 changes so that ex_unletlock() can execute a callback if there are no errors.
* vim-patch:8.1.2233: cannot get the Vim command line arguments (#12117)kuuote2020-05-24
| | | | | Problem: Cannot get the Vim command line arguments. Solution: Add v:argv. (Dmitri Vereshchagin, closes vim/vim#1322) https://github.com/vim/vim/commit/69bf634858a2a75f2984e42b1e4017bc529a040a
* fix: made eval_lavars_used globalJakub Łuczyński2020-02-13
|
* fix: header updatesJakub Łuczyński2020-02-13
|
* moved more stuffJakub Łuczyński2020-02-13
|
* eval.c: factor out eval/funcs.c #11828Jakub Łuczyński2020-02-10
| | | | | | close #11828 ref #5081 cf. vim patch 7.4.2063
* Add v:lua.func() vimL syntax for calling luaBjörn Linse2019-11-16
| | | | Also simplify error messages when calling lua from vimL.
* vim-patch:8.1.1913: not easy to compute the space on the command line (#10845)Daniel Hahler2019-08-25
| | | | | Problem: Not easy to compute the space on the command line. Solution: Add v:echospace. (Daniel Hahler, closes vim/vim#4732) https://github.com/vim/vim/commit/37f4cbd46f5a6f2dd3a48d5fa4324dce37e4bd6c
* API: ContextJustin M. Keyes2019-07-27
|
* eval: Add stdpath() method (#5297)Christian Höltje2018-03-29
| | | | | | Adds the :stdpath method for fetching XDG standard directories. Fixes #5297
* api: change nvim_command_output behaviorJustin M. Keyes2018-01-10
| | | | | | | | | | | | | | | | | | | Implement nvim_command_output with `execute({cmd},"silent")`. Behavior changes: - does not provoke any hit-enter prompt - no longer prepends a newline char - does not capture some noise (like the "[New File]" message, see the change to tabnewentered_spec.lua) Technically ("bug-for-bug") this a breaking change. But the previous behavior of nvim_command_output meant that it probably wasn't used for anything outside of tests. Also remove the undocumented `v:command_output` variable which was a hack introduced only for the purposes of nvim_command_output. closes #7726
* channels: stderr channelBjörn Linse2017-11-25
|
* channels: allow bytes sockets and stdio, and buffered bytes outputBjörn Linse2017-11-24
|
* eval,*: Move get_tv_string to typval.cZyX2017-03-29
| | | | Function was renamed and changed to return `const char *`.
* *: Move some dictionary functions to typval.h and use char*ZyX2017-03-29
| | | | Also fixes buffer reusage in setmatches() and complete().
* 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.2119Michael Ennen2017-02-14
| | | | | | | | Problem: Closures are not supported. Solution: Capture variables in lambdas from the outer scope. (Yasuhiro Matsumoto, Ken Takata) https://github.com/vim/vim/commit/1e96d9bf98f9ab84d5af7f98d6a961d91b17364f
* 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
* vim-patch:7.4.1727Michael Ennen2017-02-14
| | | | | | | | Problem: Cannot detect a crash in tests when caused by garbagecollect(). Solution: Add garbagecollect_for_testing(). Do not free a job if is still useful. https://github.com/vim/vim/commit/ebf7dfa6f121c82f97d2adca3d45fbaba9ad8f7e
* Add v:exitingMarco Hinz2016-12-01
| | | | | | | | | Contains the exit value nvim will use. Before exiting, it is v:null. That way jobs or autocmds (in VimLeavePre or VimLeave) can check if Neovim is about to quit and with what exit value. Closes #4666.
* vim-patch:7.4.2071Michael Ennen2016-11-29
| | | | | | | Problem: The return value of type() is difficult to use. Solution: Define v:t_ constants. (Ken Takata) https://github.com/vim/vim/commit/f562e72df726c6191fa305e1c0a113f1cfb87f76
* vim-patch:7.4.1894James McCoy2016-11-15
| | | | | | | Problem: Cannot get the window ID for a mouse click. Solution: Add v:mouse_winid. https://github.com/vim/vim/commit/511972d810ea490955161ff5097ec2f57919ceaf
* vim-patch:7.4.1892James McCoy2016-11-15
| | | | | | | Problem: balloon eval only gets the window number, not the ID. Solution: Add v:beval_winid. https://github.com/vim/vim/commit/c9721bdc63378cc6123e775ffe43e9cba30322b3