neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 1f49a59b8bde0aeb3a1ef754bcb3724d9af241bb
parent 0ef1147313caa47c87c7baa79043ddcff55ef5e1
Author: zeertzjq <zeertzjq@outlook.com>
Date:   Tue, 11 Mar 2025 06:49:32 +0800

fix(events): fix incorrect capitalization of Cmdwin* events (#32813)

The name of Cmdwin* events were changed to CmdWin* in 8ed2dbf6e2802516501c11e72e5d6d977e6a07f3
without explanation. This commit changes them back.
This doesn't affect the creation or execution of autocommands. It only
affects the listing of autocommands.
Diffstat:
Mruntime/doc/cmdline.txt | 4++--
Mruntime/doc/vim_diff.txt | 4++--
Msrc/nvim/auevents.lua | 4++--
Mtest/functional/autocmd/cmdline_spec.lua | 8++++----
4 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/runtime/doc/cmdline.txt b/runtime/doc/cmdline.txt @@ -1226,8 +1226,8 @@ Thus you can resize the command-line window, but not others. The |getcmdwintype()| function returns the type of the command-line being edited as described in |cmdwin-char|. -Nvim defines this default CmdWinEnter autocmd in the "nvim.cmdwin" group: > - autocmd CmdWinEnter [:>] syntax sync minlines=1 maxlines=1 +Nvim defines this default CmdwinEnter autocmd in the "nvim.cmdwin" group: > + autocmd CmdwinEnter [:>] syntax sync minlines=1 maxlines=1 < You can disable this in your config with "autocmd! nvim.cmdwin". |default-autocmds| diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt @@ -771,8 +771,8 @@ Options: noremap <C-\><C-G> <C-\><C-N><Cmd>startinsert<CR> cnoremap <C-\><C-G> <C-\><C-N><Cmd>startinsert<CR> inoremap <C-\><C-G> <C-X><C-Z> - autocmd CmdWinEnter * noremap <buffer> <C-C> <C-C> - autocmd CmdWinEnter * inoremap <buffer> <C-C> <C-C> + autocmd CmdwinEnter * noremap <buffer> <C-C> <C-C> + autocmd CmdwinEnter * inoremap <buffer> <C-C> <C-C> lua << EOF vim.on_key(function(c) diff --git a/src/nvim/auevents.lua b/src/nvim/auevents.lua @@ -26,11 +26,11 @@ return { ChanInfo = false, -- info was received about channel ChanOpen = false, -- channel was opened CmdUndefined = false, -- command undefined - CmdWinEnter = false, -- after entering the cmdline window - CmdWinLeave = false, -- before leaving the cmdline window CmdlineChanged = false, -- command line was modified CmdlineEnter = false, -- after entering cmdline mode CmdlineLeave = false, -- before leaving cmdline mode + CmdwinEnter = false, -- after entering the cmdline window + CmdwinLeave = false, -- before leaving the cmdline window ColorScheme = false, -- after loading a colorscheme ColorSchemePre = false, -- before loading a colorscheme CompleteChanged = false, -- after popup menu changed diff --git a/test/functional/autocmd/cmdline_spec.lua b/test/functional/autocmd/cmdline_spec.lua @@ -19,8 +19,8 @@ describe('cmdline autocommands', function() api.nvim_set_var('channel', channel) command("autocmd CmdlineEnter * call rpcnotify(g:channel, 'CmdlineEnter', v:event)") command("autocmd CmdlineLeave * call rpcnotify(g:channel, 'CmdlineLeave', v:event)") - command("autocmd CmdWinEnter * call rpcnotify(g:channel, 'CmdWinEnter', v:event)") - command("autocmd CmdWinLeave * call rpcnotify(g:channel, 'CmdWinLeave', v:event)") + command("autocmd CmdwinEnter * call rpcnotify(g:channel, 'CmdwinEnter', v:event)") + command("autocmd CmdwinLeave * call rpcnotify(g:channel, 'CmdwinLeave', v:event)") end) it('works', function() @@ -163,7 +163,7 @@ describe('cmdline autocommands', function() feed('<c-r>=') eq({ 'notification', 'CmdlineEnter', { { cmdtype = '=', cmdlevel = 2 } } }, next_msg()) feed('<c-f>') - eq({ 'notification', 'CmdWinEnter', { {} } }, next_msg()) + eq({ 'notification', 'CmdwinEnter', { {} } }, next_msg()) feed(':') eq({ 'notification', 'CmdlineEnter', { { cmdtype = ':', cmdlevel = 3 } } }, next_msg()) feed('<c-c>') @@ -172,7 +172,7 @@ describe('cmdline autocommands', function() next_msg() ) feed('<c-c>') - eq({ 'notification', 'CmdWinLeave', { {} } }, next_msg()) + eq({ 'notification', 'CmdwinLeave', { {} } }, next_msg()) feed('1+2<cr>') eq( { 'notification', 'CmdlineLeave', { { cmdtype = '=', cmdlevel = 2, abort = false } } },