aboutsummaryrefslogtreecommitdiff
path: root/test/functional/api/vim_spec.lua
Commit message (Collapse)AuthorAge
...
* API: TRY_WRAP() for "abort-causing non-exception errors"Justin M. Keyes2019-08-28
| | | | | | | | - Introduce TRY_WRAP() until we have an *architectural* solution. - TODO: bfredl idea: prepare error-handling at "top level" (nv_event). - nvim_paste(): Revert luaeval() hack (see parent commit). - With TRY_WRAP() in nvim_put(), 'nomodifiable' error now correctly "bubbles up".
* paste: handle 'nomodifiable'Justin M. Keyes2019-08-27
| | | | | | | | - nvim_paste(): Marshal through luaeval() instead of nvim_execute_lua() because the latter seems to hide some errors. - Handle 'nomodifiable' in `nvim_put()` explicitly. - Require explicit `false` from `vim.paste()` in order to "cancel", otherwise assume true ("continue").
* paste: make vim.paste() "public"Justin M. Keyes2019-08-27
|
* paste: handle vim.paste() failureJustin M. Keyes2019-08-27
| | | | | | | | - Show error only once per "paste stream". - Drain remaining chunks until phase=3. - Lay groundwork for "cancel". - Constrain semantics of "cancel" to mean "client must stop"; it is unrelated to presence of error(s).
* API: nvim_pasteJustin M. Keyes2019-08-27
|
* API: nvim_put: "follow" parameterJustin M. Keyes2019-08-27
|
* API: nvim_put: always PUT_CURSENDJustin M. Keyes2019-08-27
| | | | | | | | | Fixes strange behavior where sometimes the buffer contents of a series of paste chunks (vim._paste) would be out-of-order. Now the tui_spec.lua screen-tests are much more reliable. But they still sometimes fail because of off-by-one cursor (caused by "typeahead race" resulting in wrong mode; fixed later in this patch-series).
* API: nvim_put #6819Justin M. Keyes2019-08-27
|
* teardown: fix win_free_all() heap-use-after-free #10839Abdelhakeem Osama2019-08-25
| | | Fixes #10838
* API: fix nvim_command_output buffer overflow (#10830)Abdelhakeem Osama2019-08-22
| | | Fixes https://github.com/neovim/neovim/issues/10829.
* tests: skip "API nvim_parse_expression" on MSVC_32 (#10773)Daniel Hahler2019-08-14
| | | | | | Only "API nvim_parse_expression works with &opt" is flaky, but easier to skip all of "API nvim_parse_expression". Ref: https://github.com/neovim/neovim/issues/10241
* API: ContextAbdelhakeem2019-07-27
|
* api/lua: make nvim_execute_lua use native lua floats, not special tablesBjörn Linse2019-07-01
| | | | | | | | | | Rationale: the purpose of nvim_execute_lua is to simply call lua code with lua values. If a lua function expects a floating point value, it should be enough to specify a float as argument to nvim_execute_lua. However, make sure to preserve the existing roundtripping behavior of API values when using `vim.api` functions. This is covered by existing lua/api_spec.lua tests.
* api/buffer: create new buffers in the "opened" stateBjörn Linse2019-06-03
| | | | | | | Otherwise vim will think that ml_append() needs to "enter" the buffer, which emits unexpected autocommands. ref https://github.com/vim-airline/vim-airline/issues/1930
* messages: use proper multiline error message for rpcrequest and API wrappersBjörn Linse2019-05-26
|
* test: remove use of require('test.helpers')Justin M. Keyes2019-05-18
| | | | | | The test.functional.helpers and test.unit.helpers modules now include all of the public functions from test.helpers, so there is no need to separately require('test.helpers').
* UI/nvim_ui_attach(): add `override` optionJustin M. Keyes2019-05-09
| | | | | | | | | | | | | | | | | | | | Before now, Nvim always degrades UI capabilities to the lowest-common denominator. For example, if any connected UI has `ext_messages=false` then `ext_messages=true` requested by any other connected UI is ignored. Now `nvim_ui_attach()` supports `override=true`, which flips the behavior: if any UI requests an `ext_*` UI capability then the capability is enabled (and the legacy behavior is disabled). Legacy UIs will be broken while a `override=true` UI is connected, but it's useful for debugging: you can type into the TUI and observe the UI events from another connected (UI) client. And the legacy UI will "recover" after the `override=true` UI disconnects. Example using pynvim: >>> n.ui_attach(2048, 2048, rgb=True, override=True, ext_multigrid=True, ext_messages=True, ext_popupmenu=True) >>> while True: n.next_message();
* API: emit nvim_error_event on failed async requestJustin M. Keyes2019-04-13
| | | | | We already do this for _invalid_ async requests #9300. Now we also do it for failed invocation of valid requests.
* event-loop: do not set CA_COMMAND_BUSY #9853Justin M. Keyes2019-04-08
| | | | | | | | CA_COMMAND_BUSY in nv_event() was carried over from Vim nv_cursorhold() (ref: e5165bae1139). It prevents :startinsert from working during a RPC call, so remove it. Helped-by: glacambre <me@r4> closes #7254
* buffer: use aucmd_prepbuf() instead of switch_to_win_for_buf()Björn Linse2019-03-05
|
* API: nvim_create_buf: add `scratch` parameterJustin M. Keyes2019-02-17
| | | | | Creating a scratch buffer is a chore/ritual, and would be more useful/common if formally exposed.
* ui: implement ext_messagesBjörn Linse2019-02-10
| | | | Co-Author: Dongdong Zhou <dzhou121@gmail.com>
* api: add nvim_create_buf to create a new empty buffer.Björn Linse2019-02-09
| | | | | | | | | | | | Loading existing files into a buffer is non-trivial and requires a window. Creating an unnamed emtpy buffer is trivial and safe though, thus worth a special case. Change nvim_buf_set_option to use aucmd_prepbuf. This is necessary to allow some options to be set on a not yet displayed buffer, such as 'buftype' option. vim-patch:7.4.1858: Add BLN_NEW to enforce buflist_new creating new buffer
* UI: always use contrete colors for default_colors_setBjörn Linse2019-02-05
| | | | | But add an escape hatch needed for external TUI, so it still can use terminal emulator defaults.
* tests/lua: test for multiline error messages in luaBjörn Linse2019-01-23
|
* test/API: nvim_set_vvar() #9395Justin M. Keyes2019-01-14
|
* multigrid: add multigrid support to test infrastructureBjörn Linse2018-12-31
| | | | make Screen explicitly tied to its session
* RPC: turn errors from async calls into notificationsBjörn Linse2018-12-03
| | | | | Previously, nvim sent a response with invalid request id (UINT64_MAX). In functionaltests, catch unexpected error notifications in after_each().
* docJustin M. Keyes2018-11-28
| | | | | | | | | | - develop.txt is for design/guidelines; architecture/concepts should live elsewhere (currently src/nvim/README.md) - move dev-jargon to intro.txt - replace https://neovim.io/community (deprecated) with https://neovim.io/#chat - <Cmd> avoids CmdlineEnter/Leave https://github.com/vim/vim/issues/2889
* api: implement object namespacesBjörn Linse2018-11-24
| | | | | | | | | Namespaces is a lightweight concept that should be used to group objects for purposes of bulk operations and introspection. This is initially used for highlights and virtual text in buffers, and is planned to also be used for extended marks. There is no plan use them for privileges or isolation, neither to introduce nanespace-level options.
* functionaltest: enable job channel testJan Edmund Lazo2018-10-31
|
* ui: rename ext_newgrid to ext_linegridBjörn Linse2018-10-01
|
* test: API validation: assert exact stringJustin M. Keyes2018-09-05
| | | | | | | expect_err() matches against a pattern. Terminate the pattern with "$" to check against buffer overrun. ref #8931
* API: Avoid overrun when formatting error-messageJustin M. Keyes2018-09-05
| | | | | | | msgpack_rpc_to_object (called by handle_request .. msgpack_rpc_to_array) always NUL-terminates API Strings. But handle_request .. msgpack_rpc_get_handler_for operates on a raw msgpack_object, before preparation.
* ui: use line-based rather than char-based updates in screen.cBjörn Linse2018-07-21
| | | | | | | | | | | | | Add ext_newgrid and ext_hlstate extensions. These use predefined highlights and line-segment based updates, for efficiency and simplicity.. The ext_hlstate extension in addition allows semantic identification of builtin and syntax highlights. Reimplement the old char-based updates in the remote UI layer, for compatibility. For the moment, this is still the default. The bulitin TUI uses the new line-based protocol. cmdline uses curwin cursor position when ext_cmdline is active.
* API: validation: mention invalid method name (#8489)Justin M. Keyes2018-06-07
|
* nvim_list_uis: include channel idBjörn Linse2018-06-01
|
* api: list information about all channels/jobs.Björn Linse2018-05-23
| | | | | Fire autocmd when channel opens or its info changes. Add a way for API clients can describe themselves.
* Merge #8329 'API: Make nvim_set_option() update `:verbose set …`'Justin M. Keyes2018-05-11
|\
| * api: Make nvim_set_option() update `:verbose set ...`b-r-o-c-k2018-05-03
| | | | | | | | | | | | Make `:verbose set ...` show when an option was last modified by an API client or Lua script/chunk. In the case of an API client, the channel ID is displayed.
* | API: nvim_eval(): return non-generic VimL errorsJustin M. Keyes2018-05-09
| | | | | | | | Use the same pattern as nvim_call_function (_call_function).
* | API: return non-generic VimL errorsJustin M. Keyes2018-05-09
| | | | | | | | | | | | | | | | | | | | - Return VimL errors instead of generic errors for: - nvim_call_function - nvim_call_dict_function - Fix tests which were silently broken before this change. This violates #6150 where we agreed not to translate API errors. But that can be fixed later.
* | API: nvim_call_dict_function: expect actual function, not nameJustin M. Keyes2018-05-06
| |
* | API: nvim_call_dict_function: eliminate `internal` paramJustin M. Keyes2018-05-06
| | | | | | | | | | | | The `internal` param is difficult to explain, and will rarely be anything but `true`. To avoid it, use a hack: check if the resolved dict value starts with "function(".
* | refactor: nvim_call_dict_functionJustin M. Keyes2018-05-06
| | | | | | | | | | - Add test coverage for errors. - Rename, rearrange.
* | API: nvim_call_dict_function #3032Sebastian Witte2018-05-06
| |
* | test: nvim_call_function: verify "too many arguments" errorJustin M. Keyes2018-05-06
|/
* API/nvim_command_output: handle :echon capture (#8265)Justin M. Keyes2018-04-13
| | | ref https://github.com/neovim/python-client/pull/290
* msg: do not scroll entire screen (#8088)Björn Linse2018-03-31
|
* api: nvim_list_uis #8004geekodour2018-03-03
| | | | | ref #7438 closes #4842