fix(runtime): avoid E31 in ftplugin (#32578)

fix: twice nunmap in ftplugin
This commit is contained in:
phanium
2025-02-22 21:17:35 +08:00
committed by GitHub
parent 2e5b560482
commit e641155b02
3 changed files with 6 additions and 6 deletions

View File

@@ -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> [["'

View File

@@ -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()'

View File

@@ -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> [["'