aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
* Merge pull request #15079 from shadmansaleh/feat/verbose_luabfredl2022-03-01
|\ | | | | feat(lua): add :verbose support for lua config
| * fix: anonymous sid not workingshadmansaleh2022-02-28
| |
| * feat(lua): show proper verbose output for lua configurationshadmansaleh2022-02-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `:verbose` didn't work properly with lua configs (For example: options or keymaps are set from lua, just say that they were set from lua, doesn't say where they were set at. This fixes that issue. Now `:verbose` will provide filename and line no when option/keymap is set from lua. Changes: - compiles lua/vim/keymap.lua as vim/keymap.lua - When souring a lua file current_sctx.sc_sid is set to SID_LUA - Moved finding scripts SID out of `do_source()` to `get_current_script_id()`. So it can be reused for lua files. - Added new function `nlua_get_sctx` that extracts current lua scripts name and line no with debug library. And creates a sctx for it. NOTE: This function ignores C functions and blacklist which currently contains only vim/_meta.lua so vim.o/opt wrappers aren't targeted. - Added function `nlua_set_sctx` that changes provided sctx to current lua scripts sctx if a lua file is being executed. - Added tests in tests/functional/lua/verbose_spec.lua - add primary support for additional types (:autocmd, :function, :syntax) to lua verbose Note: These can't yet be directly set from lua but once that's possible :verbose should work for them hopefully :D - add :verbose support for nvim_exec & nvim_command within lua Currently auto commands/commands/functions ... can only be defined by nvim_exec/nvim_command this adds support for them. Means if those Are defined within lua with vim.cmd/nvim_exec :verbose will show their location . Though note it'll show the line no on which nvim_exec call was made.
* | fix(api): include event in get_autocmds (#17553)Christian Clason2022-03-01
| |
* | docs: clarify actual behavior of <Plug>zeertzjq2022-03-01
| |
* | feat(lua): add missing changes to autocmds lost in the rebaseTJ DeVries2022-02-28
| | | | | | | | Note: some of these changes are breaking, like change of API signatures
* | Merge pull request #17529 from seandewar/api-string-oopsiebfredl2022-02-28
|\ \ | | | | | | fix(api): convert blob to NUL-terminated API string
| * | fix(api): convert blob to NUL-terminated API stringSean Dewar2022-02-26
| | | | | | | | | | | | | | | Looks like I did an oopsie; although API strings carry a size field, they should still be usable as C-strings! (even though they may contain embedded NULs)
* | | Merge pull request #17476 from dundargoc/test/emmyluazeertzjq2022-02-28
|\ \ \ | |_|/ |/| | test: correct emmylua annotations
| * | test: correct emmylua annotationsDundar Göc2022-02-20
| | | | | | | | | | | | This will fix the warnings sumneko language server outputs.
* | | feat(lua): add api and lua autocmdsTJ DeVries2022-02-27
| | |
* | | feat(lua): add <f-args> to user commands callback (#17522)Javier Lopez2022-02-27
| | | | | | | | | | | | | | | Works similar to ex <f-args>. It only splits the arguments if the command has more than one posible argument. In cases were the command can only have 1 argument opts.fargs = { opts.args }
* | | Merge pull request #16969 from shadmansaleh/enhance/ingore_nore_on_plug_keymapsbfredl2022-02-27
|\ \ \ | | | | | | | | feat: ignore nore on <Plug> maps
| * | | feat: ignore nore on <Plug> mapsshadmansaleh2022-02-27
| | | |
* | | | Merge pull request #17386 from bfredl/neothreadbfredl2022-02-27
|\ \ \ \ | | | | | | | | | | support threads in lua
| * | | | refactor(lua): cleanup and docs for threadsbfredl2022-02-26
| | | | |
| * | | | feat(lua): add proper support of luv threadserw72022-02-26
| | |_|/ | |/| |
* | | | Merge pull request #17432 from zeertzjq/vim-8.1.2336zeertzjq2022-02-27
|\ \ \ \ | |_|/ / |/| | | vim-patch:8.1.2336,8.2.{4338,4401}: mapping cursor and redrawing patches
| * | | test: add more tests for :*map cursor and redrawingzeertzjq2022-02-17
| | | |
| * | | test: add some tests for :*map <expr>Jay Sandhu2022-02-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add tests for: - Cursor position restored after :map expr - Cursor position restored after :imap expr - Error in :cmap expr handled correctly Cherry-picked from #12837
* | | | Merge pull request #16845 from seandewar/floaty-aucmd-winbfredl2022-02-26
|\ \ \ \ | | | | | | | | | | fix(aucmd_win): ensure aucmd_win stays floating
| * | | | fix(aucmd_win): ensure aucmd_win stays floatingSean Dewar2022-02-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nvim uses a floating window for the autocmd window, but in certain situations, it can be made non-floating (`:wincmd J`), which can cause issues due to the previous setup and cleanup logic for a non-floating aucmd_win being removed from aucmd_prepbuf and aucmd_restbuf. This can cause glitchiness and crashes due to the aucmd_win's frame being invalid after closing its tabpage, for example. Ensure aucmd_win cannot be made non-floating. The only place this happens is in win_split_ins if new_wp != NULL.
* | | | | Merge pull request #17414 from zeertzjq/api-set-cursor-redrawbfredl2022-02-26
|\ \ \ \ \ | | | | | | | | | | | | fix(api): nvim_win_set_cursor() redraw for cursorline and statusline
| * | | | | fix(api): nvim_win_set_cursor() redraw for cursorline and statuslinezeertzjq2022-02-15
| | | | | |
* | | | | | Merge pull request #17527 from zeertzjq/test-pending-win32zeertzjq2022-02-26
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | | test: use helpers.pending_win32(pending) instead of iswin()
| * | | | | test: use helpers.pending_win32(pending) instead of iswin()zeertzjq2022-02-26
| | | | | |
* | | | | | Merge pull request #17472 from lewis6991/signcol_improvementsbfredl2022-02-26
|\ \ \ \ \ \ | |/ / / / / |/| | | | | signcol improvements
| * | | | | fix(signcol): update cursor when signcol changesLewis Russell2022-02-24
| | | | | | | | | | | | | | | | | | | | | | | | Fixes #14195
* | | | | | Merge pull request #17467 from dundargoc/ci/remove-failing-windowsJames McCoy2022-02-25
|\ \ \ \ \ \ | |/ / / / / |/| | | | | ci: remove failing windows CI tests
| * | | | | ci: skip tests that fail on windowsDundar Göc2022-02-20
| | |_|_|/ | |/| | |
* | | | | feat(highlight): support for blend in nvim_set_hl (#17516)Lewis Russell2022-02-24
| | | | |
* | | | | fix(api)!: correctly handle negative line numbers for nvim_buf_set_text (#17498)Gregory Anders2022-02-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nvim_buf_set_text does not handle negative row numbers correctly: for example, nvim_buf_set_text(0, -2, 0, -1, 20, {"Hello", "world"}) should replace the 2nd to last line in the buffer with "Hello" and the first 20 characters of the last line with "world". Instead, it reports "start_row out of bounds". This happens because when negative line numbers are used, they are incremented by one additional number to make the non-negative line numbers end-exclusive. However, the line numbers for nvim_buf_set_text should be end-inclusive. In #15181 we handled this for nvim_buf_get_text by adding a new parameter to `normalize_index`. We can solve the problem with nvim_buf_set_text by simply availing ourselves of this new argument. This is a breaking change, but makes the semantics of negative line numbers much clearer and more obvious (as well as matching nvim_buf_get_text). BREAKING CHANGE: Existing usages of nvim_buf_set_text that use negative line numbers will be off-by-one.
* | | | | feat(api): implement nvim_buf_get_text (#15181)Gregory Anders2022-02-22
| |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nvim_buf_get_text is the mirror of nvim_buf_set_text. It differs from nvim_buf_get_lines in that it allows retrieving only portions of lines. While this can typically be done easily enough by API clients, implementing this function provides symmetry between the get/set text/lines APIs, and also provides a nice convenience that saves API clients the work of having to slice the result of nvim_buf_get_lines themselves.
* | | | fix(highlight): accept NONE as a color name (#17487)Lewis Russell2022-02-21
|/ / / | | | | | | | | | | | | | | | | | | | | | ... for when `ns=0`. Also update the documentation of nvim_set_hl to clarify the set behaviour. Fixes #17478
* | | vim-patch:8.2.3661: test for put with large count failszeertzjq2022-02-18
| | | | | | | | | | | | | | | | | | Problem: Test for put with large count fails. Solution: Adjust the counts in the test. https://github.com/vim/vim/commit/8bc07e800c2af36686aadd4178cc2671f5c454d4
* | | vim-patch:8.2.3659: integer overflow with large line numberzeertzjq2022-02-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Integer overflow with large line number. Solution: Check for overflow. (closes vim/vim#9202) https://github.com/vim/vim/commit/03725c5795ae5b8c14da4a39cd0ce723c6dd4304 Put E1247 in globals.h as E1240 is also there. Do not make getdigits() abort.
* | | Merge pull request #17433 from seandewar/vim-8.2.3492Sean Dewar2022-02-18
|\ \ \ | | | | | | | | vim-patch:8.2.{3492,3493,3570,3573,3574,3575,3577,3601}: put overflow checking shenanigans
| * | | vim-patch:8.2.3601: check for overflow in put count does not work wellSean Dewar2022-02-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Check for overflow in put count does not work well. Solution: Improve the overflow check. (Ozaki Kiichi, closes vim/vim#9102) https://github.com/vim/vim/commit/fa53722367c3793fda95dac665af74b8651065e9 Add some casts as Nvim uses size_t variables in some places. We could technically adjust the logic to check for overflow outside of size_t's range, but it's much easier to just port the patch exactly (also means we can use the same tests). v:sizeoflong is N/A, so convert the 64-bit tests to Lua and use the FFI to check long's size.
* | | | Merge pull request #17430 from dundargoc/test/remove-travisJames McCoy2022-02-17
|\ \ \ \
| * | | | test: remove checks to see if current CI job is travis or appveyorDundar Göc2022-02-17
| | | | |
* | | | | fix(api): allow empty list for cterm in nvim_set_hlChristian Clason2022-02-17
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: when accessing `nvim_set_hl` from Lua, empty tables are converted to empty lists, not dictionaries, resulting in an error for :lua vim.api.nvim_set_hl(0, "Comment", { cterm = {} }) Workaround: add an empty array as a special case when checking `dict->cterm.type` and just set `cterm_mask_provided`. (Proper solution: handle this in `gen_api_dispatch.lua`.)
* | | | Merge pull request #17421 from lewis6991/hl0_clearbfredl2022-02-17
|\ \ \ \ | |_|_|/ |/| | | fix(highlight): global ns improvements
| * | | feat(highlight): support color names for ctermLewis Russell2022-02-16
| | | |
| * | | fix(highlight): allow globals to be clearedLewis Russell2022-02-16
| | | | | | | | | | | | | | | | | | | | | | | | - and reduce heap allocations Fixes #17420
* | | | Merge pull request #17363 from zeertzjq/dirchangedprezeertzjq2022-02-17
|\ \ \ \ | |_|/ / |/| | | feat(events): add DirChangedPre
| * | | feat(events): add DirChangedPrezeertzjq2022-02-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Nvim, like DirChanged, this also triggers when switching windows. This marks Vim patch 8.2.4335 as ported. vim-patch:8.2.4335: no autocommand event triggered before changing directory Problem: No autocommand event triggered before changing directory. (Ronnie Magatti) Solution: Add DirChangedPre. (closes vim/vim#9721) https://github.com/vim/vim/commit/28e8f73ae2d90009fd62cd60f97c2643ba44de68
* | | | feat(tree-sitter): allow Atom-style capture fallbacks (#14196)Stephan Seitz2022-02-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows falling back to `@definition` when we have no mapping `@definition.fancy-specialization`. This behavior is described in tree-sitter's documentation (https://tree-sitter.github.io/tree-sitter/syntax-highlighting#theme). Fixes https://github.com/nvim-treesitter/nvim-treesitter/issues/738
* | | | Merge pull request #16678 from lewis6991/runtime_file_errbfredl2022-02-16
|\ \ \ \ | | | | | | | | | | fix(api): re-route nvim_get_runtime_file errors
| * | | | fix(api): re-route nvim_get_runtime_file errorsLewis Russell2022-02-15
| | |/ / | |/| | | | | | | | | | This allows nvim_get_runtime_file to be properly used via pcall
* | | | feat(mappings): considering map description when filtering (#17423)Shadman2022-02-16
| | | |