aboutsummaryrefslogtreecommitdiff
path: root/test/functional
Commit message (Collapse)AuthorAge
* vim-patch:8.1.0793: incorrect error messages for functions that take a BlobSean Dewar2021-09-15
| | | | | | | Problem: Incorrect error messages for functions that now take a Blob argument. Solution: Adjust the error messages. (Dominique Pelle, closes vim/vim#3846) https://github.com/vim/vim/commit/0d17f0d1c09fa6db306336695ba646c21ea24909
* feat(decode_string): decode binary string with NULs to BlobSean Dewar2021-09-15
| | | | | | | | Strings that previously decoded into a msgpack special for representing BINs with NULs now convert to Blobs. It shouldn't be possible to decode into this special anymore after this change? Notably, Lua strings with NULs now convert to Blobs when passed to VimL.
* feat(shada): restore Blob globals properlySean Dewar2021-09-15
| | | | | | | | | | | As Strings and Blobs are encoded as msgpack BINs, the current ShaDa implementation will restore global Blob variables as Strings (or msgpack special dicts if they contain NULs). Encode an additional element with Blob globals to differentiate them from Strings so that we can restore them with the correct type. Adjust variables_spec.lua's autotest() to also check for proper type.
* feat(msgpack): convert Blobs to BIN stringsSean Dewar2021-09-15
|
* feat(json): convert Blobs to array of byte valuesSean Dewar2021-09-15
| | | | | Similiar to how Vim does it, but to be consistent with how Nvim encodes lists, add a space after every comma.
* feat(api): convert Blobs to API stringsSean Dewar2021-09-15
| | | | Note that these are not NUL-terminated; the API supports this.
* feat(nlua): convert Blobs to stringsSean Dewar2021-09-15
|
* vim-patch:8.1.0735: cannot handle binary dataSean Dewar2021-09-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Cannot handle binary data. Solution: Add the Blob type. (Yasuhiro Matsumoto, closes vim/vim#3638) https://github.com/vim/vim/commit/6e5ea8d2a995b32bbc5972edc4f827b959f2702f Nvim-specific Blob conversions are implemented in future commits. Refactor write_blob() to use a FileDescriptor, as f_writefile() was refactored to use one (does not apply to read_blob()). Use var_check_lock() in f_add() for Blobs from v8.1.0897. Add a modeline to test_blob.vim and fix some doc typos. Include if_perl.txt's VIM::Blob() documentation. Interestingly, this function already worked before this port, as it just returns a Blob string literal, not an actual Blob object. N/A patches for version.c: vim-patch:8.1.0741: viminfo with Blob is not tested Problem: Viminfo with Blob is not tested. Solution: Extend the viminfo test. Fix reading a blob. Fixed storing a special variable value. https://github.com/vim/vim/commit/8c8b8bb56c724cc1bfc3d8520eec33f2d399697c vim-patch:8.1.1022: may use NULL pointer when out of memory Problem: May use NULL pointer when out of memory. (Coverity) Solution: Check for blob_alloc() returning NULL. https://github.com/vim/vim/commit/e142a9467a7f6845a426d8db6efedf246d3c13ac
* fix(:source): copy curbuf lines to memory before sourcing #15111Sean Dewar2021-09-15
| | | | | | | | | It's possible for weirdness to happen if curbuf is modified while sourcing from it via :source (with no arguments). For example: - Deleting lines from or wiping curbuf can cause internal error E315 to be thrown from ml_get. - Changing the curbuf to another buffer while sourcing can cause lines from the new curbuf to then be sourced instead.
* fix(:source, nvim_exec): handle Vimscript line continuations #14809Sean Dewar2021-09-14
| | | | | | | | | | | Problem: Anonymous :source (no args) and nvim_exec() don't support Vimscript line continuations. Solution: Factor out the concat logic into concat_continued_line() and a CONCAT_CONTINUED_LINES macro for simple concatenations where lines are fetched individually. Closes #14807
* fix(lsp): correctly parse LSP snippets #15579hrsh7th2021-09-14
| | | Fixes #15522
* Merge pull request #15639 from bfredl/xdataBjörn Linse2021-09-12
|\ | | | | fix(tests): use isolated XDG_DATA_HOME in startup tests
| * fix(tests): use isolated XDG_DATA_HOME in startup testsBjörn Linse2021-09-12
| | | | | | | | | | | | | | | | | | Otherwise the users site packages will be loaded from ~/.local/share/nvim/site which can cause unexpected error messages and other kinds of mayhem Simpler alternative: use "--noplugin". Shouldn't be done because: (1) these tests should test the ordinary startup code path as close as possible (2) tests that test the loading of site packages will be added here very soon
* | Merge pull request #14770 from andrew-pa/fix13403Björn Linse2021-09-12
|\ \ | |/ |/| Fix relative float positioning
| * fix(windowing): positioning of relative floatsandrew-pa2021-09-08
| | | | | | | | | | | | Fix relative floating windows so that they open in the correct position relative to each other. Also make sure that their positions are correct immediately after creation without a redraw.
* | feat(api): win_viewport also sends line_count #15613Yatao Li2021-09-10
| |
* | fix(mouse.c): fix mouse drag positions on multigrid #12667Ville Hakulinen2021-09-10
| | | | | | | | | | | | | | Currently, multigrid mouse drag positions are handled incorrectly if the drag event is not in the top left grid. Fix this by not adjusting the position of the event in jump_to_mouse. related: #15091
* | Merge pull request #15566 from bfredl/mpackBjörn Linse2021-09-09
|\ \ | | | | | | libs: vendor libmpack and libmpack-lua
| * | feat(lua): make vim.mpack support vim.NIL and vim.empty_dict()Björn Linse2021-09-09
| | |
* | | Merge pull request #15091 from yatli/mouse_drag_fixBjörn Linse2021-09-09
|\ \ \ | |/ / |/| | fix #15075 (mouse crash in multigrid)
| * | fix(multigrid): #15075 mouse events crash neovimYatao Li2021-09-08
| | |
* | | docs: naming conventionsJustin M. Keyes2021-09-09
| | |
* | | feat(lua)!: register_keystroke_callback => on_keyJustin M. Keyes2021-09-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | Analogous to nodejs's `on('data', …)` interface, here on_key is the "add listener" interface. ref 3ccdbc570d85 #12536 BREAKING_CHANGE: vim.register_keystroke_callback() is now an error.
* | | feat(lsp): support textDocument/prepareRename (#15514)Zi How Poh2021-09-08
|/ /
* | fix(screen): missing search highlights when redrawing from timer #15380Jit2021-09-06
| | | | | | | | | | | | | | * Revert "vim-patch:8.1.2294: cursor pos wrong with concealing and search causes a scroll" * Add a test which covers #13074 910bbc3cca796f7fa941e0f6176cd0061de0e01c while reverting the screen.c code changes from there. Fixes #14064
* | fix(lsp): update workspace/applyEdit handler signature (#15573)Jose Alvarez2021-09-05
| |
* | Merge pull request #15504 from mjlbach/feat/change-handler-signatureMichael Lingelbach2021-09-05
|\ \ | | | | | | feat(lsp)!: change handler signature
| * | feat(lsp)!: change handler signatureMichael Lingelbach2021-09-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the handler signature was: function(err, method, params, client_id, bufnr, config) In order to better support external plugins that wish to extend the protocol, there is other information which would be advantageous to forward to the client, such as the original params of the request that generated the callback. In order to do this, we would need to break symmetry of the handlers, to add an additional "params" as the 7th argument. Instead, this PR changes the signature of the handlers to: function(err, result, ctx, config) where ctx (the context) includes params, client_id, and bufnr. This also leaves flexibility for future use-cases. BREAKING_CHANGE: changes the signature of the built-in client handlers, requiring updating handler calls
* | | refactor(tests): use assert_alive() #15546Justin M. Keyes2021-09-01
| | |
* | | feat(api): nvim_get_chan_info: include "argv" for jobs #15537Justin M. Keyes2021-09-01
| | | | | | | | | ref #15440
* | | fix(jobwait): always drain process event queues #15402Gregory Anders2021-08-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: jobwait() returns early if the job was stopped, but the job might have pending callbacks on its event queue which are required to complete its teardown. State such as term->closed might not be updated yet (by the pending callbacks), so codepaths such as :bdelete think the job is still running. Solution: Always flush the job's event queue before returning from jobwait(). ref #15349
* | | fix(terminal): close without ! if the job is stoppedGregory Anders2021-08-31
| | | | | | | | | | | | | | | | | | - If the terminal job is still running then ! is still required. Closes #4683
* | | fix(lua): preserve argument lists which are not listsBjörn Linse2021-08-29
| | |
* | | feat: defaults: auto-create backup dirGregory Anders2021-08-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Copy the behavior of 'undodir' and create the last specified directory in the 'backupdir' option if it doesn't exist. Use trailing slashes for 'backupdir' as well as 'viewdir' and 'undodir' by default. Note that 'undodir' always behaves as though it has the trailing slashes, regardless of whether or not they are present. They are added to the default option value to minimize surprise. The '.' value in 'backupdir' is kept because the default behavior for backups is solely to have a backup if the save of the main file to disk fails. As soon as that save is completed the backup file is removed, so generally there is no need to put them in a central location. Co-authored by: murphy66 <murphy66@gmail.com>
* | | vim-patch:8.1.2229: color number column above/below cursor #15409zeertzjq2021-08-27
| | | | | | | | | | | | | | | Problem: Cannot color number column above/below cursor differently. Solution: Add LineNrAbove and LineNrBelow. (Shaun Brady, closes vim/vim#624) https://github.com/vim/vim/commit/efae76ab1a43d5a628d8c2fa4218ace6ba597f5d
* | | tests(lua/on_yank): assert conditions that fail correctly #15495notomo2021-08-27
| | | | | | | | | | | | The test added in 274a3504a790a799b28ee89c75e29fb4dbdff41f does not fail if the code changes are reverted.
* | | feat(lsp): get_border_size(): support repeating border char list #15474zeertzjq2021-08-27
| | |
* | | fix(lua): verify buffer in highlight.on_yank (#15482)notomo2021-08-26
| | | | | | | | | | | | | | | Resolve an issue with deferred clearing of highlight failing if the buffer is deleted before the timeout by checking whether the buffer is valid first.
* | | Merge #15293 Vimscript "method" syntaxJustin M. Keyes2021-08-26
|\ \ \ | | | | | | | | Port VimL's method call syntax - vim-patch:8.1.{1638,1800,1803,1807,1809,1816,1820,1821,1828,1834,1835,1861,1863,1878,1879,1888,1909,1911,1912}
| * | | feat(v:lua): support calling v:lua as a methodSean Dewar2021-08-13
| | | |
| * | | fix(v:lua): fix emsg when calling v:lua directlySean Dewar2021-08-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | v:lua expressions are represented using vvlua_partial. As v:lua isn't intended to be called directly, it's given an empty pt_name. Because of this, calling v:lua directly like "v:lua()" will cause "E117: Unknown function: ", with an empty name. Instead, have call_func() show the name "v:lua" in the emsg.
| * | | vim-patch:8.1.1909: more functions can be used as methodsSean Dewar2021-08-12
| | | | | | | | | | | | | | | | | | | | | | | | Problem: More functions can be used as methods. Solution: Make a few more functions usable as a method. https://github.com/vim/vim/commit/e49fbff384e45dd17fed72321c26937edf6de16b
| * | | vim-patch:8.1.1861: only some assert functions can be used as a methodSean Dewar2021-08-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Only some assert functions can be used as a method. Solution: Allow using most assert functions as a method. https://github.com/vim/vim/commit/24278d2407dfbc8d93eb36593cdd006ff5d86f94 Port tests to assert_spec.lua.
| * | | fix(eval): cherry-pick emsg changes from v8.1.0736Sean Dewar2021-08-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | v8.1.0736 made some changes for making some emsgs more specific. Includes the change for Test_lambda_fails() in test_lambda.vim. Adjust relevant functionaltests to expect the new emsgs. This patch has been fully ported in my Blob port PR, but it hasn't been merged yet, so just use what we need from it for now. Required for v8.1.1821.
* | | | fix(bufupdates): send correct updates for visual pasteThomas Vigouroux2021-08-25
| |/ / |/| | | | | | | | | | | | | | One step further towards stable tree-sitter. Co-authored-by: Björn Linse <bjorn.linse@gmail.com>
* | | Merge pull request #15434 from Dkendal/feature-lua-treesitter-siblingThomas Vigouroux2021-08-23
|\ \ \ | | | | | | | | feat(treesitter): add next, prev sibling method
| * | | feat(treesitter): add next, prev sibling methodDylan Kendal2021-08-20
| | | | | | | | | | | | | | | | | | | | Add tsnode methods to change to the next, previous, named or unnamed nodes.
* | | | fix(window.c): win_close from other tabpage #15454notomo2021-08-22
| | | | | | | | | | | | Fix #15313
* | | | docs: make Lua docstrings consistent #15255Gregory Anders2021-08-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The official developer documentation in in :h dev-lua-doc specifies to use "--@" for special/magic tokens. However, this format is not consistent with EmmyLua notation (used by some Lua language servers) nor with the C version of the magic docstring tokens which use three comment characters. Further, the code base is currently split between usage of "--@", "---@", and "--- @". In an effort to remain consistent, change all Lua magic tokens to use "---@" and update the developer documentation accordingly.
* | | | feat(api): add lua C bindings for xdiff (#14536)Lewis Russell2021-08-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feat(api): add lua C bindings for xdiff * chore: opt.hunk_lines -> opt.result_type opt.on_hunk now takes precedence over opt.result_type * chore: fix indents Fix indents * chore: change how priv is managed Assign priv NULL and unconditionally apply XFREE_CLEAR to it when finished.