aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* fix(float): make `screen*()` functions respect floating windowsEvgeni Chasnovski2022-06-23
| | | | Resolves #19013.
* fix(ci): noisy logs, unreliable test #19019Justin M. Keyes2022-06-18
| | | | | | | | | | | | | | | | | | | Problem: 1. CI logs have too many (40+) logs mentioning SIGHUP: ``` WRN 2022-06-18T16:05:47.075 T3568.22499.0/c deadly_signal:177: got signal 1 (SIGHUP) WRN 2022-06-18T16:05:47.273 T3569.91095.0/c deadly_signal:177: got signal 1 (SIGHUP) WRN 2022-06-18T16:05:47.651 T3570.59545.0/c deadly_signal:177: got signal 1 (SIGHUP) ``` 2. TS parser test still sometimes fails on BSD CI. 3. remote_spec test fails too often. Solution: 1. Log deadly signals at INFO level. It hasn't been helpful in CI, and for local troubleshooting it's reasonable to adjust the loglevel as needed. 2. Adjust the TS parser test again. ref #18911 3. Skip the remote_spec test. The `--remote` feature was merged before it was fully formed and needs to be revisited.
* build(lint): set some linters as non-fatal #19018Justin M. Keyes2022-06-18
| | | | | | | | | | luacheck and clint are the most important, and they are bundled. The others are nice-to-have, and not always available (and not bundled), so make them optional. This allows the "lint" target to function as a convenient and low-hassle handle for contributors. We still get the full power of lint in CI. TODO: bundle uncrustify (and then set it as required for "lint")?
* fix(terminal): coverity USE_AFTER_FREE #18978Justin M. Keyes2022-06-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Coverity reports use after free: *** CID 352784: Memory - illegal accesses (USE_AFTER_FREE) /src/nvim/buffer.c: 1508 in set_curbuf() 1502 if (old_tw != curbuf->b_p_tw) { 1503 check_colorcolumn(curwin); 1504 } 1505 } 1506 1507 if (bufref_valid(&prevbufref) && prevbuf->terminal != NULL) { >>> CID 352784: Memory - illegal accesses (USE_AFTER_FREE) >>> Calling "terminal_check_size" dereferences freed pointer "prevbuf->terminal". 1508 terminal_check_size(prevbuf->terminal); 1509 } 1510 } 1511 1512 /// Enter a new current buffer. 1513 /// Old curbuf must have been abandoned already! This also means "curbuf" may Solution: Change terminal_destroy and terminal_close to set caller storage to NULL, similar to XFREE_CLEAR. This aligns with the pattern found already in: terminal_destroy e897ccad3eb1e term_delayed_free 3e59c1e20d605
* fix(logging): try harder to resolve Nvim "name" #19016Justin M. Keyes2022-06-18
| | | | | | | | | | | Problem: If startup finishes (starting=false) before the logger ever happens to see a v:servername, we're stuck with the "?.<PID>" fallback name forever. Solution: Drop the `starting` condition. Discard the "?.<PID>" fallback after using it for the current log message. So logging will always check v:servername next time.
* fix(highlight): use ctermbg/fg instead of bg/fg when use_rgb=false #18982Oliver Marriott2022-06-18
| | | | | | | | | | | | If `use_rgb` was false, we would attempt to set the `cterm_bg_color` to the variable `bg`, which is only retrieved from `bg` and `background` keys, not `ctermbg`. Same for `fg`. This means the values would be `-1` (the default, un-got value) and we'd always set the returned values to `0`. My understanding is `fg/bg` is always "gui" values, so instead we should be using `ctermbg` when needed. Nb: when looking around I think this function is currently *always* called with `use_rgb = true`.
* Merge pull request #19011 from zeertzjq/vim-8.2.5120zeertzjq2022-06-18
|\ | | | | vim-patch:8.2.{5120.5121}
| * vim-patch:8.2.5121: interrupt test sometimes failszeertzjq2022-06-18
| | | | | | | | | | | | | | | | Problem: Interrupt test sometimes fails. Solution: Use a different file name. https://github.com/vim/vim/commit/8d6420631c2bd73dbc1939c4bf04ab7bb39cc263 Add a modeline to test_interrupt.vim.
| * vim-patch:8.2.5120: searching for quotes may go over the end of the linezeertzjq2022-06-18
|/ | | | | | Problem: Searching for quotes may go over the end of the line. Solution: Check for running into the NUL. https://github.com/vim/vim/commit/2f074f4685897ab7212e25931eeeb0212292829f
* vim-patch:8.2.5116: "limit" option of matchfuzzy() not always respected (#19005)zeertzjq2022-06-18
| | | | | Problem: "limit" option of matchfuzzy() not always respected. Solution: Remove "else". (Kazuyuki Miyagi, closes vim/vim#10586) https://github.com/vim/vim/commit/47f1a55849a73cefe738a246798221e45448546a
* vim-patch:d592deb33652 (#19002)Christian Clason2022-06-17
| | | | Update runtime files https://github.com/vim/vim/commit/d592deb336523a5448779ee3d4bba80334cff1f7
* fix(hl): return cterm fg/bg even if they match Normal #18981Oliver Marriott2022-06-16
| | | | | | | | | | Fixes #18980 - 831fa45ad84e is related but this doesn't regress that - The `cterm_normal_fg_color != ae.cterm_fg_color` comparison is originally carried from patch to patch starting all the way back in 29bc6dfabde2 where it was avoiding setting a HL attr. But `hlattrs2dict()` now is just informational.
* test(treesitter): add benchmark #18989Lewis Russell2022-06-16
| | | add benchmark from #18109
* docs: improve 'insertmode' emulation #18962zeertzjq2022-06-16
| | | | | | The current emulation script enters Insert mode much too frequently. Using only BufWinEnter seems to be a closer simulation. Also add a few more mappings.
* Merge #8519 feat: name, test ids, sockets in stdpath(state)Justin M. Keyes2022-06-17
|\
| * feat(server): instance "name", store pipes in stdpath(state)Justin M. Keyes2022-06-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: - Unix sockets are created in random /tmp dirs. - /tmp is messy, unclear when OSes actually clear it. - The generated paths are very ugly. This adds friction to reasoning about which paths belong to which Nvim instances. - No way to provide a human-friendly way to identify Nvim instances in logs or server addresses. Solution: - Store unix sockets in stdpath('state') - Allow --listen "name" and serverstart("name") to given a name (which is appended to a generated path). TODO: - is stdpath(state) the right place?
| * test(report): formatting, drop dumplog()Justin M. Keyes2022-06-15
| | | | | | | | | | Don't need to dumplog() on each failed test because we now have test-ids that associate log messages with tests.
| * feat(logging): include test-id in log messagesJustin M. Keyes2022-06-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: 1. Log messages (especially in CI) are hard to correlate with tests. 2. Since b353a5c05f02 #11886, dumplog() prints the logs next to test failures. This is noisy and gets in the way of the test results. Solution: 1. Associate an incrementing id with each test and include it in log messages. - FUTURE: add v:name so Nvim instances can be formally "named"? 2. Mention "child" in log messages if the current Nvim is a child (based on the presence of $NVIM). BEFORE: DBG … 12345 UI: event DBG … 12345 log_server_msg:722: RPC ->ch 1: … DBG … 12345 UI: flush DBG … 12345 inbuf_poll:444: blocking... events_enabled=1 events_pending=0 DBG … 23454 UI: stop INF … 23454 os_exit:594: Nvim exit: 0 AFTER: DBG … T57 UI: event DBG … T57 log_server_msg:722: RPC ->ch 1: … DBG … T57 UI: flush DBG … T57 inbuf_poll:444: blocking... events_enabled=1 events_pending=0 DBG … T57/child UI: stop INF … T57/child os_exit:594: Nvim exit: 0
* | Merge pull request #18760 from kevinhwang91/fix-treesitter-foldbfredl2022-06-16
|\ \ | | | | | | fix(treesitter): new iter if folded
| * | fix(treesitter): new iter if foldedkevinhwang912022-06-16
|/ /
* | vim-patch:8.2.5110: icon filetype not recognized from the first line (#18987)Christian Clason2022-06-16
| | | | | | | | | | Problem: Icon filetype not recognized from the first line. Solution: Add a check for the first line. (Doug Kearns) https://github.com/vim/vim/commit/bf6614643f656d38d220c04befdcb1d35774853a
* | fix(lua): clear got_int when calling vim.on_key() callback (#18979)zeertzjq2022-06-16
| |
* | fix(lua): highlight.on_yank can close timer in twice #18976notomo2022-06-15
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Steps to reproduce: 1. setting `vim.highlight.on_yank` ``` vim.api.nvim_create_autocmd({ "TextYankPost" }, { pattern = { "*" }, callback = function() vim.highlight.on_yank({ timeout = 200 }) end, }) ``` 2. repeat typing `yeye` ... 3. causes the following error. ``` Error executing vim.schedule lua callback: vim/_editor.lua:0: handle 0x01e96970 is already closing stack traceback: [C]: in function 'close' vim/_editor.lua: in function '' vim/_editor.lua: in function <vim/_editor.lua:0> ``` 📝 Test result before fix: [----------] Global test environment setup. [----------] Running tests from test/functional/lua/highlight_spec.lua [ RUN ] vim.highlight.on_yank does not show errors even if buffer is wiped before timeout: 15.07 ms OK [ RUN ] vim.highlight.on_yank does not show errors even if executed between timeout and clearing highlight: 15.07 ms ERR test/helpers.lua:73: Expected objects to be the same. Passed in: (string) 'Error executing vim.schedule lua callback: vim/_editor.lua:0: handle 0x02025260 is already closing stack traceback: [C]: in function 'close' vim/_editor.lua: in function '' vim/_editor.lua: in function <vim/_editor.lua:0>' Expected: (string) ''
* refactor(log): use msg_schedule_semsg #18950Justin M. Keyes2022-06-15
|
* vim-patch:8.2.5097: using uninitialized memory when using 'listchars' (#18974)zeertzjq2022-06-16
| | | | | Problem: Using uninitialized memory when using 'listchars'. Solution: Use the length returned by mb_char2bytes(). (closes vim/vim#10576) https://github.com/vim/vim/commit/74ac29cecd56457ee93f3f71b31b7a2e6d9712d6
* fix(ui): do not call showmode() when setting window height (#18969)zeertzjq2022-06-15
|
* vim-patch:8c1b8cb2e0b5 (#18966)Christian Clason2022-06-15
| | | | Update runtime files https://github.com/vim/vim/commit/8c1b8cb2e0b52d0853f85c2096a2f22dbc57a788
* test: correct check for v:errmsg in inccommand test (#18968)zeertzjq2022-06-15
| | | | After the first separator is typed v:errmsg can be set. Check for its value before typing the first separator.
* docs: fix typos (#18866)dundargoc2022-06-15
| | | | | | | docs: fix typos and similarly insignificant changes Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: smjonas <jonas.strittmatter@gmx.de> Co-authored-by: kanreki <32443233+kanreki@users.noreply.github.com>
* Merge pull request #18947 from zeertzjq/vim-8.2.1897zeertzjq2022-06-14
|\ | | | | vim-patch:8.2.{1897,1898,5088}
| * vim-patch:8.2.5088: value of cmod_verbose is a bit complicated to usezeertzjq2022-06-14
| | | | | | | | | | | | | | | | Problem: Value of cmod_verbose is a bit complicated to use. Solution: Use zero for not set, value + 1 when set. (closes vim/vim#10564) https://github.com/vim/vim/commit/cd7496382efc9e6748326c6cda7f01003fa07063 Omit has_cmdmod(): only used for Vim9 script
| * vim-patch:8.2.1898: command modifier parsing always uses global cmdmodzeertzjq2022-06-14
| | | | | | | | | | | | Problem: Command modifier parsing always uses global cmdmod. Solution: Pass in cmdmod_T to use. Rename struct fields consistently. https://github.com/vim/vim/commit/e10044015841711b989f9a898d427bcc1fdb4c32
| * refactor(api): remove redundant fields of CmdParseInfozeertzjq2022-06-14
| |
| * vim-patch:8.2.1897: command modifiers are saved and set inconsistentlyzeertzjq2022-06-14
| | | | | | | | | | | | | | | | | | Problem: Command modifiers are saved and set inconsistently. Solution: Separate parsing and applying command modifiers. Save values in cmdmod_T. https://github.com/vim/vim/commit/5661ed6c833e05467cab33cb9b1c535e7e5cc570 Cherry-pick: :0verbose fix from patch 8.2.4741
* | Merge pull request #18880 from bfredl/arenabfredl2022-06-14
|\ \ | |/ |/| perf(memory): use an arena for RPC decoding
| * perf(memory): use an arena for RPC decodingbfredl2022-06-14
| | | | | | | | | | | | | | | | | | drawback: tracing memory errors with ASAN is less accurate for arena allocated memory. Therefore, to start with it is being used for Object types around serialization/deserialization exclusively. This is going to have a large impact especially when TUI is refactored as a co-prosess as all UI events will be serialized and deserialized by nvim itself.
* | refactor: enable -Wconversion warning for eval.c (#18448)dundargoc2022-06-14
| | | | | | Work on https://github.com/neovim/neovim/issues/567
* | vim-patch:6ba83ba9ee29 (#18948)Christian Clason2022-06-14
| | | | | | | | Update runtime files. https://github.com/vim/vim/commit/6ba83ba9ee292f68aa0b218b3eef42db31c0b632
* | fix(inccommand): never preview if parsing command failed (#18944)zeertzjq2022-06-14
|/ | | | `errormsg` is not always set when parsing the command failed (e.g. when the range contains invalid marks). Check the return value is better.
* feat(lsp): sort codelens if multiple item per line (#18951)rhcher2022-06-13
|
* vim-patch:8.2.0577: not all modifiers supported for :options (#18952)zeertzjq2022-06-13
| | | | | | | Problem: Not all modifiers supported for :options. Solution: Use all cmdmod.split flags. (closes vim/vim#4401) https://github.com/vim/vim/commit/7a1637f4c00ac3d0cbf894803ada1586a1717470 Cherry-pick Test_options_command() change from patch 8.2.0540
* fix(tests): missing clear() #18927kylo2522022-06-13
| | | This was caught in #18674 since it allows test isolation
* feat: cmdheight=0 #16251Shougo2022-06-13
| | | | | | | | | Fix https://github.com/neovim/neovim/issues/1004 Limitation: All outputs need hit-enter prompt. Related: https://github.com/neovim/neovim/pull/6732 https://github.com/neovim/neovim/pull/4382
* Merge pull request #18902 from bfredl/fulexitbfredl2022-06-13
|\ | | | | fix(tests): check for EOF in requests to nvim properly
| * fix(tests): check for EOF on exit of nvim properlybfredl2022-06-13
| |
* | Merge pull request #18934 from zeertzjq/vim-8.2.5079zeertzjq2022-06-13
|\ \ | |/ |/| vim-patch:8.2.{5079,5081,5083}
| * vim-patch:8.2.5083: autocmd test still fails on MS-Windowszeertzjq2022-06-13
| | | | | | | | | | | | Problem: Autocmd test still fails on MS-Windows. Solution: Change backward to forward slashes. https://github.com/vim/vim/commit/db77c49401145d76441fbb3d22a1d7d987681c13
| * vim-patch:8.2.5081: autocmd test fails on MS-Windowszeertzjq2022-06-13
| | | | | | | | | | | | Problem: Autocmd test fails on MS-Windows. Solution: Set shellslash to get forward slashes. https://github.com/vim/vim/commit/7c0d0c3c75151e716184397a41ff74ab0429db5a
| * vim-patch:8.2.5079: DirChanged autocommand may use freed memoryzeertzjq2022-06-13
|/ | | | | | | | | Problem: DirChanged autocommand may use freed memory. (Shane-XB Qian) Solution: Free the memory later. (closes vim/vim#10555) https://github.com/vim/vim/commit/d8c9d32c8932e93008bfd4e8828ed42f4e9f8315 Code change is N/A as Nvim gets the full current directory again before applying the autocommand, so this just ports the tests.
* build(lint): fix lintuncrustify #18945Justin M. Keyes2022-06-12
| | | | | | | | | | Problem: lintuncrustify doesn't actually do anything. Solution: - Fix the parameters. - Fail correctly on nonzero result. followup to #18940