Problem: Vim9: class_name definition can be improved
Solution: Use string_T to store class_name, avoid using STRLEN() calls,
simplify code, remove unused definition of struct
oc_newmember_S (John Marriott)
Use struct string_T to store the field class_name in struct class_T,
which means we can just use the .length field in struct string_T
instead of measuring it.
In addition:
1. In eval.c use string_T to store class_name and s in function
class_tv2string().
2. In vim9type.c change some calls from ga_concat() to ga_concat_len()
where the length is known.
3. In vim9class.c remove unused struct definition oc_newmember_S.
Change some calls from ga_concat() to ga_concat_len() where the
length is known.
4. In scriptfile.c use string_T to store type_name, class_name and
es_name in function estack_sfile().
5. In function estack_sfile() simplify construction of the grow array ga
and change some calls from ga_concat() to ga_concat_len() when the
length is known.
closes: vim/vim#189252019321e0b
Co-authored-by: John Marriott <basilisk@internode.on.net>
Problem: vim9 no class identifiers in stack dumps
Solution: Prefix class members in stack traces with the class name
followed by a dot.
closes: vim/vim#12866closes: vim/vim#120780ffc17aa47
Co-authored-by: LemonBoy <thatlemon@gmail.com>
Problem:
- Despite [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig)
claims to be a "data-only" plugin, in fact it still provides some
user-facing commands because they haven't been upstreamed to Nvim.
Solution:
- Upstream `:LspRestart`, `:LspStart` and `:LspStop` commands as `:lsp
restart`, `:lsp start` and `:lsp stop` respectively.
Co-authored-by: glepnir <glephunter@gmail.com>
Problem:
CursorLine background check used global `normal_bg`, ignoring 'winhighlight'.
Solution:
Use `bg_attr` to get window-local Normal background instead.
Problem: tests: test suite may stop on error in gen_opt_test.vim
Solution: Use a different output file for log files (Muraoka Taro)
When running newtests, it may unexpectedly stop just before
test_options_all.
Cause: When generating the opt_test.vim file for test_options_all, the
failure is detected by the existence of test.log. Therefore, if a test
performed before test_options_all fails and test.log is created, it is
mistakenly thought that the generation of opt_tet.vim has failed, and
the test suite stops there.
So let's change the filename created when utils/gen_opt_test.vim fails
from test.log to gen_opt_test.log, so that it can be detected
independently from other test failures.
closes: vim/vim#1892835de719c0c
Co-authored-by: MURAOKA Taro <koron.kaoriya@gmail.com>
Problem:
:messages history include the "search hit BOTTOM, continuing at TOP" message,
which is noise.
Solution:
Set msg_hist_off before giving the warning and reset it after warning.
Call `vim.treesitter.language.add()` before `get_helptags` (which
triggers filetype=help). And do this in the main routine, instead of
each gen/validate task.
Refactor capability checks in Client:_supports_registration and
Client:supports_method to properly handle dynamicRegistration and unknown
methods. Now, dynamic capabilities are checked before assuming support for
unknown methods, ensuring more accurate LSP feature detection.
Problem: feed_command, nvim_buf_set_option, nvim_buf_get_number, and exc_exec
are marked as deprecated.
Solution: Remove them from the test units in api/buffer_spec, autocmd/focus_spec,
ui/input_spec, and editor/put_spec.
Some test units only used a few deprecated functions, so creating a separate PR
for each would be excessive. Therefore, several were combined into a single PR.
Problem:
`vim.system()` doesn't invoke a shell, while the Vimscript function
`system()` does.
Solution:
Revert the change from 35af766de6 and use `vim.fn.system()` again to
actually invoke a shell.
Problem:
The builtin terminfo defs don't include xterm-ghostty, so features like
`kTerm_set_underline_style` are missing when building without unibilium.
Solution:
- Add ghostty to `gen_terminfo.lua`.
- Note: The ncurses defs are somewhat different than what ghostty ships.
- Special-case ghostty in `terminfo_from_builtin`.
Problem: :helpclose incorrectly accepts a range and a count.
Solution: Remove EX_COUNT and EX_RANGE from the command definition.
(Doug Kearns)
closes: vim/vim#189174c141bae3b
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
Problem:
If the last visible line in a window is not fully displayed, this line
may not get injection highlighting. This happens because line('w$')
actually means the last *completely displayed* line.
Solution:
Use line('w$') + 1 for the botline.
This reverts 4244a96774
"test: fix failing lsp/utils_spec #36609",
which changed the test based on the wrong behavior.
Problem: Vim9: comparing partial with function fails.
Solution: Support this comparison. Avoid a crash. (closesvim/vim#9909)
Add more test cases.
ed0c62e7b1
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Crash when using null_function for a partial.
Solution: Don't call fname_trans_sid() with NULL. (closesvim/vim#9908)
673bcb10eb
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: When waiting for a character is interrupted by receiving channel
data and the first character of a mapping was typed, the mapping
times out. (Ramel Eshed)
Solution: When dealing with channel data don't return from mch_inchar().
cda7764d8e
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Accessing beyond allocated memory when using the cmdline window in
Ex mode.
Solution: Use "*" instead of "'<,'>" for Visual mode.
c6fdb15d42
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Using "'<,'>" in Ex mode may compare unrelated pointers.
Solution: Set eap->cmd to "+" only later.
48ce135e6d
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Using invalid pointer with "V:" in Ex mode.
Solution: Correctly handle the command being changed to "+".
f50808ed13
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Visual range does not work before command modifiers.
Solution: Move Visual range to after command modifiers.
c75bca3ee9
Co-authored-by: Bram Moolenaar <Bram@vim.org>