Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

某些情况下会自动将注释与其他语句交换位置,严重影响调试 #76

Open
cpdroid opened this issue Oct 12, 2019 · 1 comment

Comments

@cpdroid
Copy link

cpdroid commented Oct 12, 2019

一个最小demo如下:

local count=2
if (count > 1) then
	local prePrice = 200
	-- print(prePrice)
else
	print(count)
end

使用本插件格式化后,注释的那句print会与上面的"local prePrice = 200"交换位置,如果此时放开注释,就会出现"prePrice"为空的错误,严重影响调试,奇怪的是把else分支去掉后,就没有这个bug了

@cpdroid cpdroid changed the title ❗某些情况下会自动将注释与其他语句交换位置,严重影响调试 ❗ 某些情况下会自动将注释与其他语句交换位置,严重影响调试 Oct 12, 2019
@cpdroid cpdroid changed the title ❗ 某些情况下会自动将注释与其他语句交换位置,严重影响调试 exclamation 某些情况下会自动将注释与其他语句交换位置,严重影响调试 Oct 12, 2019
@cpdroid cpdroid changed the title exclamation 某些情况下会自动将注释与其他语句交换位置,严重影响调试 某些情况下会自动将注释与其他语句交换位置,严重影响调试 Oct 12, 2019
@liwangqian
Copy link
Owner

這個是luaFmt插件的BUG,我試下看能不能修復。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants