aboutsummaryrefslogtreecommitdiff
path: root/runtime/ftplugin/lua.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/lua.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/lua.lua')
-rw-r--r--runtime/ftplugin/lua.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/ftplugin/lua.lua b/runtime/ftplugin/lua.lua
index 27ebafa196..75deb6b190 100644
--- a/runtime/ftplugin/lua.lua
+++ b/runtime/ftplugin/lua.lua
@@ -1,4 +1,4 @@
-- use treesitter over syntax
vim.treesitter.start()
-vim.b.undo_ftplugin = vim.b.undo_ftplugin .. ' | call v:lua.vim.treesitter.stop()'
+vim.b.undo_ftplugin = (vim.b.undo_ftplugin or '') .. '\n call v:lua.vim.treesitter.stop()'