mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-17 06:17:12 +09:00
plugins/comment: Don't write to b.Settings directly
...and use `SetOptionNative()` instead.
This commit is contained in:
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user