aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
...
| * 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
* | 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) ''
* fix(ui): do not call showmode() when setting window height (#18969)zeertzjq2022-06-15
|
* 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.
* 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
* 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.
* 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
* fix(tests): check for EOF on exit of nvim properlybfredl2022-06-13
|
* test: dismiss quit_more from Lua #11226Daniel Hahler2022-06-12
| | | Add a test for what #16537 fixed.
* Merge pull request #18931 from zeertzjq/regexp-num-escapedzeertzjq2022-06-13
|\ | | | | fix(substitute): subtract number of backslashes later
| * fix(substitute): subtract number of backslashes laterzeertzjq2022-06-12
| |
* | fix(buffer): disable buffer-updates before removing from window #18933zeertzjq2022-06-12
| | | | | | | | | | | | | | | | There can be other places that access window buffer info (e.g. `tabpagebuflist()`), so checking `w_closing` in `win_findbuf()` doesn't solve the crash in all cases, and may also cause Nvim's behavior to diverge from Vim. Fix #14998
* | fix(inccommand): skip split window if not enough room #18937Famiu Haque2022-06-12
|/ | | | | Command preview now behaves like inccommand=nosplit when there's not enough room for the preview window to be opened instead of aborting, which is consistent with old behavior of 'inccommand'.
* fix(messages): add color when showing nvim_echo in :messages historybfredl2022-06-11
|
* fix(inccommand): clear cmdpreview state if preview is not shown (#18923)zeertzjq2022-06-11
|
* fix(input): fix macro recording with ALT and special key (#18917)zeertzjq2022-06-10
|
* feat(filetype): remove side effects from vim.filetype.match (#18894)Gregory Anders2022-06-09
| | | | | | | | Many filetypes from filetype.vim set buffer-local variables, meaning vim.filetype.match cannot be used without side effects. Instead of setting these buffer-local variables in the filetype detection functions themselves, have vim.filetype.match return an optional function value that, when called, sets these variables. This allows vim.filetype.match to work without side effects.
* fix(tests): unreliable parser_spec #18911Justin M. Keyes2022-06-09
| | | | | | | | | The "first run" has high variability. Looks like the test failures correlate with 545dc82c1b22709c83ec23e9450f245f9ff1babc , which makes sense because that improves "first run" performance. So the `1000*` factor of this test could be adjusted to e.g. `300*` or `500*`. ref https://github.com/neovim/neovim/pull/16945
* feat(autocmds): retrieve lua callback (#18642)kylo2522022-06-09
| | | add a new `callback` field to `nvim_get_autocmds`
* test: allow running CI without ts parsers installedJames McCoy2022-06-08
|
* Merge pull request #18903 from jamessan/skip-test-parsersJames McCoy2022-06-08
|\ | | | | test(ts): skip test if C parser is not available
| * test(ts): skip test if C parser is not availableJames McCoy2022-06-08
| |
* | fix(terminal): scrollback delete lines immediately #18832Javier Lopez2022-06-08
|/ | | | | | | | | | | | | | * on_scrollback_option_changed renamed to adjust_scrollback. The function name did not correspond to what it was doing. It is called unconditionally in every refresh of the terminal unrelated if the scrollback option was changed. * new on_scrollback_option_changed function, which calls refresh_terminal, which then calls adjust_scrollback * terminal_check_size is not the appropriate function to call when the option is changed since it only conditionally adjusts the scrollback. Use the new on_scrollback_option_changed fixes #15477 fixes #11811
* fix(diagnostic): check for negative column value (#18868)mohsen2022-06-08
|
* fix(nvim_create_user_command): make `smods` work with `nvim_cmd`Famiu Haque2022-06-08
| | | | Closes #18876.
* fix(highlight): let winhighlight use cursorzbirenbaum2022-06-07
|
* fix(input): allow Ctrl-C to interrupt a recursive mapping even if mapped ↵zeertzjq2022-06-07
| | | | (#18885)
* vim-patch:8.2.5064: no test for what 8.1.0052 fixes (#18881)zeertzjq2022-06-07
| | | | | Problem: No test for what 8.1.0052 fixes. Solution: Add a test. (closes vim/vim#10531) https://github.com/vim/vim/commit/3760bfddc414e4d3e1c4203db8c22e293cf08d09
* fix(lsp): fix multi client handling in code action (#18869)Mathias Fußenegger2022-06-05
| | | Fixes https://github.com/neovim/neovim/issues/18860
* docs: fix typos (#18269)dundargoc2022-06-04
| | | | | | | | | | Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: Dan Sully <dan+github@sully.org> Co-authored-by: saher <msaher.shair@gmail.com> Co-authored-by: Stephan Seitz <stephan.seitz@fau.de> Co-authored-by: Benedikt Müller <d12bb@posteo.de> Co-authored-by: Andrey Mishchenko <mishchea@gmail.com> Co-authored-by: Famiu Haque <famiuhaque@protonmail.com> Co-authored-by: Oliver Marriott <hello@omarriott.com>
* feat(lsp): send didChangeConfiguration after init (#18847)Mathias Fußenegger2022-06-03
| | | | | | | Most LSP servers require the notification to correctly load the settings and for those who don't it doesn't cause any harm. So far this is done in lspconfig, but with the addition of vim.lsp.start it should be part of core.
* fix(hl): set Normal hl group sg_attr value #18820Oliver Marriott2022-06-03
| | | fix #18024
* fix(inccommand): avoid crash if callback changes inccommand option (#18830)zeertzjq2022-06-02
| | | | | | | | | clang: Result of operation is garbage or undefined clang: Uninitialized argument value Also check for == 's' instead of != 'n' as it is more straightforward. Also fix another unrelated PVS warning: PVS/V1071: Return value of win_comp_pos() is not always used
* fix(screen): restart win_update() if a decor provider changes signcols (#18768)zeertzjq2022-06-01
|
* fix(checkhealth): skip vim.health #18816Javier Lopez2022-06-01
| | | | | | | | | | | | | | | | | | Problem: https://github.com/neovim/neovim/pull/18720#issuecomment-1142614996 The vim.health module is detected as a healthcheck, which produces spurious errors: vim: require("vim.health").check() ======================================================================== - ERROR: Failed to run healthcheck for "vim" plugin. Exception: function health#check, line 20 Vim(eval):E5108: Error executing lua [string "luaeval()"]:1: attempt to call field 'check' (a nil value) stack traceback: [string "luaeval()"]:1: in main chunk Solution: Skip vim.health when discovering healthchecks.
* refactor: correct comments and assertions about mapping rhs <Nop> (#18821)zeertzjq2022-06-01
| | | | | | | | Also avoid referring to mappings as "keymaps" in commands and docs. *map_empty_rhs* *map-empty-rhs* You can create an empty {rhs} by typing nothing after a single CTRL-V (you have to type CTRL-V two times). Unfortunately, you cannot do this in a vimrc file.
* fix(inccommand): do not try to preview an ambiguous command (#18827)zeertzjq2022-06-01
|
* feat(fs): add vim.fs.normalize()Gregory Anders2022-05-31
|
* feat(fs): add vim.fs.find()Gregory Anders2022-05-31
| | | | | This is a pure Lua implementation of the Vim findfile() and finddir() functions without the special syntax.
* feat(fs): add vim.fs.dir()Gregory Anders2022-05-31
| | | | | This function is modeled after the path.dir() function from Penlight and the luafilesystem module.
* feat(fs): add vim.fs.basename()Gregory Anders2022-05-31
|
* feat(fs): add vim.fs.dirname()Gregory Anders2022-05-31
|
* feat(fs): add vim.fs.parents()Gregory Anders2022-05-31
| | | | | vim.fs.parents() is a Lua iterator that returns the next parent directory of the given file or directory on each iteration.
* refactor(checkhealth)!: rename to vim.health, move logic to Lua #18720Javier Lopez2022-05-31
| | | | | | | | | - Complete function: There was lots of unnecessary C code for the complete function, therefore moving it to Lua and use all the plumbing we have in place to retrieve the results. - Moving the module: It's important we keep nvim lua modules name spaced, avoids conflict with plugins, luarocks, etc.
* Merge pull request #18194 from famiu/feat/usercmd_previewbfredl2022-05-31
|\ | | | | feat: user command "preview" (like inccommand)
| * feat: add preview functionality to user commandsFamiu Haque2022-05-31
| | | | | | | | Adds a Lua-only `preview` flag to user commands which allows the command to be incrementally previewed like `:substitute` when 'inccommand' is set.