aboutsummaryrefslogtreecommitdiff
path: root/test/functional/api
Commit message (Collapse)AuthorAge
...
* | Merge pull request #17467 from dundargoc/ci/remove-failing-windowsJames McCoy2022-02-25
|\ \ | | | | | | ci: remove failing windows CI tests
| * | ci: skip tests that fail on windowsDundar Göc2022-02-20
| | |
* | | feat(highlight): support for blend in nvim_set_hl (#17516)Lewis Russell2022-02-24
| | |
* | | fix(api)!: correctly handle negative line numbers for nvim_buf_set_text (#17498)Gregory Anders2022-02-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nvim_buf_set_text does not handle negative row numbers correctly: for example, nvim_buf_set_text(0, -2, 0, -1, 20, {"Hello", "world"}) should replace the 2nd to last line in the buffer with "Hello" and the first 20 characters of the last line with "world". Instead, it reports "start_row out of bounds". This happens because when negative line numbers are used, they are incremented by one additional number to make the non-negative line numbers end-exclusive. However, the line numbers for nvim_buf_set_text should be end-inclusive. In #15181 we handled this for nvim_buf_get_text by adding a new parameter to `normalize_index`. We can solve the problem with nvim_buf_set_text by simply availing ourselves of this new argument. This is a breaking change, but makes the semantics of negative line numbers much clearer and more obvious (as well as matching nvim_buf_get_text). BREAKING CHANGE: Existing usages of nvim_buf_set_text that use negative line numbers will be off-by-one.
* | | feat(api): implement nvim_buf_get_text (#15181)Gregory Anders2022-02-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nvim_buf_get_text is the mirror of nvim_buf_set_text. It differs from nvim_buf_get_lines in that it allows retrieving only portions of lines. While this can typically be done easily enough by API clients, implementing this function provides symmetry between the get/set text/lines APIs, and also provides a nice convenience that saves API clients the work of having to slice the result of nvim_buf_get_lines themselves.
* | | fix(highlight): accept NONE as a color name (#17487)Lewis Russell2022-02-21
|/ / | | | | | | | | | | | | | | ... for when `ns=0`. Also update the documentation of nvim_set_hl to clarify the set behaviour. Fixes #17478
* | Merge pull request #17430 from dundargoc/test/remove-travisJames McCoy2022-02-17
|\ \
| * | test: remove checks to see if current CI job is travis or appveyorDundar Göc2022-02-17
| | |
* | | fix(api): allow empty list for cterm in nvim_set_hlChristian Clason2022-02-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: when accessing `nvim_set_hl` from Lua, empty tables are converted to empty lists, not dictionaries, resulting in an error for :lua vim.api.nvim_set_hl(0, "Comment", { cterm = {} }) Workaround: add an empty array as a special case when checking `dict->cterm.type` and just set `cterm_mask_provided`. (Proper solution: handle this in `gen_api_dispatch.lua`.)
* | | Merge pull request #17421 from lewis6991/hl0_clearbfredl2022-02-17
|\ \ \ | |/ / |/| | fix(highlight): global ns improvements
| * | feat(highlight): support color names for ctermLewis Russell2022-02-16
| | |
| * | fix(highlight): allow globals to be clearedLewis Russell2022-02-16
| | | | | | | | | | | | | | | | | | - and reduce heap allocations Fixes #17420
* | | Merge pull request #16678 from lewis6991/runtime_file_errbfredl2022-02-16
|\ \ \ | | | | | | | | fix(api): re-route nvim_get_runtime_file errors
| * | | fix(api): re-route nvim_get_runtime_file errorsLewis Russell2022-02-15
| |/ / | | | | | | | | | This allows nvim_get_runtime_file to be properly used via pcall
* | | feat(mappings): considering map description when filtering (#17423)Shadman2022-02-16
| | |
* | | Merge pull request #17422 from shadmansaleh/enhance/mapszeertzjq2022-02-16
|\ \ \ | |/ / |/| | fix: <Nop> not shown in :map commands
| * | fix: <Nop> not shown in :map commandsshadmansaleh2022-02-16
| |/
* / fix(api): validate command names in nvim_add_user_command (#17406)Gregory Anders2022-02-15
|/ | | | This uses the same validation used when defining commands with `:command`.
* fix: autoload variables not loaded with vim.g & nvim_get_varshadmansaleh2022-02-13
|
* feat(api): add strikethrough, nocombine to set_hlChristian Clason2022-02-12
|
* fix(api): use changedir_func() in nvim_set_current_dir()zeertzjq2022-02-10
| | | | Co-Authored-By: smolck <46855713+smolck@users.noreply.github.com>
* fix(--headless): do not block on press-enter prompts when no UIglacambre2022-02-05
| | | | | | | | | | | | This commit fixes #9358, where emitting multiple messages with 'echo' or a single one with 'echom' or 'echoerr' would result in a press-enter prompt that couldn't be dismissed by pressing enter. This requires adapting a few tests to spawn a UI before testing whether press-enter prompts are blocking. It also fixes #11718, as when combined with #15910 it enables making sure that neovim never blocks and emits messages on startup.
* Merge pull request #17187 from lewis6991/masterbfredl2022-02-01
|\ | | | | feat(highlight): ns=0 to set :highlight namespace
| * feat(highlight): ns=0 to set :highlight namespaceLewis Russell2022-02-01
| | | | | | | | Passing ns=0 to nvim_set_hl will alter the `:highlight` namespace.
* | Merge pull request #17113 from zeertzjq/vim-8.2.2569zeertzjq2022-02-01
|\ \ | |/ |/| feat(statusline): support multibyte fillchar
| * feat(statusline): support multibyte fillcharzeertzjq2022-01-16
| | | | | | | | | | | | | | | | This includes a partial port of Vim patch 8.2.2569 and some changes to nvim_eval_statusline() to allow a multibyte fillchar. Literally every line of C code touched by that patch has been refactored in Nvim, and that patch contains some irrelevant foldcolumn tests I'm not sure how to port (as Nvim's foldcolumn behavior has diverged from Vim's).
* | feat(api): expose extmark right_gravity and end_right_gravitynotomo2022-01-24
| |
* | Merge pull request #17156 from zeertzjq/vim-8.2.3584bfredl2022-01-23
|\ \ | | | | | | vim-patch:8.2.{3584,3586,3587}: :command "-keepscript" argument
| * | vim-patch:8.2.3584: "verbose set efm" reports location of the :compiler commandzeertzjq2022-01-21
| |/ | | | | | | | | | | | | | | Problem: "verbose set efm" reports the location of the :compiler command. (Gary Johnson) Solution: Add the "-keepscript" argument to :command and use it when defining CompilerSet. https://github.com/vim/vim/commit/58ef8a31d7087d495ab1582be5b7a22796ac2451
* | Merge pull request #16936 from zeertzjq/no-escape-csibfredl2022-01-21
|\ \ | | | | | | input: never escape CSI bytes and clean up related names and comments
| * | refactor: remove CSI unescaping and clean up related names and commentszeertzjq2022-01-21
| |/
* / feat(api): expose extmark more detailsnotomo2022-01-20
|/
* Merge pull request #17001 from mjlbach/feat/non-strict-extmarksbfredl2022-01-15
|\ | | | | feat(extmarks): add strict option
| * Hopefully last attemptMichael Lingelbach2022-01-15
| |
| * Address review r3Michael Lingelbach2022-01-15
| |
* | fix(completion): prevent K_LUA from closing pumzeertzjq2022-01-10
|/
* feat(api): add support for lua function & description in keymapshadmansaleh2022-01-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Behavioral changes: 1. Added support for lua function in keymaps in -------------------------------------------- - nvim_set_keymap Can set lua function as keymap rhs like following: ```lua vim.api.nvim_{buf_}set_keymap('n', '<leader>lr', '', {callback = vim.lsp.buf.references}) ``` Note: lua function can only be set from lua . If api function being called from viml or over rpc this option isn't available. - nvim_{buf_}get_keymap When called from lua, lua function is returned is `callback` key . But in other cases callback contains number of the function ref. - :umap, nvim_del_keymap & nvim_buf_del_keymap clears lua keymaps correctly. - :map commands for displaing rhs . For lua keymaps rhs is displayed as <Lua function ref_no> Note: lua keymap cannot be set through viml command / functions. - mapargs() When dict is false it returns string in `<Lua function ref_no>` format (same format as :map commands). When dict is true it returns ref_no number in `callback` key. - mapcheck() returns string in `<Lua function ref_no>` format (same format as :map commands). 2. Added support for keymap description --------------------------------------- - nvim_{buf_}set_keymap: added `desc` option in opts table . ```lua vim.api.nvim_set_keymap('n', '<leader>w', '<cmd>w<cr>', {desc='Save current file'}) ``` - nvim_{buf_}get_keymap: contains `desc` in returned list. - commands like `:nmap <leader>w` will show description in a new line below rhs. - `maparg()` return dict contains `desc`.
* feat(api): implement nvim_{add,del}_user_commandGregory Anders2021-12-28
| | | | | Add support for adding and removing custom user commands with the Nvim API.
* fix: do not save K_EVENT as lastc in Insert modezeertzjq2021-12-26
| | | | I'm also gonna move some other K_EVENT-related tests to vim_spec.lua
* fix(api): make nil value in nvim_set_option_value clear local value (#16710)Gregory Anders2021-12-21
| | | | For special options such as 'undolevels' and 'scrolloff', this sets the local value to the special "unset" value (e.g. -12345 for 'undolevels').
* test: remove references to misc1.czeertzjq2021-12-11
|
* fix(api): allow nvim_buf_set_extmark to accept end_row key (#16548)Gregory Anders2021-12-08
| | | | | | | nvim_buf_get_extmark uses "end_row" rather than "end_line" in its 'details' dict, which means callers must modify the key names if they want to re-use the information. Change the parameter name in nvim_buf_set_extmark to "end_row" and use "end_line" as an alias to make this more consistent.
* feat(api): add nvim_get_option_valueGregory Anders2021-12-04
|
* test(api): mark "notify cancels stale events on channel close" fragileJames McCoy2021-11-30
| | | | | | | This is already skipped in all CI environments, so it should also be skipped in environments that don't like fragile tests. Since there's no convenient way to express these concisely, add the explicit fragile skip.
* refactor(api/marks)!: add opts param for feature extensibility (#16146)Javier Lopez2021-11-01
| | | | | In the future we might want to extend the concept of named marks and adding opts reduces the need of changing the function signature in the furute.
* test(vim_spec): fix MSVC_32 skip for nvim_parse_expression test (#16161)Sean Dewar2021-10-27
| | | | | | "works with &opt" is flaky; now it always fails after #15999 for some reason. This test was skipped in #10773 due to previous flakiness, but after the switch away from appveyor the check no longer works. Just skip for any CI running the MSVC_32 job.
* Merge pull request #14794 from BK1603/gdbserver_fixMatthieu Coudron2021-10-20
|\ | | | | functionaltest: fix running tests under gdbserver
| * test: fix running functional tests under gdbserverShreyansh Chouhan2021-09-20
| | | | | | | | | | | | | | | | | | | | | | It was not possible to run the tests under the gdbserver because we were not closing the old session before starting a new one. This caused the server to not to be able to bind to the given address and crashing the tests. This commit closes the session before starting a new one. Signed-off-by: Shreyansh Chouhan <chouhan.shreyansh2702@gmail.com>
* | feat(nvim_open_term): support input callback in luaBjörn Linse2021-10-20
| |
* | feat(api): evaluate statusline string #16020Famiu Haque2021-10-18
| | | | | | | | | | | | Adds API function `nvim_eval_statusline` to allow evaluating a statusline string and obtaining information regarding it. Closes https://github.com/neovim/neovim/issues/15849