Skip to content

Commit 5dc41ce

Browse files
Fixing old comment option error message being spammed
1 parent 7134d3f commit 5dc41ce

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

runtime/plugins/comment/comment.lua

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,14 @@ ft["zscript"] = "// %s"
6363
ft["zsh"] = "# %s"
6464

6565
function updateCommentType(buf)
66-
if buf.Settings["commenttype"] ~= nil then
67-
micro.InfoBar():Error("\"commenttype\" option has been renamed to \"comment.type\"",
68-
", please update your configuration")
69-
end
70-
7166
-- NOTE: Don't use SetOptionNative() to set "comment.type",
7267
-- otherwise "comment.type" can't be reset by a "filetype" change.
7368
if buf.Settings["comment.type"] == "" then
69+
if buf.Settings["commenttype"] ~= nil then
70+
micro.InfoBar():Error("\"commenttype\" option has been renamed to \"comment.type\"",
71+
", please update your configuration")
72+
end
73+
7474
if ft[buf.Settings["filetype"]] ~= nil then
7575
buf.Settings["comment.type"] = ft[buf.Settings["filetype"]]
7676
else

0 commit comments

Comments
 (0)