aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ex_cmds
Commit message (Collapse)AuthorAge
* docs: fix typos (#20394)dundargoc2022-09-30
| | | | | Co-authored-by: Raphael <glephunter@gmail.com> Co-authored-by: smjonas <jonas.strittmatter@gmx.de> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* fix(api): notify dict watchers on nvim_set_var and vim.g settersmolck2022-09-27
| | | | | Co-authored-by: bfredl <bjorn.linse@gmail.com> Co-authored-by: Christian Clason <c.clason@uni-graz.at>
* ci: move BSD jobs from sourcehut to Cirrus CI #19616dundargoc2022-09-08
| | | | | | | | | | | | | | | | | | | dispatch.sr.ht is being deprecated, meaning that using sourcehut CI won't be possible (see https://github.com/neovim/neovim/issues/19609). Since Github Actions doesn't provide any BSD runners an external service is required and Cirrus CI seems like a good replacement for sourcehut. Initially experimented with using FreeBSD and OpenBSD virtual machines in GitHub Actions, but Cirrus has been a much better fit with better performance, logs and overall experience. Failing tests are automatically skipped on FreeBSD regardless if it's on CI or not. Ideally these tests should only be skipped in CI with the help of `isCI` helper function. Unfortunately, the tests don't recognize the environment variable CIRRUS_CI even if it's set manually. This workaround is good enough for the time being, but we might want to only skip tests when using the CI (or even better, fix the failing tests). Closes: https://github.com/neovim/neovim/issues/19609
* vim-patch:9.0.0409: #{g:x} was seen as a curly-braces expressionii142022-09-08
| | | | | | Problem: #{g:x} was seen as a curly-braces expression. Solution: Do never see #{} as a curly-braces expression. (closes vim/vim#11075) https://github.com/vim/vim/commit/7c7e1e9b98d4e5dbe7358c795a635c6f1f36f418
* vim-patch:8.2.3102: test for crash fix does not fail without the fix (#20018)zeertzjq2022-08-31
| | | | | | | Problem: Test for crash fix does not fail without the fix. Solution: Adjust the test sequence. (closes vim/vim#8506) https://github.com/vim/vim/commit/3777d6e32b22f0a70b774760c24160079e303bad Cherry-pick CheckUnix from patch 8.2.1432.
* vim-patch:8.2.4726: cannot use expand() to get the script namezeertzjq2022-08-23
| | | | | | | | | Problem: Cannot use expand() to get the script name. Solution: Support expand('<script>'). (closes vim/vim#10121) https://github.com/vim/vim/commit/6013d0045dec7ca7c0068fbe186c42d754a7368b Use `.sn_name` instead of `->sn_name` as v8.2.0154 hasn't been ported. Cherry-pick builtin.txt expand() doc from latest Vim.
* test: add test for using :normal to stop Visual mode in cmdwin (#19904)zeertzjq2022-08-23
|
* fix(tests): remove irrelevant usage of display-=msgsepbfredl2022-08-17
| | | | | | | | These were just added to avoid churn when changing the default of 'display'. To simplify message handling logic, we might want to remove support for printing messages in default_grid later on. This would allow things like printing error messages safely in the middle of redraw, or a future graduation of the 'multigrid' feature.
* feat: allow :wincmd to accept a count (#19815)Famiu Haque2022-08-17
| | | | | | | | | | | | | | | Let :wincmd command accept a count like what its documentation suggests. Previously it could only accept a range, which led to some ambiguity on which attribute should be used when executing :wincmd using nvim_cmd. Closes #19662. Also fix a typo in a related Vim test: vim-patch:9.0.0223: typo in diffmode test Problem: Typo in diffmode test. Solution: Fix the typo. (closes vim/vim#10932) https://github.com/vim/vim/commit/5fd6ab820b4a0aaa5c6020852f39d118375fab49
* fix(source): fix expand('<sfile>') no longer works for Luazeertzjq2022-08-16
|
* fix(source): make changing 'shellslash' change expand() resultzeertzjq2022-08-15
|
* vim-patch:8.2.1280: Ex command error cannot contain an argumentzeertzjq2022-08-07
| | | | | | | | | Problem: Ex command error cannot contain an argument. Solution: Add ex_errmsg() and translate earlier. Use e_trailing_arg where possible. https://github.com/vim/vim/commit/8930caaa1a283092aca81fdbc3fcf15c7eadb197 Remove duplicate test file 062_tab_pages_spec.lua
* fix(session): respect sessionoptions=terminal #19497Gustavo Sampaio2022-08-01
| | | | | fixes #13078 Co-authored-by: Yuta Katayama <8683947+yutkat@users.noreply.github.com>
* test(mksession_spec): use %bwipeout! instead of qall! to close terminal (#19465)zeertzjq2022-07-22
| | | Avoid expect_exit, session will be closed when a new one is spawned.
* feat(defaults): mouse=nvi #19290matveyt2022-07-17
| | | | | | | | | | Problem: Since right-click can now show a popup menu, we can provide messaging to guide users who expect 'mouse' to be disabled by default. So 'mouse' can now be enabled by default. Solution: Do it. Closes #15521
* test: add a test for what Vim patch 8.2.0151 fixeszeertzjq2022-07-08
|
* Merge #19060 memory leaksJustin M. Keyes2022-06-28
|\
| * fix(coverity/348300): free memory when overiding sing attributeThomas Vigouroux2022-06-27
| | | | | | | | | | Nothing prevent the user from doing `:sign define abc culhl=Normal culhl=Normal` and thus this leads to an obvious memory leak.
* | refactor(tests): introduce testprg()Justin M. Keyes2022-06-25
|/ | | | | | Also: - Add a describe('shell :!') section to system_spec. - Make the test for #16271 work on systems without powershell.
* fix(input): use correct grid when restoring cursor for <expr> mapping (#19047)zeertzjq2022-06-23
|
* fix(tests): check for EOF on exit of nvim properlybfredl2022-06-13
|
* fix(input): allow Ctrl-C to interrupt a recursive mapping even if mapped ↵zeertzjq2022-06-07
| | | | (#18885)
* fix(mksession): don't store floats in session #18635Daniel Steinberg2022-05-22
| | | | | | | | | | | | | | | | | | Problem: If there are floating windows when `:mksession` runs, the session cannot be properly restored. Solution: Change `:mksession` to skip floating windows. This matches Vim's treatment of popup windows. An alternative approach could have `:mksession` save floating windows that can be _properly_ restored (rather than skip them entirely, which is what this PR does). While that would seemingly be a more complete fix, that could present additional issues since floating windows are ordinarily created by plugins, and they may no longer be properly under a plugin's control when restored. closes #18432
* test(mksession_spec): only sleep on Windows (#18637)zeertzjq2022-05-19
|
* fix(termopen): avoid ambiguity in URI when CWD is root dir (#16988)zeertzjq2022-05-19
|
* test: fix mksession terminal CWD test again (#18615)zeertzjq2022-05-18
|
* test: unskip tests on Windows (#18600)zeertzjq2022-05-18
| | | | | | Remove the command('qall!') from mksession_spec.lua because it prevents helpers.rmdir() from retrying. Allow extra trailing spaces when matching terminal lines.
* refactor(ui)!: link `VertSplit` to `Normal` by defaultFamiu Haque2022-05-15
| | | | | Avoids using `gui=reverse` on `VertSplit` and makes window separators look much nicer by default.
* test: add more tests for K_SPECIAL escaping in <Cmd> mappingzeertzjq2022-05-03
|
* fix(input): only disable mapped CTRL-C interrupts when getting input (#18310)zeertzjq2022-04-30
|
* test: add test for <Cmd> mapping with character containing K_SPECIAL bytezeertzjq2022-04-30
|
* feat(mappings): allow special keys and modifiers in <Cmd> mappingzeertzjq2022-04-29
|
* test: add a test for #18135zeertzjq2022-04-17
|
* docs: typo fixes (#17859)dundargoc2022-04-15
| | | | | | | | | | Co-authored-by: Elias Alves Moura <eliamoura.alves@gmail.com> Co-authored-by: venkatesh <shariharanvenkatesh@gmail.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: Vikas Raj <24727447+numToStr@users.noreply.github.com> Co-authored-by: Steve Vermeulen <sfvermeulen@gmail.com> Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com> Co-authored-by: rwxd <rwxd@pm.me> Co-authored-by: casswedson <58050969+casswedson@users.noreply.github.com>
* refactor!: rename nvim_add_user_command to nvim_create_user_commandGregory Anders2022-04-10
|
* test: add some tests with :normal and Ex modezeertzjq2022-04-04
|
* fix(ex_normal): spam \n in Ex mode only if in Cmdline mode (#17977)zeertzjq2022-04-03
| | | | | When using :normal in Ex mode, the editor is no longer in Cmdline mode, but the exmode_active flag is still set, causing the wrong character to be spammed in Insert mode, leading to a hang.
* feat(test): use nvim_exec in helpers.source() #16064Justin M. Keyes2022-03-27
| | | | | | | | helpers.source() was a hack to work around the lack of anonymous :source. Its "create tempfile" behavior is not a required part of most tests that use it. Some tests still need the old "create tempfile" behavior either because they test SID behavior, or because of missing nvim_exec features: #16071
* refactor: remove cpo-& behavior (#17745)zeertzjq2022-03-23
| | | | cpo-& has been removed, but its behavior was accidentally made the default behavior. That should be removed instead.
* test: move two mapping tests to ex_cmds/map_spec.luazeertzjq2022-03-02
|
* 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.
* | docs: clarify actual behavior of <Plug>zeertzjq2022-03-01
|/
* 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 #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
* | test: use helpers.pending_win32(pending) instead of iswin()zeertzjq2022-02-26
| |