aboutsummaryrefslogtreecommitdiff
path: root/test/functional/api
Commit message (Collapse)AuthorAge
* tests: fix "api nvim_get_proc_children returns child process ids" (#10296)Daniel Hahler2019-06-22
| | | | | | | | | | | | | | | | | | | | | | There might be an existing job already - maybe due to some other test, but in this case there was only one failure in the test run. ``` [----------] Running tests from C:/projects/neovim/test/functional\api\proc_spec.lua [ RUN ] api nvim_get_proc_children returns child process ids: ERR test\functional\helpers.lua:392: retry() attempts: 450 C:/projects/neovim/test/functional\api\proc_spec.lua:22: Expected objects to be the same. Passed in: (number) 2 Expected: (number) 1 stack traceback: test\functional\helpers.lua:392: in function 'retry' C:/projects/neovim/test/functional\api\proc_spec.lua:21: in function <C:/projects/neovim/test/functional\api\proc_spec.lua:17> ``` https://ci.appveyor.com/project/neovim/neovim/builds/25461215/job/8ns204v6091iy9rs?fullLog=true#L2672
* api: allow nvim_buf_attach from lua using callbacksBjörn Linse2019-06-04
|
* 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').
* test: Extend {unit,functional}.helpers with global helpersJustin M. Keyes2019-05-18
| | | | | | | | Automatically include all "global helper" util functions in the unit.helpers and functional.helpers and modules. So tests don't need to expicitly do: local global_helpers = require('test.helpers')
* API/nvim_set_keymap: remove mode-shortname aliasesJustin M. Keyes2019-05-12
| | | | | Reduce the API surface-area a bit. No need to have aliases for a mode. ref #9924
* API/nvim_set_keymap: minor cleanupJustin M. Keyes2019-05-12
| | | | ref #9924
* API: nvim_set_keymap, nvim_del_keymap #9924Yilin Yang2019-05-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | closes #9136 - Treat empty {rhs} like <Nop> - getchar.c: Pull "repl. MapArg termcodes" into func The "preprocessing code" surrounding the replace_termcodes calls needs to invoke replace_termcodes, and also check if RHS is equal to "<Nop>". To reduce code duplication, factor this out into a helper function. Also add an rhs_is_noop flag to MapArguments; buf_do_map_explicit expects an empty {rhs} string for "<Nop>", but also needs to distinguish that from something like ":map lhs<cr>" where no {rhs} was provided. - getchar.c: Use allocated buffer for rhs in MapArgs Since the MAXMAPLEN limit does not apply to the RHS of a mapping (or else an RHS that calls a really long autoload function from a plugin would be incorrectly rejected as being too long), use an allocated buffer for RHS rather than a static buffer of length MAXMAPLEN + 1. - Mappings LHS and RHS can contain literal space characters, newlines, etc. - getchar.c: replace_termcodes in str_to_mapargs It makes sense to do this; str_to_mapargs is, intuitively, supposed to take a "raw" command string and parse it into a totally "do_map-ready" struct. - api/vim.c: Update lhs, rhs len after replace_termcodes Fixes a bug in which replace_termcodes changes the length of lhs or rhs, but the later search through the mappings/abbreviations hashtables still uses the old length value. This would cause the search to fail erroneously and throw 'E31: No such mapping' errors or 'E24: No such abbreviation' errors. - getchar: Create new map_arguments struct So that a string of map arguments can be parsed into a more useful, more portable data structure. - getchar.c: Add buf_do_map function Exactly the same as the old do_map, but replace the hardcoded references to the global `buf_T* curbuf` with a function parameter so that we can invoke it from nvim_buf_set_keymap. - Remove gettext calls in do_map error handling
* 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: fix cursor position when lines are added #9961hashinclude2019-05-07
| | | | Restore code removed in #9674.
* 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
* CI/AppVeyor: per-compiler deps cache #9852Justin M. Keyes2019-04-07
| | | | The deps cache does not work for MSVC builds because the MINGW builds ovewrite it. Cache saves 10+ minutes on the build.
* aucmd_prepbuf: also restore `prevwin` #9741Justin M. Keyes2019-03-17
| | | | | | | | | | | | | | | bisected to f5d5da391715 Other test steps: nvim -u NORC :terminal tree / " Produces lots of output :edit somefile.txt :vsplit :vsplit <c-w>l <c-w>l <c-w>h <c-w>p
* buffer: use aucmd_prepbuf() instead of switch_to_win_for_buf()Björn Linse2019-03-05
|
* api: add nvim_win_close() to close window by idBjörn Linse2019-03-03
|
* API/buffer-updates: always detach on buf-reload #9643KillTheMule2019-03-01
| | | | | | Independently of the 'undoreload' option and the length of the file. closes #9642 closes #9643
* 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
* test/api: verify that UI options from stable metadata are preservedBjörn Linse2018-12-21
|
* 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 nvim_win_set_buf() #9100Justin M. Keyes2018-11-25
| | | | closes #9100
* 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.
* api: simplify nvim_buf_get_offset functionBjörn Linse2018-11-01
|
* api: implement nvim_buf_get_offset_for_lineBjörn Linse2018-11-01
| | | | | Like line2byte, but works for any buffer, and uses zero-based indexing (API conventions).
* functionaltest: enable job channel testJan Edmund Lazo2018-10-31
|
* functionaltest: win: enable diffput,diffget testJan Edmund Lazo2018-10-31
|
* api/ui: verify compatibility of UI eventsBjörn Linse2018-10-21
|
* tests: improve robustness of immediate successes in screen testsBjörn Linse2018-10-15
|
* ui: rename ext_newgrid to ext_linegridBjörn Linse2018-10-01
|
* startup: always wait for UI with --embed, unless --headless also is suppliedBjörn Linse2018-09-22
|
* 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.
* API: nvim_unsubscribe(): Handle unknown events #8745Daniel Hahler2018-08-28
| | | | close #8745
* functests: tests related to operations on unloaded buffers #7688Peter Hodge2018-07-25
|
* 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.
* tests: <SNR> is represented as 'R' (ASCII)Jan Edmund Lazo2018-07-12
|
* test: nvim_buf_attach: reduce delayJustin M. Keyes2018-07-02
| | | | | | This test is mostly a demo/reference for: https://github.com/neovim/neovim/issues/8634#issuecomment-400940467 so let's not pay a 1s penalty.
* test: nvim_buf_attach response after initial delayJustin M. Keyes2018-07-01
| | | | ref #8634
* test: buffer_updates: 10s timeoutJustin M. Keyes2018-07-01
|
* API: emit nvim_buf_lines_event from :terminal #8616KillTheMule2018-07-01
| | | | closes #8575
* API: nvim_win_set_cursor: set curswant #8613David Hotham2018-06-25
| | | Fixes #8591
* Merge #7917 'API: buffer updates'Justin M. Keyes2018-06-08
|\