From e20e5ecf0afe91c67dc4646df8c9bc286d202bf4 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 12 Mar 2024 07:19:47 +0800 Subject: vim-patch:9.1.0167: Changing buffer in another window causes it to show matchparen (#27820) Problem: Changing buffer in another window using win_execute() causes it to show matchparen (after 9.0.0969). Solution: Delay highlighting with SafeState in BufWinEnter. (zeertzjq) closes: vim/vim#14177 https://github.com/vim/vim/commit/49ffb6b428e1e053446ec0209558a8f9d0963ae7 --- runtime/plugin/matchparen.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'runtime/plugin') diff --git a/runtime/plugin/matchparen.vim b/runtime/plugin/matchparen.vim index 4235a0d39b..96c54ee6d8 100644 --- a/runtime/plugin/matchparen.vim +++ b/runtime/plugin/matchparen.vim @@ -22,7 +22,8 @@ let s:has_matchaddpos = exists('*matchaddpos') augroup matchparen " Replace all matchparen autocommands - autocmd! CursorMoved,CursorMovedI,WinEnter,BufWinEnter,WinScrolled * call s:Highlight_Matching_Pair() + autocmd! CursorMoved,CursorMovedI,WinEnter,WinScrolled * call s:Highlight_Matching_Pair() + autocmd! BufWinEnter * autocmd SafeState * ++once call s:Highlight_Matching_Pair() autocmd! WinLeave,BufLeave * call s:Remove_Matches() if exists('##TextChanged') autocmd! TextChanged,TextChangedI * call s:Highlight_Matching_Pair() -- cgit From 9711370c26453f3a966b9306111939b144248b41 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 5 Apr 2024 18:08:54 +0800 Subject: feat(defaults): add :Inspect to right-click menu (#28181) Ref #21393 - Move default user commands to _defaults.lua as that now contains all kinds of defaults rather than just default mappings and menus. - Remove the :aunmenu as there are no menus when _defaults.lua is run. --- runtime/plugin/nvim.lua | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 runtime/plugin/nvim.lua (limited to 'runtime/plugin') diff --git a/runtime/plugin/nvim.lua b/runtime/plugin/nvim.lua deleted file mode 100644 index 743d3044b6..0000000000 --- a/runtime/plugin/nvim.lua +++ /dev/null @@ -1,24 +0,0 @@ -vim.api.nvim_create_user_command('Inspect', function(cmd) - if cmd.bang then - vim.print(vim.inspect_pos()) - else - vim.show_pos() - end -end, { desc = 'Inspect highlights and extmarks at the cursor', bang = true }) - -vim.api.nvim_create_user_command('InspectTree', function(cmd) - if cmd.mods ~= '' or cmd.count ~= 0 then - local count = cmd.count ~= 0 and cmd.count or '' - local new = cmd.mods ~= '' and 'new' or 'vnew' - - vim.treesitter.inspect_tree({ - command = ('%s %s%s'):format(cmd.mods, count, new), - }) - else - vim.treesitter.inspect_tree() - end -end, { desc = 'Inspect treesitter language tree for buffer', count = true }) - -vim.api.nvim_create_user_command('EditQuery', function(cmd) - vim.treesitter.query.edit(cmd.fargs[1]) -end, { desc = 'Edit treesitter query', nargs = '?' }) -- cgit From 9b1628da986d2858e7716b769ff2ca229f80a88c Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Wed, 8 May 2024 19:37:48 +0200 Subject: vim-patch:1e34b95e4402 runtime(netrw): Remove and cleanup Win9x legacy from netrw closes: vim/vim#14732 https://github.com/vim/vim/commit/1e34b95e4402fd8964ea4bcee0d2b6ffa6677aab Co-authored-by: Nir Lichtman --- runtime/plugin/netrwPlugin.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'runtime/plugin') diff --git a/runtime/plugin/netrwPlugin.vim b/runtime/plugin/netrwPlugin.vim index ed6f7dc008..c70e6518ff 100644 --- a/runtime/plugin/netrwPlugin.vim +++ b/runtime/plugin/netrwPlugin.vim @@ -2,6 +2,8 @@ " PLUGIN SECTION " Maintainer: This runtime file is looking for a new maintainer. " Date: Feb 09, 2021 +" Last Change: +" 2024 May 08 by Vim Project: cleanup legacy Win9X checks " Former Maintainer: Charles E Campbell " GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim " Copyright: Copyright (C) 1999-2021 Charles E. Campbell {{{1 @@ -35,7 +37,7 @@ augroup FileExplorer au BufLeave * if &ft != "netrw"|let w:netrw_prvfile= expand("%:p")|endif au BufEnter * sil call s:LocalBrowse(expand("")) au VimEnter * sil call s:VimEnter(expand("")) - if has("win32") || has("win95") || has("win64") || has("win16") + if has("win32") au BufEnter .* sil call s:LocalBrowse(expand("")) endif augroup END -- cgit From 48c2ad5d2d79a314502b11c868045d28bc23efab Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 18 May 2024 15:53:26 +0800 Subject: vim-patch:94043780196c (#28831) runtime(matchparen): fix :NoMatchParen not working (vim/vim#14797) fixes: neovim/neovim#28828 https://github.com/vim/vim/commit/94043780196cc66d23eeec10e2c722c6552324e0 --- runtime/plugin/matchparen.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'runtime/plugin') diff --git a/runtime/plugin/matchparen.vim b/runtime/plugin/matchparen.vim index 96c54ee6d8..6c061c9fb8 100644 --- a/runtime/plugin/matchparen.vim +++ b/runtime/plugin/matchparen.vim @@ -1,6 +1,6 @@ " Vim plugin for showing matching parens " Maintainer: The Vim Project -" Last Change: 2023 Oct 20 +" Last Change: 2024 May 18 " Former Maintainer: Bram Moolenaar " Exit quickly when: @@ -218,7 +218,7 @@ command NoMatchParen call s:NoMatchParen() func s:NoMatchParen() let w = winnr() - noau windo silent! call matchdelete(3) + noau windo call s:Remove_Matches() unlet! g:loaded_matchparen exe "noau ". w . "wincmd w" au! matchparen -- cgit