aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
...
* | Merge pull request #15502 from seandewar/vim-8.1.1921Jan Edmund Lazo2021-10-10
|\ \ | | | | | | Add method call support for more built-ins: vim-patch:8.1.{1336,1952,1961,1984}
| * | feat(eval/method): partially port v8.1.1954Sean Dewar2021-10-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Does not include listener_*() functions. js_*() functions are N/A. json_encode() and json_decode() didn't include tests; add some anyway (to json_functions_spec.lua). test_lua.vim isn't included yet, so add tests to luaeval_spec.lua.
| * | feat(eval/method): partially port v8.1.1953Sean Dewar2021-10-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds method call support for all functions in the patch, but it cannot be fully ported due to missing tests for: - index(): requires Blobs from v8.1.0735. Note that index() was already added as a method in v8.1.1803; this patch only adds a test. - iconv(): requires v8.1.1136 for test_termcodes.vim. Nvim deprecated inputdialog(), so it no longer has an eval.txt entry. Keep the test for hlexists() commented-out, just like previously. (Nvim always defines the Number group, so it always returns 1 instead) Cannot include both changes to test_syn_attr.vim as Nvim doesn't support ":hi term=..."; however, both test the same ->hlID() syntax anyway.
| * | feat(eval/method): partially port v8.1.1925Sean Dewar2021-10-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds method call support for all functions in the patch, but it cannot be fully ported due to missing tests for: - getcwd(): requires chdir() and Test_chdir_func() from v8.1.1291. Note that the method call tests for getreg() and getregtype() were removed in v8.2.1547, which has already been ported, but doesn't seem to have been replaced with a new test... This patch also makes getchangelist()'s argument optional (defaults to the current buffer). eval.txt includes a typo for gettabwinvar(), which is fixed in v8.1.1952.
| * | feat(eval/method): partially port v8.1.1921Sean Dewar2021-10-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds method call support for all functions in the patch, but it cannot be fully ported due to missing tests for: - filereadable(): requires v8.1.1378 for Test_delete_rf(), but there appears to have been some trouble porting it. (#12784) - confirm(): requires v8.1.0832 for Test_confirm() and v8.1.0815 for feedkeys()'s "L" flag. (I did attempt to port the test using nvim_input() instead, but seems that input handling for confirm() doesn't work in --headless mode?) Note that confirm() was actually added as a method in v8.1.1915. Uncomment use of method call syntax in Test_Executable() previously included instead from v8.2.2259.
| * | vim-patch:8.1.1336: some eval functionality is not covered by testsSean Dewar2021-10-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Some eval functionality is not covered by tests. Solution: Add a few more test cases. (Masato Nishihata, closes vim/vim#4374) https://github.com/vim/vim/commit/17aca707f92235b6f962e637e8073162d18e6de2 Test_expand() changes are required for v8.1.1921. Test_call() and Test_cindent_func() are already ported.
* | | vim-patch:8.2.3461: distinguish Normal and Terminal-Normal mode #15878zeertzjq2021-10-09
| | | | | | | | | | | | | | | Problem: Cannot distinguish Normal and Terminal-Normal mode. Solution: Make mode() return "nt" for Terminal-Normal mode. (issue vim/vim#8856) https://github.com/vim/vim/commit/72406a4bd2896915b6f541e26d41521a59b1f846
* | | fix(lsp): update tests using 0.5.0 handler calls (#15969)Michael Lingelbach2021-10-08
| | | | | | | | | Fixes test regression introduced in https://github.com/neovim/neovim/pull/15262
* | | fix(lsp): expose ContentModified error code to callbacks (#15262)Rishikesh Vaishnav2021-10-08
| | |
* | | fix(buffer_updates): handle :sort of already sorted bufferBjörn Linse2021-10-08
| | |
* | | fix(api): check type in nlua_pop_keydict (#15940)virchau132021-10-08
| | |
* | | fix: support severity_sort option for show_diagnostic functions (#15948)Gregory Anders2021-10-07
| | | | | | | | | Support the severity_sort option for show_{line,position}_diagnostics.
* | | fix(buffer_updates): cleanup test behaviorBjörn Linse2021-10-07
| | |
* | | fix(buffer_updates): make `lockmarks` not affect extmarks and buffer ↵Anton Adamansky2021-10-07
| | | | | | | | | | | | | | | | | | updates. fixes #12861 Now mark_adjust() will trigger appropriate buf_updates_send_splice() called by extmark_adjust()
* | | fix(buffer_updates): handle :delete of the very last line in bufferBjörn Linse2021-10-07
| | |
* | | fix: set cursorlineopt=number in terminal mode (#15493)Yorick Peterse2021-10-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When entering terminal mode, cursorlineopt is no longer entirely disabled. Instead, it's set to `number`. Doing so ensures that users using `set cursorline` combined with `set cursorlineopt=number` have consistent highlighting of the line numbers, instead of this being disabled when entering terminal mode. Co-authored-by: Gregory Anders <greg@gpanders.com> Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com>
* | | fix(extmarks): splice extmarks on nv_Undo #15920Tony Chen2021-10-06
| | |
* | | fix(checkhealth): mitigate issues with duplicate healthchecks #15919Javier Lopez2021-10-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fix(runtime/health): mitigate issues with duplicate healthchecks Previously if a healthcheck was found as Lua and Vim it was executed both times. This new implementations prefers Lua, therefore if two are found It only runs the Lua one, this way a plugin can mantain both implementations the Lua one with the method `check()` and the autoload function `#check()` (for none HEAD nvim versions). **Note: This will require plugins to use `check()` as the function name, since the autoload function that wraps the lua implementation won't be called** * docs(health): use spaces and don't overuse backtics followup to #15259
* | | feat(api): named marks set, get, delete #15346Javier Lopez2021-10-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds the following API functions. - nvim_buf_set_mark(buf, name, line, col) * Set marks in a buffer. - nvim_buf_del_mark(buf, name) * Delete a mark that belongs to buffer. - nvim_del_mark(name) * Delete a global mark. - nvim_get_mark(name) * Get a global mark. Tests: - Adds test to all the new api functions, and adds more for the existing nvim_buf_get_mark. * Tests include failure cases. Documentation: - Adds documentation for all the new functions, and improves the existing fucntion docs.
* | | Merge pull request #15259 from muniter/muniter/checkhealth-from-luaMatthieu Coudron2021-10-05
|\ \ \ | | | | | | | | feat(checkhealth): support Lua healthchecks
| * | | feat(ex_checkhealth): provide function for command line completionJavier López2021-10-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move away from providing completion with ExpandRTDir to ExpandGeneric providing the function get_healthcheck_name which caches the results for the current command line prompt. It does the almost the same thing the Vim function 'get_healthcheck' implemented in 'runtime/autoload/health.vim' does.
| * | | test(runtime/health): cover lua healthchecksJavier López2021-10-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add tests for lua healthchecks (failure, success and submodules). - Reword some of the test naming for improved logs readability. - Modify render test to accomodate the changes of the health autoload function. - Add test for :checkhealth completion of Lua healtchecks.
* | | | Merge pull request #15813 from bfredl/neomouseBjörn Linse2021-10-04
|\ \ \ \ | |/ / / |/| | | fix(mouse): correct dragged position in composed layout
| * | | fix(mouse): correct dragged position in composed layoutBjörn Linse2021-10-04
| |/ /
* | | Merge #15218 from gpanders/split-trimemptyJustin M. Keyes2021-10-03
|\ \ \ | |/ / |/| | feat(lua): add "noempty" param to vim.split()
| * | refactor: use kwargs parameter in vim.splitGregory Anders2021-09-25
| | |
| * | feat: add trimempty optional parameter to vim.splitGregory Anders2021-09-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `split()` VimL function trims empty items from the returned list by default, so that, e.g. split("\nhello\nworld\n\n", "\n") returns ["hello", "world"] The Lua implementation of vim.split does not do this. For example, vim.split("\nhello\nworld\n\n", "\n") returns {'', 'hello', 'world', '', ''} Add an optional parameter to the vim.split function that, when true, trims these empty elements from the front and back of the returned table. This is only possible for vim.split and not vim.gsplit; because vim.gsplit is an iterator, there is no way for it to know if the current item is the last non-empty item. Note that in order to preserve backward compatibility, the parameter for the Lua vim.split function is `trimempty`, while the VimL function uses `keepempty` (i.e. they are opposites). This means there is a disconnect between these two functions that may surprise users.
* | | Merge pull request #15516 from bfredl/keysetBjörn Linse2021-10-03
|\ \ \ | | | | | | | | refactor(api): Represent option dicts as a structs in C and reduce conversion overhead from lua
| * | | refactor(api): handle option dicts properlyBjörn Linse2021-10-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not copy a lot of lua strings (dict keys) to just strequal() them Just compare them directly to a dedicated hash function. feat(generators): HASHY McHASHFACE
* | | | Merge pull request #15786 from gpanders/diagnostic-signs-unique-severityGregory Anders2021-10-02
|\ \ \ \
| * | | | test(diagnostic): add test case for signsGregory Anders2021-10-02
| | | | |
* | | | | fix(nvim_open_win): crash if autocmds delete buffer/window #15549Sean Dewar2021-10-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | win_set_buf can trigger autocmds if noautocmd=false. If they close the window, code afterwards will dereference the freed win_T* wp pointer. This interaction became possible after commit 1def3d1542d6a65f057e743faea39a760b50db87. The reason deleting curbuf crashes, and not the buf passed to `nvim_open_win`, is because the float initially edits curbuf (`win_init`) until it's later set to edit buf (windows from `:new` and `:split <buf>` behave similiarly: approx. `:split`, then `:buffer <buf>`). `do_buffer` closes windows when their edited buffer is deleted (unless it's the only window; N/A for floats), so the float closes when curbuf is deleted, so we need to check `win_valid` after `win_set_buf` too. Closes #15548
* | | | | fix(float)!: always anchor to corner of window including border #15832zeertzjq2021-10-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | N, W, S, E are all inclusive, i.e., always anchor to the exact corner of the window (including border). This line may also need change in this case (change 0 to -1): This is most consistent and easiest to reason about, especially with GUIs whose border do not need to have width/height of 1/1 in cell units. Fix #15789
* | | | | Merge #15803 fix(lsp_spec): tests depend on previous sessionJustin M. Keyes2021-10-02
|\ \ \ \ \
| * | | | | fix(lsp_spec): tests depended on previous sessionJustin M. Keyes2021-10-02
| | |/ / / | |/| | | | | | | | | | | | | - fix tests which accidentally depended on previous session
* | | | | fix(input): resolve isolated (non-ALT/META) mappings #13109erw72021-10-02
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Since 2f06413dfb36 #13042, "ESC+c" sequence is treated as "ESC c" instead of "M-c" (ALT/META+c) when not mapped, aka "fallthrough" behavior. But "isolated" (non-ALT/META) mappings to ESC and c were not resolved. This behavior is especially confusing for the TUI. Solution: Resolve isolated ESC, c mappings when there is no M-c mapping. Change ins_char_typebuf() to escape CSI, K_SPECIAL. fixes #13086 fixes #15869
* | | | fix(runtime): add packages as "/pack/*/start/*" patterns to &rtpBjörn Linse2021-10-02
|/ / / | | | | | | | | | This makes `globpath(&rtp, ...)` work again for start packages
* | | fix(runtime): fix ordering of "after" packagesBjörn Linse2021-09-30
| | | | | | | | | | | | they must come after ordinary runtime dirs which are not "after"
* | | test: add a test for getmousepos()Daniel Steinberg2021-09-29
| | |
* | | feat(lsp): add codeAction/resolve support (#15818)Mathias Fußenegger2021-09-28
| | | | | | | | | Closes https://github.com/neovim/neovim/issues/15339 and https://github.com/neovim/neovim/issues/15828
* | | Merge pull request #15812 from bfredl/tabaBjörn Linse2021-09-28
|\ \ \ | | | | | | | | fix(runtime): make a copy of runtime_search_path when iterating
| * | | fix(runtime): make a copy of runtime_search_path when iteratingBjörn Linse2021-09-27
| | | | | | | | | | | | | | | | | | | | This is to prevent concurrent modification, just like save_rtp in the vim 8 implementation
* | | | feat(lsp): add client command support to codelens (#15820)Mathias Fußenegger2021-09-28
| | | | | | | | | | | | | | | | Also adds a check against the server capabilities to fix https://github.com/neovim/neovim/issues/15183
* | | | fix(ui): s/format_entry/format_item to match docs (#15819)Mathias Fußenegger2021-09-27
| | | | | | | | | | | | Follow up to https://github.com/neovim/neovim/pull/15771
* | | | feat(ui): add vim.ui.select and use in code actions (#15771)Mathias Fußenegger2021-09-27
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Continuation of https://github.com/neovim/neovim/pull/15202 A plugin like telescope could override it with a fancy implementation and then users would get the telescope-ui within each plugin that utilizes the vim.ui.select function. There are some plugins which override the `textDocument/codeAction` handler solely to provide a different UI. With custom client commands and soon codeAction resolve support, it becomes more difficult to implement the handler right - so having a dedicated way to override the picking function will be useful.
* | | feat(lsp): use cjson for lsp rpc (#15759)Michael Lingelbach2021-09-26
| | |
* | | Merge pull request #14871 from mjlbach/feature/lua-cjson-embeddedMichael Lingelbach2021-09-26
|\ \ \ | | | | | | | | feat(lua): expose lua-cjson as vim.json
| * | | test: add tests for vim.jsonMichael Lingelbach2021-09-26
| | | |
* | | | Merge pull request #15351 from bfredl/virt_lineBjörn Linse2021-09-26
|\ \ \ \ | | | | | | | | | | feat(screen): virtual lines
| * | | | feat(decorations): support virtual lines (for now: only one block at a time)Björn Linse2021-09-26
| | | | |