mirror of
https://github.com/zyedidia/micro.git
synced 2025-06-18 14:55:38 -04:00
plugins/comment: Don't write to b.Settings
directly
...and use `SetOptionNative()` instead.
This commit is contained in:
parent
0542765d95
commit
a678d42861
@ -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"]
|
||||
|
Loading…
Reference in New Issue
Block a user