aboutsummaryrefslogtreecommitdiff
path: root/test/functional/api
Commit message (Collapse)AuthorAge
* docs: various #12823Justin M. Keyes2022-10-09
| | | | | | | | | | | | - increase python line-length limit from 88 => 100. - gen_help_html: fix bug in "tag" case (tbl_count => tbl_contains) ref #15632 fix #18215 fix #18479 fix #20527 fix #20532 Co-authored-by: Ben Weedon <ben@weedon.email>
* fix(api): dynamically allocate line buffer for nvim_out_write (#20537)zeertzjq2022-10-08
|
* test(api): migrate screenchar() test in in window API to screen testbfredl2022-10-05
| | | | This produces actual output in case of regressions.
* Merge pull request #20364 from zeertzjq/parse-cmd-omitbfredl2022-09-30
|\ | | | | fix(api)!: nvim_parse_cmd omit "count" "range" "reg" if not supported
| * fix(api)!: nvim_parse_cmd omit "count" "range" "reg" if not supportedzeertzjq2022-09-30
| |
* | docs: fix typos (#20394)dundargoc2022-09-30
| | | | | | | | | | Co-authored-by: Raphael <glephunter@gmail.com> Co-authored-by: smjonas <jonas.strittmatter@gmx.de> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* | feat(nvim_cmd): allow using first argument as countFamiu Haque2022-09-29
|/ | | | | Allows `nvim_cmd` to use the first argument as count for applicable commands. Also adds support for non-String arguments to `nvim_cmd`.
* fix(api): fix nvim_cmd crash with filename expansion (#20397)zeertzjq2022-09-29
|
* fix(lua): fix architecture-dependent behavior in usercmd "reg" (#20384)zeertzjq2022-09-28
| | | | | | | | I don't think using an integer as a NUL-terminated string can work on big-endian systems, at least. This is also not tested. Add a test. Also fix a mistake in the docs of nvim_parse_cmd.
* ci: move BSD jobs from sourcehut to Cirrus CI #19616dundargoc2022-09-08
| | | | | | | | | | | | | | | | | | | dispatch.sr.ht is being deprecated, meaning that using sourcehut CI won't be possible (see https://github.com/neovim/neovim/issues/19609). Since Github Actions doesn't provide any BSD runners an external service is required and Cirrus CI seems like a good replacement for sourcehut. Initially experimented with using FreeBSD and OpenBSD virtual machines in GitHub Actions, but Cirrus has been a much better fit with better performance, logs and overall experience. Failing tests are automatically skipped on FreeBSD regardless if it's on CI or not. Ideally these tests should only be skipped in CI with the help of `isCI` helper function. Unfortunately, the tests don't recognize the environment variable CIRRUS_CI even if it's set manually. This workaround is good enough for the time being, but we might want to only skip tests when using the CI (or even better, fix the failing tests). Closes: https://github.com/neovim/neovim/issues/19609
* fix(options): mark `winhighlight` as list style (#19477)ii142022-09-07
| | | | | Also add missing fcs, lcs and winhighlight to list of key-value options for `vim.opt`. Co-authored-by: ii14 <ii14@users.noreply.github.com>
* fix(api)!: correctly deal with number before :tabzeertzjq2022-09-02
| | | | | | Now nvim_parse_cmd and nvim_create_user_command use a "tab" value which is the same as the number passed before :tab modifier instead of the number plus 1, and "tab" value is -1 if :tab modifier is not used.
* feat(api): add support for :horizontal modifierzeertzjq2022-09-01
|
* refactor(mappings)!: mapblock_fill_dict() use API Dictionary (#20020)zeertzjq2022-08-31
| | | | | | | | | | | This introduces the following breaking changes: - nvim_get_keymap now always returns a LuaRef object as "callback" for a Lua mapping regardless of how it is called. The LuaRef object can be called from Lua and Vim script, but is lost over RPC. - maparg() now returns a Funcref instead of a ref number as "callback" for a Lua mapping. The Funcref can be called from Lua and Vim script, but is lost over RPC. This may also make nvim_get_keymap faster, but make maparg() slower.
* fix(api): nvim_set_hl bail out on invalid group name (#20021)zeertzjq2022-08-31
|
* fix(usercmd): also check for whitespace after escaped character (#19942)zeertzjq2022-08-25
|
* fix(api): avoid side effects with nvim_parse_cmd (#19890)zeertzjq2022-08-22
| | | | Save and restore the cursor and last search pattern and do not change search history.
* fix(api/command): fargs behavior when no arguments are passed (#19862)Javier Lopez2022-08-21
| | | | | | | Problem: A command defined with `nargs="?"` returns `fargs={""}` to a Lua callback when executed with no arguments, which is inconsistent with how`nargs="*"` behaves. Solution: Pass `fargs={}` for no argument with `nargs="?"` as well.
* feat(ui): allow to set the highlight namespace per windowbfredl2022-08-17
| | | | | - reimplement 'winhl' in terms of highlight namespaces - check for EOF in screen tests (to indicate a likely crash)
* fix(api): nvim_exec and nvim_cmd restore msg_col when capturing output (#19789)zeertzjq2022-08-16
| | | | This matches the code in execute_common(), preventing messages after the API call from being printed at the wrong column.
* fix(api): `vim.cmd.make` crashes when argument count isn't 1 (#19701)Famiu Haque2022-08-10
| | | Closes #19696
* fix(api): nvim_cmd handle 0 range (#19655)Lewis Russell2022-08-06
| | | Fixes #19608
* fix(api): fix nvim_buf_set_text heap-use-after-free (#19644)zeertzjq2022-08-06
| | | | The line returned but ml_get_buf() may be freed by another call to ml_get_buf(), so it is necessary to make a copy.
* feat(lua): print source locations of lua callbacks (#19597)ii142022-08-03
| | | Co-authored-by: ii14 <ii14@users.noreply.github.com>
* test: improve mapping tests and docs (#19619)zeertzjq2022-08-02
|
* test: fix api/keymap_spec.lua testszeertzjq2022-08-01
|
* feat(api): add replace_keycodes to nvim_set_keymap (#19598)ii142022-08-01
|
* fix(highlight): add missing 'nocombine' to nvim_get_hl_* apis (#19586)Munif Tanjim2022-07-31
|
* fix(api): make nvim_cmd mods.silent work correctly (#19489)notomo2022-07-25
|
* fix(api): fix nvim_parse_cmd interfere with printing line in Ex mode (#19400)zeertzjq2022-07-17
|
* fix(api): do not switch win/buf if getting option in current win/buf (#19383)zeertzjq2022-07-16
|
* feat(api): add `unsilent` to command APIszeertzjq2022-07-03
|
* vim-patch:8.0.1570: can't use :popup for a menu in the terminalzeertzjq2022-07-01
| | | | | | | Problem: Can't use :popup for a menu in the terminal. (Wei Zhang) Solution: Make :popup work in the terminal. Also fix that entries were included that don't work in the current state. https://github.com/vim/vim/commit/29a2c08d792e4458a0af8371f5341394829fce29
* feat: stdpath('run'), /tmp/nvim.user/ #18993Justin M. Keyes2022-06-30
| | | | | | | | | | | | | | | | Problem: - Since c57f6b28d71d #8519, sockets are created in ~/.local/… but XDG spec says: "XDG_RUNTIME_DIR: Must be on the local filesystem", which implies that XDG_STATE_DIR is potentially non-local. - Not easy to inspect Nvim-created temp files (for debugging etc). Solution: - Store sockets in stdpath('run') ($XDG_RUNTIME_DIR). - Establish "/tmp/nvim.user/" as the tempdir root shared by all Nvims. - Make ok() actually useful. - Introduce assert_nolog(). closes #3517 closes #17093
* refactor(highlight)!: rename attributes to match Vim (#19159)zeertzjq2022-06-30
| | | | | | | | | Ref: https://github.com/vim/vim/commit/84f546363068e4ddfe14a8a2a2322bb8d3a25417 Rename: - `underlineline` to `underdouble` - `underdot` to `underdotted` - `underdash` to `underdashed` `underdouble` also now takes higher precedence than `undercurl`.
* feat(api): make `nvim_parse_cmd` and `nvim_cmd` support :filterFamiu Haque2022-06-28
| | | | | | Also fixes a memory leak in `parse_cmdline`. Closes #18954.
* fix(api): nvim_parse_cmd check for ambiguous user command (#19116)zeertzjq2022-06-27
|
* feat(api): support pattern array for exec_autocmdsChristian Clason2022-06-26
|
* fix(api): check for inclusive buffer line index out of bounds correctly (#19056)zeertzjq2022-06-23
|
* perf(highlight): don't allocate duplicates for color namesbfredl2022-06-21
|
* feat(api): add "buf" and "win" to nvim_get_option_valueGregory Anders2022-06-20
| | | | These mirror their counterparts in nvim_set_option_value.
* 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.
* 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(tests): missing clear() #18927kylo2522022-06-13
| | | This was caught in #18674 since it allows test isolation
* fix(tests): check for EOF on exit of nvim properlybfredl2022-06-13
|
* feat(autocmds): retrieve lua callback (#18642)kylo2522022-06-09
| | | add a new `callback` field to `nvim_get_autocmds`
* fix(nvim_create_user_command): make `smods` work with `nvim_cmd`Famiu Haque2022-06-08
| | | | Closes #18876.
* 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>
* fix(hl): set Normal hl group sg_attr value #18820Oliver Marriott2022-06-03
| | | fix #18024
* 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.