aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorphanium <91544758+phanen@users.noreply.github.com>2025-02-22 21:17:35 +0800
committerGitHub <noreply@github.com>2025-02-22 14:17:35 +0100
commite641155b023c3e8164927248f937e2a5fcdc48e2 (patch)
tree691a02a50ba716fec521f0fcbcb71884bc6b1872
parent2e5b560482fb76342387e7183283efe9d431f114 (diff)
downloadrneovim-e641155b023c3e8164927248f937e2a5fcdc48e2.tar.gz
rneovim-e641155b023c3e8164927248f937e2a5fcdc48e2.tar.bz2
rneovim-e641155b023c3e8164927248f937e2a5fcdc48e2.zip
fix(runtime): avoid E31 in ftplugin (#32578)
fix: twice nunmap in ftplugin
-rw-r--r--runtime/ftplugin/checkhealth.lua4
-rw-r--r--runtime/ftplugin/help.lua4
-rw-r--r--runtime/ftplugin/markdown.lua4
3 files changed, 6 insertions, 6 deletions
diff --git a/runtime/ftplugin/checkhealth.lua b/runtime/ftplugin/checkhealth.lua
index 232846fa47..d0f8cec074 100644
--- a/runtime/ftplugin/checkhealth.lua
+++ b/runtime/ftplugin/checkhealth.lua
@@ -10,5 +10,5 @@ vim.keymap.set('n', '[[', function()
end, { buffer = 0, silent = false, desc = 'Jump to previous section' })
vim.b.undo_ftplugin = (vim.b.undo_ftplugin or '')
- .. '\n exe "nunmap <buffer> gO"'
- .. '\n exe "nunmap <buffer> ]]" | exe "nunmap <buffer> [["'
+ .. '\n sil! exe "nunmap <buffer> gO"'
+ .. '\n sil! exe "nunmap <buffer> ]]" | sil! exe "nunmap <buffer> [["'
diff --git a/runtime/ftplugin/help.lua b/runtime/ftplugin/help.lua
index f3bc28c552..e19571454d 100644
--- a/runtime/ftplugin/help.lua
+++ b/runtime/ftplugin/help.lua
@@ -118,6 +118,6 @@ vim.keymap.set('n', 'g==', function()
end, { buffer = true })
vim.b.undo_ftplugin = (vim.b.undo_ftplugin or '')
- .. '\n exe "nunmap <buffer> gO" | exe "nunmap <buffer> g=="'
- .. '\n exe "nunmap <buffer> ]]" | exe "nunmap <buffer> [["'
+ .. '\n sil! exe "nunmap <buffer> gO" | sil! exe "nunmap <buffer> g=="'
+ .. '\n sil! exe "nunmap <buffer> ]]" | sil! exe "nunmap <buffer> [["'
vim.b.undo_ftplugin = vim.b.undo_ftplugin .. ' | call v:lua.vim.treesitter.stop()'
diff --git a/runtime/ftplugin/markdown.lua b/runtime/ftplugin/markdown.lua
index 9319ca7757..d9958706c8 100644
--- a/runtime/ftplugin/markdown.lua
+++ b/runtime/ftplugin/markdown.lua
@@ -10,5 +10,5 @@ vim.keymap.set('n', '[[', function()
end, { buffer = 0, silent = false, desc = 'Jump to previous section' })
vim.b.undo_ftplugin = (vim.b.undo_ftplugin or '')
- .. '\n exe "nunmap <buffer> gO"'
- .. '\n exe "nunmap <buffer> ]]" | exe "nunmap <buffer> [["'
+ .. '\n sil! exe "nunmap <buffer> gO"'
+ .. '\n sil! exe "nunmap <buffer> ]]" | sil! exe "nunmap <buffer> [["'