aboutsummaryrefslogtreecommitdiff
path: root/test/functional/api/buffer_spec.lua
Commit message (Collapse)AuthorAge
...
* 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.
* API: nvim_buf_set_lines: handle 'nomodifiable' #10910Justin M. Keyes2019-09-01
|
* API: fix cursor position when lines are added #9961hashinclude2019-05-07
| | | | Restore code removed in #9674.
* 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: 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).
* 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.
* functests: tests related to operations on unloaded buffers #7688Peter Hodge2018-07-25
|
* Merge branch 'master' into luaviml'/luaZyX2017-05-08
|\
| * api: Do not translate error messages.Justin M. Keyes2017-04-24
| | | | | | | | | | | | | | | | | | | | Also re-word some error messages: - "Key does not exist: %s" - "Invalid channel: %<PRIu64>" - "Request array size must be 4 (request) or 3 (notification)" - "String cannot contain newlines" References #6150
* | functests: Test for “string cannot contain newline” set_lines errorZyX2017-04-11
|/ | | | Should make me able to determine whether they are lua bindings that contain a bug or set_lines.
* functests: Replace execute with either command or feed_commandZyX2017-04-09
| | | | | | | | | | Hope this will make people using feed_command less likely: this hides bugs. Already found at least two: 1. msgpackparse() will show internal error: hash_add() in case of duplicate keys, though it will still work correctly. Currently silenced. 2. ttimeoutlen was spelled incorrectly, resulting in option not being set when expected. Test was still functioning somehow though. Currently fixed.
* api: nvim_buf_set_lines(): Avoid invalid ml_get. #6019Matthew Malcomson2017-03-07
| | | | | | | | | | When the buffer that nvim_buf_set_lines() is changing is not in any vim window, fix_cursor() leads to calling ml_get_buf() with an invalid line number. The condition that fix_cursor() was called on was (buf == curbuf), but this is always true because of the call to switch_to_win_for_buf() earlier in the function. Instead this should be predicated on (save_curbuf.br_buf == NULL)
* *: Fix linter errorsZyX2017-02-23
|
* api: Make sure dict_set_var doesn’t edit read-only valuesZyX2017-02-23
| | | Fixes #6147
* buffer: Bind b:changedtick to b:['changedtick'], remove special casesZyX2017-02-23
|
* api/buffer: Add nvim_buf_get_changedtick methodZyX2017-02-23
|
* test/api: Specify handling of VimL errors, v:errmsg.Justin M. Keyes2016-10-24
| | | | TODO: Also spec behavior of Press-Enter prompt for these API functions.
* api: Establish API naming convention. (#5344)Justin M. Keyes2016-09-17
| | | | | | | | | | | | | | | | | | | | | old name: new name: -------------------------------------------------- nvim_name_to_color nvim_get_color_by_name nvim_get_current_buffer nvim_get_current_buf nvim_get_current_window nvim_get_current_win nvim_get_buffers nvim_list_bufs nvim_get_tabpages nvim_list_tabpages nvim_get_windows nvim_list_wins nvim_set_current_buffer nvim_set_current_buf nvim_set_current_window nvim_set_current_win nvim_change_directory nvim_set_current_dir nvim_tabpage_get_window nvim_tabpage_get_win nvim_tabpage_get_windows nvim_tabpage_list_wins nvim_win_get_buffer nvim_win_get_buf nvim_report_error nvim_err_writeln Helped-by: Björn Linse <bjorn.linse@gmail.com> Helped-by: ZyX <kp-pav@yandex.ru> Helped-by: James McCoy <jamessan@jamessan.com>
* api: make nvim[_obj]_set_var and _del_var not return the old valueBjörn Linse2016-09-15
|
* api: consistently use nvim_ prefix and update documentationBjörn Linse2016-08-31
|
* functests: Check logs in lua codeZyX2016-06-10
| | | | | | It is otherwise impossible to determine which test failed sanitizer/valgrind check. test/functional/helpers.lua module return was changed so that tests which do not provide after_each function to get new check will automatically fail.
* api: Replace set_var(name, NIL) with del_var(name)ZyX2016-04-18
|
* api/buffer: add tests for buffer_[gs]et_linesBjörn Linse2016-04-01
|
* api/buffer: introduce buffer_[gs]et_lines with new indexing convention.Björn Linse2016-04-01
| | | | | | | -1 is index past the end, and -2 is the index of the last element. This eliminates the need for include_start/include_end. Allow the handling of out-of-bounds to be configurable.
* test: buffer_spec: fix set_line invocationJustin M. Keyes2015-07-11
| | | | | - pcall result was always false because of wrong arity - also re-arrange tests into it() blocks
* test: api: exercise out-of-bounds line slicingNick Hynes2015-07-11
|
* api: Handle NULs and newlines in buffer_*_line.Scott Prager2014-12-06
|
* test: Use lua to perform sanity API checksThiago de Arruda2014-10-16
Sanity API checks made by the python-client in the api-python travis target were converted to lua and will now live in this repository. This will simplify performing breaking changes to the API as it won't be necessary to send parallel PRs the python-client.