aboutsummaryrefslogtreecommitdiff
path: root/test/functional/api/vim_spec.lua
Commit message (Collapse)AuthorAge
...
* API: nvim_source: fix multiline inputJustin M. Keyes2019-12-01
| | | | | | | - DOCMD_REPEAT is needed to source all lines of input. - Fix ":verbose set {option}?" by handling SID_STR in get_scriptname(). closes #8722
* API: nvim_sourceSiddhant Gupta2019-12-01
|
* Context: rename "buflist" => "bufs"Justin M. Keyes2019-09-14
| | | | | Given the other type names "jumps", "vars", etc., the name "buflist" is somewhat unintuitive.
* API: nvim_get_context: "opts" paramJustin M. Keyes2019-09-14
| | | | | Since the parameter is already non-primitive, make it an `opts` map instead of just a list, in case we want to extend it later.
* test: Eliminate expect_errJustin M. Keyes2019-09-06
| | | | Eliminate `expect_err` in favor of `pcall_err` + `eq` or `matches`.
* test: Rename meth_pcall to pcall_errJustin M. Keyes2019-09-06
| | | | | | | - Rename `meth_pcall`. - Make `pcall_err` raise an error if the function does not fail. - Add `vim.pesc()` to treat a string as literal where a Lua pattern is expected.
* test: is_os() #10933Justin M. Keyes2019-09-04
| | | | | - Move os_name() up to "global helpers". - Rename it to is_os(). - Make it depend on uname() instead of a running Nvim instance.
* shada/context: fully remove jumplist duplicates #10898Abdelhakeem Osama2019-09-03
| | | | | | | | | | | | | | | | - Always load files when cleaning up jumplist. - For Shada: avoids writing duplicate entries, which happens when you read from a shada file with duplicate entries (merging the jumplist while writing sometimes produces duplicate entries, bug?) and then write right away (i.e.: without any `:jumps`, `getjumplist()`, or any jump movement, that is: nothing that calls `cleanup_jumplist` with `loadfiles == true`). - For Context: avoids non-idempotent behavior for the same reason (i.e.: first call to `shada_encode_jumps` does not remove duplicate entries). - Do not set pcmark when dumping jumplist for Context. - Retrieving current Context shouldn't add an entry to the jumplist (which will be removed by a subsequent `cleanup_jumplist` anyway, i.e.: tail entry matching current position), just act like `getjumplist` for instance.
* tests: assert:set_parameter('TableFormatLevel', 100) #10925Daniel Hahler2019-09-03
| | | | | | luassert uses 3 by default, which is often not enough. Instead of documenting how to increase it, let's use a more fitting (sane) default of 100 levels.
* paste: one undo-block per streamJustin M. Keyes2019-09-02
| | | | | | - All "chunks" in a paste-stream should form a single undo-block. Side effect of 7a8579288424 was to create an undo-block for each chunk. - Also: remove old :redraw force logic, irrelevant after 7a8579288424.
* api: make nvim_put support "\022{NUM}" regtype as returned by getregtype()Björn Linse2019-08-31
|
* API: nvim_paste: add `crlf` parameterJustin M. Keyes2019-08-30
|
* paste: break lines at CR, CRLF #10877Justin M. Keyes2019-08-29
| | | | | | Some terminals helpfully translate \n to \r. fix #10872 ref #10223
* 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
|