Compare commits

...

6 Commits

Author SHA1 Message Date
marvim
b4a609e158 docs: update version.c 2025-08-31 03:24:36 +00:00
zeertzjq
6a330f893b fix(lua): report error in Lua Funcref callback properly (#35555) 2025-08-31 06:44:23 +08:00
glepnir
1b3abfa688 docs(lsp): mention lsp/after/ in faq #35534 2025-08-30 10:31:16 -07:00
Volodymyr Chernetskyi
c333d64663 vim-patch:9.1.1709: filetype: kyaml files are not recognized
Problem:  filetype: kyaml files are not recognized
Solution: Detect *.kyml files as yaml filetype
          (Volodymyr Chernetskyi)

References:
- https://kubernetes.io/blog/2025/08/27/kubernetes-v1-34-release/#alpha-support-for-kyaml-a-kubernetes-dialect-of-yaml

closes: vim/vim#18158

d5c89cc6bb

Co-authored-by: Volodymyr Chernetskyi <19735328+chernetskyi@users.noreply.github.com>
2025-08-30 11:58:00 +02:00
Jan Edmund Lazo
b3d29f396d vim-patch:8.1.1259: crash when exiting early (#35552)
Problem:    Crash when exiting early. (Ralf Schandl)
Solution:   Only pop/push the title when it was set. (closes vim/vim#4334)

e5c83286bb

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2025-08-30 13:48:24 +08:00
Jan Edmund Lazo
0c0ef489f9 vim-patch:8.1.1136: decoding of mouse click escape sequence is not tested (#35551)
Problem:    Decoding of mouse click escape sequence is not tested.
Solution:   Add a test for xterm and SGR using low-level input.  Make
            low-level input execution with feedkeys() work.

905dd905de

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2025-08-30 05:39:43 +00:00
11 changed files with 57 additions and 29 deletions

View File

@@ -162,7 +162,7 @@ order of increasing priority:
1. Configuration defined for the `'*'` name.
2. Configuration from the result of merging all tables returned by
`lsp/<name>.lua` files in 'runtimepath' for a server of name `name`.
`lsp/<config>.lua` files in 'runtimepath' for the config named `<config>`.
3. Configurations defined anywhere else.
Example: given the following configs... >lua
@@ -280,6 +280,12 @@ FAQ *lsp-faq*
" (async = false is the default for format)
autocmd BufWritePre *.rs lua vim.lsp.buf.format({ async = false })
<
- Q: How to avoid my own lsp/ folder being overridden?
- A: Place your configs under "after/lsp/". Files in "after/lsp/" are loaded
after those in "nvim/lsp/", so your settings will take precedence over
the defaults provided by nvim-lspconfig. See also: |after-directory|
*lsp-vs-treesitter*
- Q: How do LSP, Treesitter and Ctags compare?
- A: LSP requires a client and language server. The language server uses

View File

@@ -1392,6 +1392,8 @@ local extension = {
yaml = 'yaml',
eyaml = 'yaml',
mplstyle = 'yaml',
kyaml = 'yaml',
kyml = 'yaml',
grc = detect_line1('<%?xml', 'xml', 'yaml'),
yang = 'yang',
yuck = 'yuck',

View File

@@ -332,7 +332,7 @@ void nvim_feedkeys(String keys, String mode, Boolean escape_ks)
if (!dangerous) {
ex_normal_busy++;
}
exec_normal(true);
exec_normal(true, lowlevel);
if (!dangerous) {
ex_normal_busy--;
}

View File

@@ -7072,21 +7072,26 @@ void exec_normal_cmd(char *cmd, int remap, bool silent)
{
// Stuff the argument into the typeahead buffer.
ins_typebuf(cmd, remap, 0, true, silent);
exec_normal(false);
exec_normal(false, false);
}
/// Execute normal_cmd() until there is no typeahead left.
///
/// @param was_typed whether or not something was typed
void exec_normal(bool was_typed)
/// @param use_vpeekc true to use vpeekc() to check for available chars
void exec_normal(bool was_typed, bool use_vpeekc)
{
oparg_T oa;
int c;
// When calling vpeekc() from feedkeys() it will return Ctrl_C when there
// is nothing to get, so also check for Ctrl_C.
clear_oparg(&oa);
finish_op = false;
while ((!stuff_empty()
|| ((was_typed || !typebuf_typed())
&& typebuf.tb_len > 0))
&& typebuf.tb_len > 0)
|| (use_vpeekc && (c = vpeekc()) != NUL && c != Ctrl_C))
&& !got_int) {
update_topline_cursor();
normal_cmd(&oa, true); // execute a Normal mode cmd

View File

@@ -1496,7 +1496,7 @@ int typval_exec_lua_callable(LuaRef lua_cb, int argcount, typval_T *argvars, typ
PUSH_ALL_TYPVALS(lstate, argvars, argcount, false);
if (nlua_pcall(lstate, argcount, 1)) {
nlua_print(lstate);
nlua_error(lstate, _("Lua callback: %.*s"));
return FCERR_OTHER;
}

View File

@@ -863,7 +863,7 @@ void free_all_mem(void)
// Close all tabs and windows. Reset 'equalalways' to avoid redraws.
p_ea = false;
if (first_tabpage->tp_next != NULL) {
if (first_tabpage != NULL && first_tabpage->tp_next != NULL) {
do_cmdline_cmd("tabonly!");
}
@@ -873,18 +873,20 @@ void free_all_mem(void)
// Clear user commands (before deleting buffers).
ex_comclear(NULL);
// Clear menus.
do_cmdline_cmd("aunmenu *");
do_cmdline_cmd("tlunmenu *");
do_cmdline_cmd("menutranslate clear");
if (curbuf != NULL) {
// Clear menus.
do_cmdline_cmd("aunmenu *");
do_cmdline_cmd("tlunmenu *");
do_cmdline_cmd("menutranslate clear");
// Clear mappings, abbreviations, breakpoints.
// NB: curbuf not used with local=false arg
map_clear_mode(curbuf, MAP_ALL_MODES, false, false);
map_clear_mode(curbuf, MAP_ALL_MODES, false, true);
do_cmdline_cmd("breakdel *");
do_cmdline_cmd("profdel *");
do_cmdline_cmd("set keymap=");
// Clear mappings, abbreviations, breakpoints.
// NB: curbuf not used with local=false arg
map_clear_mode(curbuf, MAP_ALL_MODES, false, false);
map_clear_mode(curbuf, MAP_ALL_MODES, false, true);
do_cmdline_cmd("breakdel *");
do_cmdline_cmd("profdel *");
do_cmdline_cmd("set keymap=");
}
free_titles();
free_findfile();
@@ -905,7 +907,9 @@ void free_all_mem(void)
free_cd_dir();
free_signs();
set_expr_line(NULL);
diff_clear(curtab);
if (curtab != NULL) {
diff_clear(curtab);
}
clear_sb_text(true); // free any scrollback text
// Free some global vars.
@@ -922,8 +926,10 @@ void free_all_mem(void)
// Close all script inputs.
close_all_scripts();
// Destroy all windows. Must come before freeing buffers.
win_free_all();
if (curwin != NULL) {
// Destroy all windows. Must come before freeing buffers.
win_free_all();
}
// Free all option values. Must come after closing windows.
free_all_options();
@@ -957,8 +963,10 @@ void free_all_mem(void)
reset_last_sourcing();
free_tabpage(first_tabpage);
first_tabpage = NULL;
if (first_tabpage != NULL) {
free_tabpage(first_tabpage);
first_tabpage = NULL;
}
// message history
msg_hist_clear(0);

View File

@@ -2453,7 +2453,9 @@ static bool found_tagfile_cb(int num_fnames, char **fnames, bool all, void *cook
void free_tag_stuff(void)
{
ga_clear_strings(&tag_fnames);
do_tag(NULL, DT_FREE, 0, 0, 0);
if (curwin != NULL) {
do_tag(NULL, DT_FREE, 0, 0, 0);
}
tag_freematch();
tagstack_clear_entry(&ptag_entry);

View File

@@ -1053,7 +1053,9 @@ theend:
void ex_comclear(exarg_T *eap)
{
uc_clear(&ucmds);
uc_clear(&curbuf->b_ucmds);
if (curbuf != NULL) {
uc_clear(&curbuf->b_ucmds);
}
}
void free_ucmd(ucmd_T *cmd)

View File

@@ -110,7 +110,7 @@ static const int included_patches[] = {
2374,
2373,
2372,
// 2371,
2371,
2370,
2369,
2368,
@@ -1222,7 +1222,7 @@ static const int included_patches[] = {
1262,
1261,
1260,
// 1259,
1259,
1258,
1257,
1256,
@@ -1345,7 +1345,7 @@ static const int included_patches[] = {
1139,
1138,
1137,
// 1136,
1136,
1135,
1134,
1133,

View File

@@ -16,6 +16,7 @@ local feed = n.feed
local assert_alive = n.assert_alive
local NIL = vim.NIL
local eq = t.eq
local matches = t.matches
before_each(clear)
@@ -289,6 +290,8 @@ describe('luaeval()', function()
return true
]]
)
-- v:errmsg is set properly #35554
matches(': dead function\n', api.nvim_get_vvar('errmsg'))
end)
it('should handle passing functions around', function()

View File

@@ -927,7 +927,7 @@ func s:GetFilenameChecks() abort
\ 'xsd': ['file.xsd'],
\ 'xslt': ['file.xsl', 'file.xslt'],
\ 'yacc': ['file.yy', 'file.yxx', 'file.y++'],
\ 'yaml': ['file.yaml', 'file.yml', 'file.eyaml', 'any/.bundle/config', '.clangd', '.clang-format', '.clang-tidy', 'file.mplstyle', 'matplotlibrc', 'yarn.lock',
\ 'yaml': ['file.yaml', 'file.yml', 'file.eyaml', 'file.kyaml', 'file.kyml', 'any/.bundle/config', '.clangd', '.clang-format', '.clang-tidy', 'file.mplstyle', 'matplotlibrc', 'yarn.lock',
\ '/home/user/.kube/config', '.condarc', 'condarc', 'pixi.lock'],
\ 'yang': ['file.yang'],
\ 'yuck': ['file.yuck'],