From a678d42861b3b609cf872f2dd95fbd346c3c58dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6ran=20Karl?= <3951388+JoeKar@users.noreply.github.com> Date: Sun, 11 Aug 2024 17:49:49 +0200 Subject: [PATCH] plugins/comment: Don't write to `b.Settings` directly ...and use `SetOptionNative()` instead. --- runtime/plugins/comment/comment.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/plugins/comment/comment.lua b/runtime/plugins/comment/comment.lua index 034c4904..f86da945 100644 --- a/runtime/plugins/comment/comment.lua +++ b/runtime/plugins/comment/comment.lua @@ -66,9 +66,9 @@ local last_ft function updateCommentType(buf) if buf.Settings["commenttype"] == nil or (last_ft ~= buf.Settings["filetype"] and last_ft ~= nil) then if ft[buf.Settings["filetype"]] ~= nil then - buf.Settings["commenttype"] = ft[buf.Settings["filetype"]] + buf:SetOptionNative("commenttype", ft[buf.Settings["filetype"]]) else - buf.Settings["commenttype"] = "# %s" + buf:SetOptionNative("commenttype", "# %s") end last_ft = buf.Settings["filetype"]