From 50577534318bbf8c1e22e80a74baa3b20c131ea8 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 23 Sep 2024 16:49:34 +0800 Subject: 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. --- runtime/ftplugin/lua.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/ftplugin/lua.lua') 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()' -- cgit