aboutsummaryrefslogtreecommitdiff
path: root/test/functional
Commit message (Collapse)AuthorAge
...
| * | refactor(tests): introduce testprg()Justin M. Keyes2022-06-25
| | | | | | | | | | | | | | | | | | Also: - Add a describe('shell :!') section to system_spec. - Make the test for #16271 work on systems without powershell.
| * | fix: make_filter_cmd for :! powershell #15913Enan Ajmain2022-06-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Nvim fails to create tempfile "…/nvim6UJx04/7" when 'shell' is set to pwsh (PowerShell Core). This breaks filtered shell commands ":{range}!". With shell set to cmd, it works. Solution: PowerShell doesn't use "<" for stdin redirection. Instead, use "-RedirectStandardInput". Closes #15913
| * | Merge pull request #19041 from lewis6991/globallocalbfredl2022-06-25
| |\ \ | | |/ | |/| fix(api): nvim_set_option_value for global-local options
| | * fix(api): nvim_set_option_value for global-local optionsLewis Russell2022-06-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | global-local window options need to be handled specially. When `win` is given but `scope` is not, then we want to set the local version of the option but not the global one, therefore we need to force `scope='local'`. Note this does not apply to window-local only options (e.g. 'number') Example: nvim_set_option_value('scrolloff', 10, {}) -- global-local window option; set global value nvim_set_option_value('scrolloff', 20, {win=0}) -- global-local window option; set local value nvim_set_option_value('number', true, {}) -- local window option is now equivalent to: nvim_set_option_value('scrolloff', 10, {}) nvim_set_option_value('scrolloff', 20, {win=0, scope='local'}) -- changed from before nvim_set_option_value('number', true, {win=0}) -- unchanged from before Only the global-local option with a `win` provided gets forced to local scope.
| * | fix(api): check for inclusive buffer line index out of bounds correctly (#19056)zeertzjq2022-06-23
| | |
| * | Merge pull request #19020 from echasnovski/screenchar-floatbfredl2022-06-23
| |\ \ | | | | | | | | fix(float): make `screen*()` functions respect floating windows
| | * | fix(float): make `screen*()` functions respect floating windowsEvgeni Chasnovski2022-06-23
| | | | | | | | | | | | | | | | Resolves #19013.
| * | | fix(input): use correct grid when restoring cursor for <expr> mapping (#19047)zeertzjq2022-06-23
| | | |
| * | | fix(api): check error after getting win/buf handle (#19052)Gregory Anders2022-06-22
| | | |
| * | | fix(build): only pass -municode if MINGW #19049Justin M. Keyes2022-06-22
| | |/ | |/| | | | | | | | | | Avoids this warning in the Windows build: 2022-06-22T08:58:13.0542153Z LINK : warning LNK4044: unrecognized option '/municode'; ignored [D:\a\neovim\neovim\build\test\functional\fixtures\printenv-test.vcxproj]
| * | perf(highlight): don't allocate duplicates for color namesbfredl2022-06-21
| | |
| * | Merge pull request #18743 from gpanders/bowooptvalueGregory Anders2022-06-20
| |\ \ | | | | | | | | Add "buf" and "win" to nvim_get_option_value and use them in vim.bo and vim.wo
| | * | refactor: use nvim_{get,set}_option_value for vim.{b,w}oGregory Anders2022-06-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `nvim_get_option_value` and `nvim_set_option_value` better handle unsetting local options. For instance, this is currently not possible: vim.bo.tagfunc = nil This does not work because 'tagfunc' is marked as "local to buffer" and does not have a fallback global option. However, using :setlocal *does* work as expected :setlocal tagfunc= `nvim_set_option_value` behaves more like :set and :setlocal (by design), so using these as the underlying API functions beneath vim.bo and vim.wo makes those two tables act more like :setlocal. Note that vim.o *already* uses `nvim_set_option_value` under the hood, so that vim.o behaves like :set.
| | * | feat(api): add "buf" and "win" to nvim_get_option_valueGregory Anders2022-06-20
| | | | | | | | | | | | | | | | These mirror their counterparts in nvim_set_option_value.
| * | | perf(ui): reduce allocation overhead when encoding "redraw" eventsbfredl2022-06-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note for external UIs: Nvim can now emit multiple "redraw" event batches before a final "flush" event is received. To retain existing behavior, clients should make sure to update visible state at an explicit "flush" event, not just the end of a "redraw" batch of event. * Get rid of copy_object() blizzard in the auto-generated ui_event layer * Special case "grid_line" by encoding screen state directly to msgpack events with no intermediate API events. * Get rid of the arcane notion of referring to the screen as the "shell" * Array and Dictionary are kvec_t:s, so define them as such. * Allow kvec_t:s, such as Arrays and Dictionaries, to be allocated with a predetermined size within an arena. * Eliminate redundant capacity checking when filling such kvec_t:s with values.
| * | | fix(decorations): nvim_buf_set_extmark breaks conceal #19010ii142022-06-19
| | |/ | |/| | | | | | | | | | | | | Closes #19007 Co-authored-by: bfredl <bjorn.linse@gmail.com> Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
| * | 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.
| * 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.
| * 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
| * | 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.
| * 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