Skip to content

Commit a678d42

Browse files
committed
plugins/comment: Don't write to b.Settings directly
...and use `SetOptionNative()` instead.
1 parent 0542765 commit a678d42

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

runtime/plugins/comment/comment.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ local last_ft
6666
function updateCommentType(buf)
6767
if buf.Settings["commenttype"] == nil or (last_ft ~= buf.Settings["filetype"] and last_ft ~= nil) then
6868
if ft[buf.Settings["filetype"]] ~= nil then
69-
buf.Settings["commenttype"] = ft[buf.Settings["filetype"]]
69+
buf:SetOptionNative("commenttype", ft[buf.Settings["filetype"]])
7070
else
71-
buf.Settings["commenttype"] = "# %s"
71+
buf:SetOptionNative("commenttype", "# %s")
7272
end
7373

7474
last_ft = buf.Settings["filetype"]

0 commit comments

Comments
 (0)