aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval
Commit message (Collapse)AuthorAge
...
* luaref: simplify handling of table callables and fix leak in vim.fn.call(table)Björn Linse2021-04-03
| | | | I AM THE TABLE
* vim-patch:8.2.2694: when 'matchpairs' is empty every character beeps (#14279)Jan Edmund Lazo2021-04-03
| | | | | | Problem: When 'matchpairs' is empty every character beeps. (Marco Hinz) Solution: Bail out when no character in 'matchpairs' was found. (closes vim/vim#8053) Add assert_nobeep(). https://github.com/vim/vim/commit/5b8cabfef7c3707f3e53e13844d90e5a217e1e84
* tv_dict_watcher_notify: any_needs_freeDaniel Hahler2021-03-30
|
* tv_dict_watcher_remove: delay freeing with busy queueDaniel Hahler2021-03-30
|
* Change QUEUE_FOREACH macro to use while instead of forerw72021-03-30
|
* Test and initial fix for crash with dictwatcherdelDaniel Hahler2021-03-30
| | | | Fixes https://github.com/neovim/neovim/issues/11188.
* vim-patch:8.1.0989: various small code uglinessJan Edmund Lazo2021-03-29
| | | | | | | Problem: Various small code ugliness. Solution: Remove pointless NULL checks. Fix function calls. Fix typos. (Dominique Pelle, closes vim/vim#4060) https://github.com/vim/vim/commit/bdace838c67c1bd94e55e34270a8325933891466
* vim-patch:8.1.0542: shiftwidth() does not take 'vartabstop' into accountVVKot2021-03-28
| | | | | | | | Problem: shiftwidth() does not take 'vartabstop' into account. Solution: Use the cursor position or a position explicitly passed. Also make >> and << work better with 'vartabstop'. (Christian Brabandt) https://github.com/vim/vim/commit/f951416a8396a54bbbe21de1a8b16716428549f2
* vim-patch:8.1.0105: all tab stops are the sameVVKot2021-03-28
| | | | | | | Problem: All tab stops are the same. Solution: Add the variable tabstop feature. (Christian Brabandt, closes vim/vim#2711) https://github.com/vim/vim/commit/04958cbaf25eea27eceedaa987adfb354ad5f7fd
* vim-patch:8.2.0949: strptime() does not use DSTJan Edmund Lazo2021-03-27
| | | | | | Problem: Strptime() does not use DST. Solution: Set the tm_isdst field to -1. (Tomáš Janoušek, closes vim/vim#6230) https://github.com/vim/vim/commit/ea1233fccf4f52f2b4eaab3788a087878d1336fc
* vim-patch:8.1.2326: cannot parse a date/time stringJan Edmund Lazo2021-03-27
| | | | | | | | | | | | | | | Problem: Cannot parse a date/time string. Solution: Add strptime(). (Stephen Wall, closes #) https://github.com/vim/vim/commit/10455d43fef041309ce0613fa792c635dd71e3a8 N/A patches for version.c: vim-patch:8.1.2344: Cygwin: warning for using strptime() Problem: Cygwin: warning for using strptime(). Solution: Move defining _XOPEN_SOURCE and __USE_XOPEN to vim.h. (Ken Takata, closes vim/vim#5265) Use 700 for _XOPEN_SOURCE for mkdtemp(). https://github.com/vim/vim/commit/6a228c6463935a73c8f21142cb7368545cfee317
* Merge pull request #14178 from andymass/vim-8.2.0088Jan Edmund Lazo2021-03-22
|\ | | | | [RFC] vim-patch 8.2.0088: insufficient tests for tags...
| * Fix neovim tag bugs uncovered by vim-8.2.0088,Andy K. Massimino2021-03-21
| | | | | | | | | | | | | | | | | | | | but not related to the patch. Specifically: - settagstack()'s e_listreq is in the wrong place - in :ltag, vim_strncpy -> xstrlcpy length parameter is different xstrlcpy's length includes the null terminator (so add one) - in :ltag, STRNCAT -> xstrlcat takes dest size, not number to copy use snprintf instead
* | vim-patch:8.2.2631: commands from winrestcmd() do not always work properlyJan Edmund Lazo2021-03-21
|/ | | | | | | Problem: Commands from winrestcmd() do not always work properly. (Leonid V. Fedorenchik) Solution: Repeat the size commands twice. (closes vim/vim#7988) https://github.com/vim/vim/commit/a0c8aea479ca055ce43ba2984a9933f6c48e6161
* vim-patch:8.2.0422: crash when passing popup window to win_splitmove()Andy K. Massimino2021-03-19
| | | | | | | | Problem: Crash when passing popup window to win_splitmove(). (john Devin) Solution: Disallow moving a popup window. (closes vim/vim#5816) https://github.com/vim/vim/commit/0f1563ffee4397f5b379517c41b7c9a977fd2e22 Add translated test for 8.2.0422 (popup->floating)
* vim-patch:8.2.0093: win_splitmove() can make Vim hangAndy K. Massimino2021-03-19
| | | | | | Problem: win_splitmove() can make Vim hang. Solution: Check windows exists in the current tab page. (closes vim/vim#5444) https://github.com/vim/vim/commit/7b94e77132eabdf0e43abca57e2ffeb961545174
* vim-patch:8.1.2020: it is not easy to change the window layoutAndy K. Massimino2021-03-19
| | | | | | Problem: It is not easy to change the window layout. Solution: Add win_splitmove(). (Andy Massimino, closes vim/vim#4561) https://github.com/vim/vim/commit/d20dcb3d011da6111153109f6e46fbd5c7fe9fb6
* vim-patch:8.2.2341: expresison command line completion incomplete after "g:"Jan Edmund Lazo2021-03-12
| | | | | | | | | | Problem: Expresison command line completion shows variables but not functions after "g:". (Gary Johnson) Solution: Prefix "g:" when needed to a global function. https://github.com/vim/vim/commit/1bb4de5302ba038b9c59e845b6d735e87d5681d0 Port most of patch v8.2.0335 to complete script-local functions if the name starts with "s:".
* api: allow open non-current buffer as terminal (+ xmas bonus)Björn Linse2021-03-12
| | | | vim.api.nvim_chan_send(vim.api.nvim_open_term(0), io.open("/path/to/smile.cat", "r"):read("*a"))
* vim-patch:8.2.2438: out of bounds compiler warningJan Edmund Lazo2021-03-09
| | | | | | | | | Problem: Out of bounds compiler warning. Solution: Increase the size of uf_name. https://github.com/vim/vim/commit/6a12e3342d84a1d754d793ed5019778bd60e7494 Do not set size of uf_name to avoid compiler warnings. Port only the comments.
* state: throttle batched event processing when input is availableBjörn Linse2021-03-08
| | | | | | | before, calling vim.schedule() from inside an event would execute the scheduled callback immediately after this event without checking for user input in between. Break event processing whenever user input or an interrupt is available.
* eval: add fname_case to feature listerw72021-02-25
|
* vim-patch:8.2.2233: cannot convert a byte index into a character index (#13978)kuuote2021-02-22
| | | | | Problem: Cannot convert a byte index into a character index. Solution: Add charidx(). (Yegappan Lakshmanan, closes vim/vim#7561) https://github.com/vim/vim/commit/17793ef23aae0bc94539390ccfe5e63b0ad39ff2
* fixup! vim-patch:8.1.1310: named function arguments are never optionalJan Edmund Lazo2021-02-22
|
* vim-patch:8.1.1310: named function arguments are never optionalerw72021-02-22
| | | | | | | Problem: Named function arguments are never optional. Solution: Support optional function arguments with a default value. (Andy Massimino, closes vim/vim#3952) https://github.com/vim/vim/commit/42ae78cfff171fbd7412306083fe200245d7a7a6
* vim-patch:8.2.0925: getcompletion() does not return command line argumentsJan Edmund Lazo2021-02-14
| | | | | | Problem: Getcompletion() does not return command line arguments. Solution: Add the "cmdline" option. (Shougo, closes vim/vim#1140) https://github.com/vim/vim/commit/1f1fd44ef796dd909ff5f3e5288b3fd79294dc71
* vim-patch:8.2.2489: current buffer is wrong after deletebufline() failsJan Edmund Lazo2021-02-10
| | | | | | | Problem: current buffer is wrong after deletebufline() fails to delete a line in another buffer. Solution: Restore the current buffer. https://github.com/vim/vim/commit/963ffa0a5a6091655ed72b4590ec5d5a1653bce8
* menu: use char* for set_context_in_menu_cmd() paramJan Edmund Lazo2021-02-07
| | | | | | All calls to set_context_in_menu_cmd() cast "cmd" arg to char_u. get_menu_cmd_nodes() doesn't require "cmd" to be unsigned char. Use "char" type for "cmd" function param to reduce type casts.
* fix(pty): Always use $TERM from the job's env dictJames McCoy2021-02-06
| | | | | | | | | | | | | | | | | | | | | | Before #12937, the only way to specify the `$TERM` for a pty job was through the `TERM` key in the job's opts dict. This was shuttled to the child process throug a special field on the PtyProcess object and injected into the environment after forking. Now that we have a proper way to specify the environment for a job, we can simply ensure that the env dict has a proper `TERM` set and avoid the extra shuttling of data around. This deprecates the use of the `TERM` option, but will still honor it if present, although at a lower priority than a `TERM` present in the env dict. This also fixes #13874 because we're no longer trying to overwrite `TERM` in the env dict with the special pty `term_name`. Doing so raises an internal error because of the existing key which, under certain circumstances, would cause the "hit enter" prompt. However, since the child process had already forked, there was no way for the user to acknowledge the prompt and we would just hang there.
* Use abort() instead of assert(false) for things that should never happenJames McCoy2021-01-31
| | | | | | | | assert() is compiled out for release builds, but we don't want to continue running in these impossible situations. This also resolves the "implicit fallthrough" warnings for the asserts in switch cases.
* eval/environ: Prefer the last definition of an env varJames McCoy2021-01-31
| | | | | | It's possible for the environment variable block given to nvim to contain multiple definitions for the same env var. In this case, nvim should preserve the last one defined.
* Common handling of required/ignored env varsJames McCoy2021-01-31
| | | | | | | | | | When starting a pty job, there are certain env vars that we need to either add or remove. Currently, there are two relevant scenarios. * Removing irrelevant env vars on Unix, mostly related to the terminal hosting nvim since they do not apply to a libvterm-hosted terminal. * Adding required env vars for Windows jobs.
* Support specifying "env" option for termopen()James McCoy2021-01-31
| | | | Co-authored-by: erw7 <erw7.github@gmail.com>
* Use dict_T to pass env vars to process spawning codeJames McCoy2021-01-31
| | | | Co-authored-by: Matthieu Coudron <mattator@gmail.com>
* vim-patch:8.2.0861: cannot easily get all the current marks (#13676)Jan Edmund Lazo2021-01-03
| | | | | | | | | | | Problem: Cannot easily get all the current marks. Solution: Add getmarklist(). (Yegappan Lakshmanan, closes #6032) https://github.com/vim/vim/commit/cfb4b47de08e4437c692d382067dc1692cd83c23 Cherry-pick the column number fix from patch v8.2.0871 because patch v8.2.0871 cannot be fully ported without the method patches. Co-authored-by: Peter Wolf <pwolf2310@gmail.com>
* vim-patch:8.1.1667: flags for Ex commands may clash with other symbolsJan Edmund Lazo2021-01-02
| | | | | | | | | | | | | | | | | Problem: Flags for Ex commands may clash with other symbols. Solution: Prepend with EX_. https://github.com/vim/vim/commit/8071cb2c646c9d38dcd4e3ccd377dce07705f031 N/A patches for version.c: vim-patch:8.1.1672: "make cmdidxs" doesn't work Problem: "make cmdidxs" doesn't work. Solution: Update macro names. (Naruhiko Nishino, closes vim/vim#4660) https://github.com/vim/vim/commit/d94ac0caca12c6ceb54b07fc932edba84a5f60f2 Error message for src/nvim/ex_cmds.lua which omits the "EX_" prefix for the flags.
* vim-patch:8.2.0928: many type casts are used for vim_strnsave()Jan Edmund Lazo2020-12-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Many type casts are used for vim_strnsave(). Solution: Make the length argument size_t instead of int. (Ken Takata, closes vim/vim#5633) Remove some type casts. https://github.com/vim/vim/commit/df44a27b53586fccfc6a3aedc89061fdd9a515ff N/A patches for version.c: vim-patch:8.2.0315: build failure on HP-UX system Problem: Build failure on HP-UX system. Solution: Use LONG_LONG_MIN instead of LLONG_MIN. Add type casts for switch statement. (John Marriott) https://github.com/vim/vim/commit/c593bec4120f122e8a9129ec461968f1bd214435 vim-patch:8.2.1052: build failure with older compilers Problem: Build failure with older compilers. Solution: Move declaration to start of block. https://github.com/vim/vim/commit/7acde51832f383f9a6d2e740cd0420b433ea841a vim-patch:8.2.2229: build failure without the +eval feature Problem: build failure without the +eval feature. Solution: Add #ifdef. https://github.com/vim/vim/commit/39cb2dab18e85fc60f116a4543e433616872b690 vim-patch:8.2.2232: compiler error for falling through into next case Problem: Compiler error for falling through into next case. Solution: Move FALLTHROUGH below the #endif https://github.com/vim/vim/commit/9618a25b9c054f0ee4e267d2db96b6e7c113ed7a
* vim-patch:8.1.1837: popup test fails if clipboard is supported but not workingJan Edmund Lazo2020-12-24
| | | | | | | | | | | | | | | | | | | Problem: Popup test fails if clipboard is supported but not working. Solution: Add the "clipboard_working" feature. Also use Check commands instead of "if" and "throw". And remove stray ch_logfile(). https://github.com/vim/vim/commit/4999a7fb6585915b53888c930067b33c01674678 Treat "clipboard_working" feature as an alias to "clipboard" feature. N/A patches for version.c: vim-patch:8.1.1840: Testing: WorkingClipboard() is not accurate Problem: Testing: WorkingClipboard() is not accurate. Solution: Check feature clipboard_working instead. https://github.com/vim/vim/commit/52992feafe8a996fbce29b97ae135abc169aa716 Neovim did not port WorkingClipboard() for the legacy tests.
* vim-patch:8.2.2142: memory leak when heredoc is not terminatedJan Edmund Lazo2020-12-22
| | | | | | Problem: Memory leak when heredoc is not terminated. Solution: Free heredoc_trimmed. https://github.com/vim/vim/commit/fffdf4754f4fd789c64596bdd9ea069725e63784
* vim-patch:8.1.1630: various small problemsJan Edmund Lazo2020-12-13
| | | | | | Problem: Various small problems. Solution: Various small improvements. https://github.com/vim/vim/commit/e809a4ed3014fbf717c936c727291b5f038829a5
* vim-patch:8.2.2136: Vim9: Using uninitialized variableJan Edmund Lazo2020-12-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Vim9: Using uninitialized variable. Solution: Initialize "len" to zero. Clean up fnamemodify(). https://github.com/vim/vim/commit/c530852315517a44354edbbd6c3375355bbec37e N/A patches for version.c: vim-patch:8.1.0839: when using VTP wrong colors after a color scheme change Problem: When using VTP wrong colors after a color scheme change. Solution: When VTP is active always clear after a color scheme change. (Nobuhiro Takasaki, closes vim/vim#3872) https://github.com/vim/vim/commit/f58d81a18752cb9bf899b3f7328fc489cf6558e8 vim-patch:8.1.2382: MS-Windows: When using VTP bold+inverse doesn't work Problem: MS-Windows: When using VTP bold+inverse doesn't work. Solution: Compare with the default colors. (Nobuhiro Takasaki, closes vim/vim#5303) https://github.com/vim/vim/commit/a050b9471c66b383ed674bfd57ac78016199d972 vim-patch:8.2.0669: MS-Windows: display in VTP is a bit slow Problem: MS-Windows: display in VTP is a bit slow. Solution: Optimize the code. (Nobuhiro Takasaki, closes vim/vim#6014) https://github.com/vim/vim/commit/4e5534fab798ab7c95554da3bc80b08336aedc2b vim-patch:8.2.0739: incomplete profiling when exiting because of a dealy signal Problem: Incomplete profiling when exiting because of a dealy signal. Solution: Call __gcov_flush() if available. https://github.com/vim/vim/commit/b415168a9862023462b7193e83da948cb8d11893 vim-patch:8.2.1911: tiny build fails Problem: Tiny build fails. Solution: Add #ifdef. https://github.com/vim/vim/commit/977fd0b327ed46a71c80d2cd62cbe149d43b9a69 vim-patch:8.2.2140: build failure with tiny features Problem: Build failure with tiny features. Solution: Add #ifdef. https://github.com/vim/vim/commit/2a3cd3af455973d678f70303ebdd486f3478bc0d
* eval: executable(), exepath() accept strings onlyJan Edmund Lazo2020-12-11
| | | | | | | | Cherry-pick f_executable(), f_exepath(), check_for_string() from patch 8.2.2117. Rename check_for_string() to tv_check_for_string(). https://github.com/vim/vim/commit/7bb4e74c38642682cfdd0cb4052adfa5efdd7dd1 Close https://github.com/neovim/neovim/issues/13485
* vim-patch:8.2.0047: cannot skip tests for specific MS-Windows platform (#13461)Jan Edmund Lazo2020-12-11
| | | | | Problem: Cannot skip tests for specific MS-Windows platform. Solution: Add windowsversion(). https://github.com/vim/vim/commit/0c1e3744ff0cd6c17af773046b876b428ff3dded
* fall back to os_realpathMagnus Kokk2020-11-30
|
* Fix undeclared identifier when HAVE_READLINK is not definedMagnus Kokk2020-11-30
|
* vim-patch:8.1.0951: using WIN64 even though it is never definedJan Edmund Lazo2020-11-27
| | | | | | Problem: Using WIN64 even though it is never defined. Solution: Only use _WIN64. (Ken Takata, closes vim/vim#3997) https://github.com/vim/vim/commit/44b443c5db7a372b2da519be15dd962c552e1355
* vim-patch:8.2.0996: using "aucmdwin" in win_gettype() is not idealJan Edmund Lazo2020-11-25
| | | | | | Problem: Using "aucmdwin" in win_gettype() is not ideal. Solution: Rename to "autocmd". https://github.com/vim/vim/commit/40a019f157c549dcdc17c33f082975485567bb06
* vim-patch:8.2.0991: cannot get window type for autocmd and preview windowJan Edmund Lazo2020-11-25
| | | | | | | | | Problem: Cannot get window type for autocmd and preview window. Solution: Add types to win_gettype(). (Yegappan Lakshmanan, closes vim/vim#6277) https://github.com/vim/vim/commit/0fe937fd8616fcd24b1b1ef2ab9f1657615dd22c Cherry-pick test_preview.vim,test_window_cmd.vim changes from patch v8.2.0522.
* vim-patch:8.2.0257: cannot recognize a terminal in a popup windowJan Edmund Lazo2020-11-25
| | | | | | Problem: Cannot recognize a terminal in a popup window. Solution: Add the win_gettype() function. https://github.com/vim/vim/commit/00f3b4e007af07870168bf044cecc9d544483953
* eval: use VAR_UNLOCKED enum, not the direct valueJan Edmund Lazo2020-11-21
|