aboutsummaryrefslogtreecommitdiff
path: root/runtime/ftplugin/query.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-09-23 16:49:34 +0800
committerGitHub <noreply@github.com>2024-09-23 16:49:34 +0800
commit50577534318bbf8c1e22e80a74baa3b20c131ea8 (patch)
tree7046e252f4d7343e0bc8a50e284ecff839ad7008 /runtime/ftplugin/query.lua
parent423176db565cc182dac8b9562ccb23605f96fa2d (diff)
downloadrneovim-50577534318bbf8c1e22e80a74baa3b20c131ea8.tar.gz
rneovim-50577534318bbf8c1e22e80a74baa3b20c131ea8.tar.bz2
rneovim-50577534318bbf8c1e22e80a74baa3b20c131ea8.zip
fix(runtime): treat b:undo_ftplugin consistently in Lua ftplugins (#30473)
- Don't assume b:undo_ftplugin is set when first modifying it. - Don't assume b:undo_ftplugin already contains some resetting.
Diffstat (limited to 'runtime/ftplugin/query.lua')
-rw-r--r--runtime/ftplugin/query.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/ftplugin/query.lua b/runtime/ftplugin/query.lua
index 945d441971..32d615c65c 100644
--- a/runtime/ftplugin/query.lua
+++ b/runtime/ftplugin/query.lua
@@ -34,5 +34,5 @@ end
-- it's a lisp!
vim.cmd([[runtime! ftplugin/lisp.vim]])
-vim.b.undo_ftplugin = vim.b.undo_ftplugin .. ' | setl omnifunc< iskeyword<'
+vim.b.undo_ftplugin = (vim.b.undo_ftplugin or '') .. '\n setl omnifunc< iskeyword<'
vim.b.undo_ftplugin = vim.b.undo_ftplugin .. ' | call v:lua.vim.treesitter.stop()'