aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
Commit message (Collapse)AuthorAge
...
* terminal: absolute CWD in term:// URI #11289Chris LaRose2020-01-26
| | | | | | | | | This makes it possible to restore the working directory of :terminal buffers when reading those buffers from a session file. Fixes #11288 Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
* Merge pull request #11740 from Billy4195/fix_jobstopBjörn Linse2020-01-22
|\ | | | | make jobstop() return 0 instead of throw error for already stopped job
| * Fix f_jobstop() failed loudlyBilly Su2020-01-22
| | | | | | | | | | | | The return value of jobstop() @return 1 for valid job id 0 for invalid id, including jobs have exited or stopped
* | doc: provider-perlJan Edmund Lazo2020-01-20
|/ | | | | | | Enable 'has("perl")' as an alias for 'g:loaded_perl_provider'. TODO: - +perl interface
* vim-patch:8.2.0120: virtcol() does not check arguments to be validJan Edmund Lazo2020-01-17
| | | | | | | | Problem: virtcol() does not check arguments to be valid, which may lead to a crash. Solution: Check the column to be valid. Do not decrement MAXCOL. (closes vim/vim#5480) https://github.com/vim/vim/commit/b3d33d8570bc49a7f90990572d7f9630a1bfae02
* messages: echo "line1\r\nline2" should not clear line1Björn Linse2020-01-16
|
* vim-patch:8.1.1579: dict and list could be GC'ed while displaying errorJan Edmund Lazo2020-01-05
| | | | | | | | | Problem: Dict and list could be GC'ed while displaying error in a timer. (Yasuhiro Matsumoto) Solution: Block garbage collection when executing a timer. Add test_garbagecollect_soon(). Add "no_wait_return" to test_override(). (closes vim/vim#4571) https://github.com/vim/vim/commit/adc6714aac20f5462a0ecec50ab4806b2f3ab0db
* tabpage: track last-used tabpage #11626butwerenotthereyet2020-01-02
| | | | | | | | | In a multi-window scenario, it is possible to return focus to the last accessed window via n_CTRL-W_p. However, in the case of a multi-tab scenario, there was previously no way to return focus to the last accessed *tab*. Here, that ability is added via n_g<tab>. Additionally, the index of the previous tab is exposed via tabpagenr('#'), mirroring the existing functionality of winnr('#').
* system(), jobstart(): raise error on non-executable #11234Daniel Hahler2019-12-24
| | | | | | | | | | * tv_to_argv: error when cmd is not executable Callers always assume that emsg was emitted: - https://github.com/neovim/neovim/blob/57fbf288/src/nvim/eval.c#L12509 - https://github.com/neovim/neovim/blob/57fbf288/src/nvim/eval.c#L17923 - https://github.com/neovim/neovim/blob/57fbf288/src/nvim/eval.c#L18202 * test/functional/provider: display reason from missing_provider * provider#node#Detect: skip / handle non-existing node executable
* eval: fix pvs/V1048Jan Edmund Lazo2019-12-22
|
* vim-patch:8.2.0030: "gF" does not work on output of "verbose command"Jan Edmund Lazo2019-12-22
| | | | | | Problem: "gF" does not work on output of "verbose command". Solution: Recognize " line " and translations. (closes vim/vim#5391) https://github.com/vim/vim/commit/64e74c9cc7d5aab215cf72d9bdd3aac32e128191
* vim-patch:8.2.0019: cannot number of lines of another bufferJan Edmund Lazo2019-12-20
| | | | | | | Problem: Cannot number of lines of another buffer. Solution: Add "linecount" to getbufinfo(). (Yasuhiro Matsumoto, closes vim/vim#5370) https://github.com/vim/vim/commit/a9e9679de3ef082ee29868ab404283dfc53258f2
* vim-patch:8.2.0013: not using a typedef for condstackJan Edmund Lazo2019-12-16
| | | | | | Problem: Not using a typedef for condstack. Solution: Add a typedef. https://github.com/vim/vim/commit/ddef129160ff0676e5da482071fb2fdc2988ac34
* Add support for the pum_getpos() API (#11562)Seth Fowler2019-12-16
| | | Add support for the pum_getpos() API
* Merge remote-tracking branch 'upstream/master' into libcallJames McCoy2019-12-15
|\
| * Add negative test for type of job's env optionJames McCoy2019-12-12
| |
| * Add os_getfullenv_size/os_copyfullenvJames McCoy2019-12-11
| |
| * jobstart now supports env/clear_envMatthieu Coudron2019-12-11
| | | | | | | | to modify the environment of the launched job.
| * API: rename nvim_execute_lua => nvim_exec_luaJustin M. Keyes2019-12-02
| | | | | | | | | | | | - We already find ourselves renaming nvim_execute_lua in tests and scripts, which suggests "exec" is the verb we actually want. - Add "exec" verb to `:help dev-api`.
| * vim-patch:8.1.2355: test with "man" fails on FreeBSDJan Edmund Lazo2019-11-30
| | | | | | | | | | | | | | | | | | Problem: Test with "man" fails on FreeBSD. Solution: Use "-P" instead of "--pager". https://github.com/vim/vim/commit/c7d2a57b3a076f6ecb16f93c0b09280c4b3b4175 Cherry-picked "has('bsd')" from vim-patch:8.1.0846. Cherry-picked test_normal.vim fix from vim-patch:8.1.2358
| * vim-patch:8.1.2348: :const cannot be followed by "| endif"Jan Edmund Lazo2019-11-26
| | | | | | | | | | | | | | Problem: :const cannot be followed by "| endif". Solution: Check following command for :const. (closes vim/vim#5269) Also fix completion after :const. https://github.com/vim/vim/commit/8f76e6b12b958f2779444a92234bbaf3f49eeb99
| * Add v:lua.func() vimL syntax for calling luaBjörn Linse2019-11-16
| | | | | | | | Also simplify error messages when calling lua from vimL.
| * f_getenv/setenv: Access v_special when v_type is VAR_SPECIAL #11388James McCoy2019-11-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Multiple Debian builds were failing these tests: Failures: From test_environ.vim: Found errors in Test_external_env(): function RunTheTest[37]..Test_external_env line 16: Expected '' but got 'FOO=null\n' Found errors in Test_getenv(): function RunTheTest[37]..Test_getenv line 2: Expected v:null but got v:false Found errors in Test_setenv(): function RunTheTest[37]..Test_setenv line 5: Expected v:null but got 'null' This is because nvim has a separate tag (`v_special`) in `typval_T` for special variables, whereas vim re-uses the `v_number` tag. On little-endian architectures, using the incorrect tag is not an issue because the byte representation is the same. However, on big-endian systems this caused the `v_number == kSpecialVarNull` checks to fail, and the non-special code to execute.
| * vim-patch:8.1.2262: unpack assignment in function not recognizedJan Edmund Lazo2019-11-09
| | | | | | | | | | | | Problem: Unpack assignment in function not recognized. Solution: Skip over "[a, b]". (closes vim/vim#5051) https://github.com/vim/vim/commit/1e673b9eb686459bd0e7fc3f2199dd077546a18e
| * vim-patch:8.1.2173: searchit() has too many argumentsJaehwang Jerry Jung2019-10-27
| | | | | | | | | | | | Problem: Searchit() has too many arguments. Solution: Move optional arguments to a struct. Add the "wrapped" argument. https://github.com/vim/vim/commit/92ea26b925a0835badb0af2d5887238a4198cabb
| * vim-patch:8.1.2168: heredoc not skipped in if-block #11265Marco Hinz2019-10-20
| | | | | | | | | | | | | | | | Problem: Heredoc assignment not skipped in if block. Solution: Check if "skip" is set. https://github.com/vim/vim/commit/b1ba9abcb385b0a5355788a7eefef78ec68d2f65 Fixes https://github.com/neovim/neovim/issues/11264
| * vim-patch:8.1.1729: heredoc with trim not properly handled in functionJurica Bradaric2019-10-13
| | | | | | | | | | | | Problem: Heredoc with trim not properly handled in function. Solution: Allow for missing indent. (FUJIWARA Takuya, closes vim/vim#4713) https://github.com/vim/vim/commit/ecaa75b4cea329a3902b8565e028b32279b8322b
| * vim-patch:8.1.1723: heredoc assignment has no room for new featuresJurica Bradaric2019-10-13
| | | | | | | | | | | | | | Problem: Heredoc assignment has no room for new features. (FUJIWARA Takuya) Solution: Require the marker does not start with a lower case character. (closes vim/vim#4705) https://github.com/vim/vim/commit/24582007294b0db3be9669d3b583ea45fc4f19b8
| * vim-patch:8.1.1625: script line numbers are not exactly rightJurica Bradaric2019-10-13
| | | | | | | | | | | | | | Problem: Script line numbers are not exactly right. Solution: Handle heredoc and continuation lines better. (Ozaki Kiichi, closes vim/vim#4611, closes vim/vim#4511) https://github.com/vim/vim/commit/bc2cfe4672d370330b8698d4d025697a9a6ec569
| * vim-patch:8.1.1585: :let-heredoc does not trim enoughJurica Bradaric2019-10-13
| | | | | | | | | | | | | | Problem: :let-heredoc does not trim enough. Solution: Trim indent from the contents based on the indent of the first line. Use let-heredoc in more tests. https://github.com/vim/vim/commit/e7eb92708ec2092a2fc11e78703b5dcf83844412
| * fnamemodify: fix handling of :r after :e #11165Rob Pilling2019-10-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Test fnamemodify() - Test handling of `expand("%:e:e:r")`. - Fix :e:e:r on filenames with insufficiently many extensions During `fnamemodify()`, ensuring that we don't go before the filename's tail is insufficient in cases where we've already handled a ":e" modifier, for example: ``` "path/to/this.file.ext" :e:e:r:r ^ ^-------- *fnamep +------------- tail ``` This means for a ":r", we'll go before `*fnamep`, and outside the bounds of the filename. This is both incorrect and causes neovim to exit with an allocation error. We exit because we attempt to calculate `s - *fnamep` (line 23948). Since `s` is before `*fnamep`, we caluclate a negative length, which ends up being interpreted as an amount to allocate, causing neovim to exit with ENOMEM (`memory.c:xmalloc`). We must instead ensure we don't go before `*fnamep` nor `tail`. The check for `tail` is still relevant, for example: ``` "path/to/this.file.ext" :r:r:r ^ ^------------- tail +--------------------- *fnamep ``` Here we don't want to go before `tail`. close #11165
| * Merge #11077 'vim-patch:8.1.{1354,1356,1362,1588}'Justin M. Keyes2019-10-07
| |\
| | * vim-patch:8.1.1588: in :let-heredoc line continuation is recognizedJurica Bradaric2019-10-07
| | | | | | | | | | | | | | | | | | Problem: In :let-heredoc line continuation is recognized. Solution: Do not consume line continuation. (Ozaki Kiichi, closes vim/vim#4580) https://github.com/vim/vim/commit/e96a2498f9a2d3e93ac07431f6d4afd77f30afdf
| | * vim-patch:8.1.1356: some text in heredoc assignment ends the textJurica Bradaric2019-10-07
| | | | | | | | | | | | | | | | | | Problem: Some text in heredoc assignment ends the text. (Ozaki Kiichi) Solution: Recognize "let v =<<" and skip until the end. https://github.com/vim/vim/commit/8471e57026714c5a0faf89288ceef5231fb88d4f
| | * vim-patch:8.1.1354: getting a list of text lines is clumsyJurica Bradaric2019-10-07
| |/ | | | | | | | | | | Problem: Getting a list of text lines is clumsy. Solution: Add the =<< assignment. (Yegappan Lakshmanan, closes vim/vim#4386) https://github.com/vim/vim/commit/f5842c5a533346c4ff41ff666e465c85f1de35d5
| * vim-patch:8.1.2120: some MB_ macros are more complicated than necessaryJan Edmund Lazo2019-10-06
| | | | | | | | | | | | | | Problem: Some MB_ macros are more complicated than necessary. (Dominique Pelle) Solution: Simplify the macros. Expand inline. https://github.com/vim/vim/commit/1614a14901558ca091329315d14a7d5e1b53aa47
| * vim-patch:8.1.2095: leaking memory when getting item from dictJan Edmund Lazo2019-10-01
| | | | | | | | | | | | Problem: Leaking memory when getting item from dict. Solution: Also free the key when not evaluating. https://github.com/vim/vim/commit/a893194d91a2942d4d54085d746ed137a9251b69
| * cmdline: wildmenumode() should be true with wildoptions+=pumBjörn Linse2019-09-28
| |
| * vim-patch:8.1.2055: profile: adjust line format #11058Daniel Hahler2019-09-21
| | | | | | | | | | | | Problem: Not easy to jump to function line from profile. Solution: Use "file:99" instead of "file line 99" so that "gf" works. (Daniel Hahler, closes vim/vim#4951) https://github.com/vim/vim/commit/181d4f58cc421f2e6d3b16333d4cb70d35ad1342
| * Merge #11060 from janlazo/vim-8.1.1783Justin M. Keyes2019-09-21
| |\ | | | | | | vim-patch:8.0.{1109,1529,1539,1621,1733,1771,1776},8.1.{1783,2054,2058}
| | * vim-patch:8.0.1529: assert_equalfile() does not close file descriptorsJan Edmund Lazo2019-09-21
| | | | | | | | | | | | | | | | | | Problem: Assert_equalfile() does not close file descriptors. (Coverity) Solution: Close the file descriptors. https://github.com/vim/vim/commit/3049418f3dbc571463a04d068069f6c5b7a8ccf1
| | * vim-patch:8.0.1109: timer causes error on exit from Ex modeJan Edmund Lazo2019-09-21
| | | | | | | | | | | | | | | | | | | | | Problem: Timer causes error on exit from Ex mode. (xtal8) Solution: save and restore the ex_pressedreturn flag. (Christian Brabandt, closes vim/vim#2079) https://github.com/vim/vim/commit/f5291f301e9322545f0621b2157e93050d1d4fb3
| * | vim-patch:8.1.0460: assert_fails() message argument #11051Jan Edmund Lazo2019-09-21
| |/ | | | | | | | | Problem: assert_fails() does not take a message argument Solution: Add the argument. https://github.com/vim/vim/commit/1307d1c003b01b4f67524c95feb07c3d91c7c428
| * vim-patch:8.0.1770: assert functions don't return anythingJan Edmund Lazo2019-09-16
| | | | | | | | | | | | Problem: Assert functions don't return anything. Solution: Return non-zero when the assertion fails. https://github.com/vim/vim/commit/65a5464985f980d2bbbf4e14d39d416dce065ec7
| * vim-patch:8.0.1523: cannot write and read terminal screendumpsJan Edmund Lazo2019-09-16
| | | | | | | | | | | | | | Problem: Cannot write and read terminal screendumps. Solution: Add term_dumpwrite(), term_dumpread() and term_dumpdiff(). Also add assert_equalfile(). https://github.com/vim/vim/commit/d96ff165113ce5fe62107add590997660e3d4802
* | libcallnr: Use int, not int64_t, as the return type for Vim compatJames McCoy2019-12-15
|/ | | | | | | | | | Vim's documentation simply states that libcallnr() should be used "for a function that returns an int". Based on the tests, code, and common syscall interfaces, this should likely be taken literally instead of trying to apply some well-defined type lipstick. Notably, this change fixes Test_libcall_libcallnr on hppa (a 32-bit big-endian system).
* Context: rename "buflist" => "bufs"Justin M. Keyes2019-09-14
| | | | | Given the other type names "jumps", "vars", etc., the name "buflist" is somewhat unintuitive.
* lintJustin M. Keyes2019-09-13
|
* getdigits: introduce `strict`, `def` parametersJustin M. Keyes2019-09-13
| | | | | | | | | | | | Problem: During a refactor long ago, we changed the `getdigits_*` familiy of functions to abort on overflow. But this is often wrong, because many of these codepaths are handling user input. Solution: Decide at each call-site whether to use "strict" mode. fix #5555
* syntax, TUI: support "strikethrough"Jaskaran Singh2019-09-13
| | | | | | fix #3436 Includes: vim-patch:8.0.1038: strike-through text not supported