Problem: Regression test doesn't fail when fix is reverted.
Solution: Add "n" to 'cpoptions' instead of using :winsize. (closesvim/vim#12587,
issue vim/vim#12528)
e429893741
Problem: Divide by zero when scrolling with 'smoothscroll' set.
Solution: Avoid using a negative width. (closesvim/vim#12540, closesvim/vim#12528)
8154e642aa
Co-authored-by: fullwaywang <fullwaywang@tencent.com>
Problem: Not all cabal config files are recognized.
Solution: Add a couple of patterns. (Marcin Szamotulski, closesvim/vim#12463)
166cd7b801
Also:
- Do not expand Lua patterns in environment variables used in file patterns.
- Test $XDG_CONFIG_HOME on Windows, as it can be used by Nvim (and the runner
sets it).
Co-authored-by: Marcin Szamotulski <coot@coot.me>
Problem:
Using "nvim -l args.lua" without passing extra script args, does not set `_G.arg[0]`.
Steps to reproduce:
```
cat > args.lua<<EOF
vim.print(_G.arg, '')
vim.print(vim.v.argv, '')
EOF
nvim --clean -l args.lua
```
Solution:
Fix condition in command_line_scan.
Problem: Empty CmdlineEnter autocommand causes errors in Ex mode.
Solution: Save and restore ex_pressedreturn. (Christian Brabandt,
closes # 12581, closesvim/vim#12578)
590aae3557
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: Not all filetype file name matches are tested.
Solution: Add more file names to test with. (Jonas Strittmatter,
closesvim/vim#12569)
bd087ae8f0
Co-authored-by: smjonas <jonas.strittmatter@gmx.de>
Redrawing of 'statusline' and 'winbar' are actually already inhibited by
RedawingDisabled in Ex mode.
In Vim there is a check for `msg_scrolled == 0` (which is false in Ex
mode) since Vim doesn't have msgsep. Add a `!exmode_active` check here
in Nvim instead.
Problem: zserio files are not recognized.
Solution: Add a pattern for zserio files. (Dominique Pellé,
closesvim/vim#12544)
2b994da57a
Co-authored-by: =?UTF-8?q?Dominique=20Pell=C3=A9?= <dominique.pelle@gmail.com>
Enforce consistent terminology (defined in
`gen_help_html.lua:spell_dict`) for common misspellings.
This does not spellcheck English in general (perhaps a future TODO,
though it may be noisy).
Problem:
- `vim.json` exposes various global options which:
- affect all Nvim Lua plugins (especially the LSP client)
- are undocumented and untested
- can cause confusing problems such as: cc76ae3abe
- `vim.json` exposes redundant mechanisms:
- `vim.json.null` is redundant with `vim.NIL`.
- `array_mt` is redundant because Nvim uses a metatable
(`vim.empty_dict()`) for empty dict instead, which `vim.json` is
configured to use by default (see `as_empty_dict`).
Example:
```
:lua vim.print(vim.json.decode('{"bar":[],"foo":{}}'))
--> { bar = {}, foo = vim.empty_dict() }
```
Thus we don't need to also decorate empty arrays with `array_mt`.
Solution:
Remove the functions from the public vim.json interface.
Comment-out the implementation code to minimize drift from upstream.
TODO:
- Expose the options as arguments to `vim.json.new()`
Add automatic refresh and a public interface on top of #23736
* add on_reload, on_detach handlers in `enable()` buf_attach, and
LspDetach autocommand in case of manual detach
* unify `__buffers` and `hint_cache_by_buf`
* use callback bufnr in `on_lines` callback, bufstate: remove __index override
* move user-facing functions into vim.lsp.buf, unify enable/disable/toggle
Closes#18086
Co-authored by: zeertzjq <zeertzjq@outlook.com>
Co-authored by: Steven Todd McIntyre II <114119064+stmii@users.noreply.github.com>
Co-authored by: nobe4 <nobe4@users.noreply.github.com>
- docs: mention --luadev-mod to run with lua runtime files
When changing a lua file in the ./runtime folder, a new contributor
might expect changes to be applied to the built Neovim binary.
Problem: Current implementation of "remove trailing /" doesn't
account for the case of literal '/' as path.
Solution: Remove trailing / only if it preceded by something else.
Co-authored by: notomo <notomo.motono@gmail.com>
Previously, filtering code actions with the "only" option failed
if the code action kind contained special Lua pattern chars such as "-"
(e.g. the ocaml language server supports a "type-annotate" code action).
Solution: use string comparison instead of string.find
Problem: Error message is cleared when removing mode message.
Solution: Also reset flags when the message is further down.
da51ad51bf
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Message is cleared when removing mode message (Gary Johnson).
Solution: Do not clear the command line after displaying a message.
800cdbb7ca
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Expanding a pattern interferes with command line completion.
Solution: Set the file index only when appropriate. (closesvim/vim#12519)
094dd152fe
Problem: Having utf16idx() rounding up is inconvenient.
Solution: Make utf16idx() round down. (Yegappan Lakshmanan, closesvim/vim#12523)
95707037af
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Problem: Vim9: not enough test coverage for executing :def function.
Solution: Add a few more tests. Fix inconsistencies.
6b8c7ba062
Cherry-pick a blank line in test_listdict.vim from patch 8.2.3842.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: no type check when assigning a list range. (Naohiro Ono)
Solution: Check the member type. (closesvim/vim#8750)
89071cb6a1
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: not enough tests.
Solution: Run more existing tests for Vim9 script.
700e6b1662
Cherry-pick test_listdict.vim change from patch 8.2.3854.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: not enough tests.
Solution: Also run existing tests for Vim9 script. Make errors more
consistent.
f47c5a8e2d
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: not enough tests run with Vim9.
Solution: Run a few more tests in Vim9 script and :def function. Fix that
items(), keys() and values9) return zero for a NULL dict.
Make join() return an empty string for a NULL list. Make sort()
return an empty list for a NULL list.
ef98257593
Skip f_reverse() change for consistency with other functions.
Skip Test_null_list() and Test_null_dict() because of missing patches.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: tests are only executed for legacy script.
Solution: Run more tests also for Vim9 script. Fix uncovered problems.
5dd839ce20
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: not enough code is tested.
Solution: Use CheckLegacyAndVim9Success() in more places. Fix uncovered
problems.
63cb6567f0
Co-authored-by: Bram Moolenaar <Bram@vim.org>