aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
Commit message (Collapse)AuthorAge
...
* | vim-patch:8.2.0507: getbufvar() may get the wrong dictionaryJan Edmund Lazo2020-04-13
| | | | | | | | | | | | Problem: Getbufvar() may get the wrong dictionary. (David le Blanc) Solution: Check for empty name. (closes vim/vim#5878) https://github.com/vim/vim/commit/5259275347667a90fb88d8ea74331f88ad68edfc
* | vim-patch:8.1.2282: crash when passing many arguments through a partialJan Edmund Lazo2020-04-13
| | | | | | | | | | | | | | Problem: Crash when passing many arguments through a partial. (Andy Massimino) Solution: Check the number of arguments. (closes vim/vim#5186) https://github.com/vim/vim/commit/4c054e9fb23027b55a09ee647a3a2c91936aeb1b
* | vim-patch:8.1.2280: crash when passing partial to substitute()Jan Edmund Lazo2020-04-13
| | | | | | | | | | | | Problem: Crash when passing partial to substitute(). Solution: Take extra arguments into account. (closes vim/vim#5186) https://github.com/vim/vim/commit/b0745b221d284e381f1bd4b591cd68ea54b6a51d
* | vim-patch:8.1.2378: using old C style commentsJan Edmund Lazo2020-04-12
| | | | | | | | | | | | Problem: Using old C style comments. Solution: Use // comments where appropriate. https://github.com/vim/vim/commit/5d18efecfd6c45d69f55268948a22cd0465bb955
* | vim-patch:8.2.0361: internal error when using "0" for a callbackJan Edmund Lazo2020-03-07
| | | | | | | | | | | | Problem: Internal error when using "0" for a callback. Solution: Give a normal error. (closes vim/vim#5743) https://github.com/vim/vim/commit/14e57909e662a43a42438e2701654af48af49b03
* | vim-patch:8.1.0619: :echomsg and :echoerr do not handle List and DictJan Edmund Lazo2020-02-29
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: :echomsg and :echoerr do not handle List and Dict like :echo does. (Daniel Hahler) Solution: Be more tolerant about the expression result type. https://github.com/vim/vim/commit/461a7fcfce3cd6414f990037e6468af3b5ccf119 Add lua functional tests for :echo,:echon,:echomsg,:echoerr because nvim did not port "test_" functions from Vim that modify internal state. Testing :echoerr via try/catch is sufficient.
* | vim-patch:8.2.0267: no check for a following cmd when calling a function failsJan Edmund Lazo2020-02-16
| | | | | | | | | | | | | | Problem: No check for a following command when calling a function fails. Solution: Also check for a following command when inside a try block. (closes vim/vim#5642) https://github.com/vim/vim/commit/e51bb17dd0d51384375830ee2a1df30c08121443
* | vim-patch:8.0.1660: the terminal API "drop" command doesn't support optionsJan Edmund Lazo2020-02-16
|/ | | | | | Problem: The terminal API "drop" command doesn't support options. Solution: Implement the options. https://github.com/vim/vim/commit/333b80acf3a44e462456e6d5730e47ffa449c83d
* Fix issue where callbacks are garbage collectederw72020-02-12
| | | | | Import necessary part of vim-patch:8.1.1575. https://github.com/vim/vim/commit/75a1a9415b9c207de5a29b25c0d1949c6c9c5c61
* vim-patch:8.1.0091: MS-Windows: Cannot interrupt gdb when program is runningerw72020-02-12
| | | | | | | Problem: MS-Windows: Cannot interrupt gdb when program is running. Solution: Add debugbreak() and use it in the terminal debugger. Respect 'modified' in a prompt buffer. https://github.com/vim/vim/commit/4551c0a9fcdbdef52836d4852686d54b5e47fdaf
* vim-patch:8.1.0069: cannot handle pressing CTRL-C in a prompt buffererw72020-02-12
| | | | | | Problem: Cannot handle pressing CTRL-C in a prompt buffer. Solution: Add prompt_setinterrupt(). https://github.com/vim/vim/commit/0e5979a6d491f68c4a8c86fab489016919329a6b
* vim-patch:8.1.0027: difficult to make a plugin that feeds a line to a joberw72020-02-12
| | | | | | Problem: Difficult to make a plugin that feeds a line to a job. Solution: Add the nitial code for the "prompt" buftype. https://github.com/vim/vim/commit/f273245f6433d5d43a5671306b520a3230c35787
* eval.c: factor out eval/funcs.c #11828Jakub Łuczyński2020-02-10
| | | | | | close #11828 ref #5081 cf. vim patch 7.4.2063
* vim-patch:8.2.0077: settagstack() cannot truncate at current indexJan Edmund Lazo2020-01-29
| | | | | | Problem: settagstack() cannot truncate at current index. Solution: Add the "t" action. (Yegappan Lakshmanan, closes vim/vim#5417) https://github.com/vim/vim/commit/271fa08a35b8d320d3a40db4ddae83b698fdd4fb
* vim-patch:8.2.0171: fix use of uninitialized buffer #11786Jan Edmund Lazo2020-01-28
| | | | | Problem: Coverity warning for using uninitialized buffer. Solution: Check the skip flag. https://github.com/vim/vim/commit/9a5e5a3e33bb86ba5209278e83ec60790f80d15c
* refactor: move session functions to ex_session.cJustin M. Keyes2020-01-28
|
* terminal: trim CWD slash #11762Justin M. Keyes2020-01-26
| | | | | | | | | | | | Trailing CWD slash in term:// buffer name breaks the BufReadCmd handler. Before: term://~///25232:/bin/bash After: term://~//25232:/bin/bash ref c6ff23d7a0d5 ref #11289
* 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