aboutsummaryrefslogtreecommitdiff
path: root/test/functional/api
Commit message (Collapse)AuthorAge
* 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.
* 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.
* feat(nvim_create_user_command): pass structured modifiers to commandsFamiu Haque2022-05-29
| | | | | | | Adds an `smods` key to `nvim_create_user_command` Lua command callbacks, which has command modifiers but in a structured format. This removes the need to manually parse command modifiers. It also reduces friction in using `nvim_cmd` inside a Lua command callback.
* Merge pull request #18528 from lewis6991/setwinoptbfredl2022-05-25
|\ | | | | feat(api): add `win` and `buf` to `nvim_set_option_value`
| * feat(api): add win and buf to nvim_set_option_valueLewis Russell2022-05-17
| | | | | | | | Co-authored-by: Gregory Anders <8965202+gpanders@users.noreply.github.com>
* | fix(autocmds): separate command from desc (#18617)kylo2522022-05-21
| |
* | fix: make `nvim_cmd` not suppress errors inside key mappingFamiu Haque2022-05-19
| | | | | | | | Closes #18632
* | feat(api): enable nvim_exec_autocmds to pass arbitrary data (#18613)Gregory Anders2022-05-18
| | | | | | | | Add a "data" key to nvim_exec_autocmds that passes arbitrary data (API objects) to autocommand callbacks.
* | Merge pull request #18562 from famiu/feat/ui/winbarbfredl2022-05-18
|\ \ | | | | | | feat(ui): add `'winbar'`
| * | feat(ui): add `'winbar'`Famiu Haque2022-05-18
| |/ | | | | | | | | | | | | Adds support for a bar at the top of each window, enabled through the `'winbar'` option. Co-authored-by: Björn Linse <bjorn.linse@gmail.com>
* | test: unskip tests on Windows (#18600)zeertzjq2022-05-18
| | | | | | | | | | | | Remove the command('qall!') from mksession_spec.lua because it prevents helpers.rmdir() from retrying. Allow extra trailing spaces when matching terminal lines.
* | fix(terminal): do not trim whitespace that is actually in the terminal (#16423)zeertzjq2022-05-17
|/
* fix(api): nvim_eval_statusline should validate input #18347deforde2022-05-15
| | | | | Fix #18112 Make an exception for strings starting with "%!".
* refactor(ui)!: link `VertSplit` to `Normal` by defaultFamiu Haque2022-05-15
| | | | | Avoids using `gui=reverse` on `VertSplit` and makes window separators look much nicer by default.
* fix(api): make `nvim_cmd` work correctly with empty arguments list (#18527)Famiu Haque2022-05-11
| | | Closes #18526.
* feat(api): add `nvim_cmd`Famiu Haque2022-05-11
| | | | Adds the API function `nvim_cmd` which allows executing an Ex-command through a Dictionary which can have the same values as the return value of `nvim_parse_cmd()`. This makes it much easier to do things like passing arguments with a space to commands that otherwise may not allow it, or to make commands interpret certain characters literally when they otherwise would not.
* fix(api): make `nvim_parse_cmd` work correctly with both range and countFamiu Haque2022-05-07
| | | | | | | | It seems range and count can be used together in commands. This PR fixes the behavior of `nvim_parse_cmd` for those cases by removing the mutual exclusivity of "range" and "count". It also removes range line number validation for `nvim_parse_cmd` as it's not its job to validate the command.
* Merge pull request #18438 from famiu/feat/api/nvim_parse_cmdbfredl2022-05-06
|\ | | | | fix(api): make `nvim_parse_cmd` propagate errors
| * fix(api): make `nvim_parse_cmd` propagate errorsFamiu Haque2022-05-05
| | | | | | | | | | Makes `nvim_parse_cmd` propagate any errors that occur while parsing to give the user a better idea of what's wrong with the command.