-
Notifications
You must be signed in to change notification settings - Fork 11
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
Don't shift one-line functions #38
Comments
I think leaving lines out will confuse users more than wrong indention. Currently, reidention is pretty basic (Just like Notepad++) and has some non-context aware checks. I will improve it in the future however. For now if your source is complex (like the screenshots you posted) just format code at selected lines instead of the whole project. |
Single-line function reindentions are intentional. However there was an issue escaped-newlines on preprocessor directives ( if(a)
if(b)
if(c)
{
c = 0;
} will result in: if(a) //Indention = Scope-depth
if(b) //Indention = Scope-depth + if^
if(c) //Indention = Scope-depth + if^
{
c = 0;
} and now it results in: if(a)
if(b)
if(c)
{
c = 0;
} just like Notepad++. |
Yes. I removed the after-statement shift. It was quite buggy if used with multiple statements, explained above. Now it works like Notepad++'s format code. |
I will bring it back eventualy. But im not using the old system for that nor do i bring the old thing back. But you can use an older BasicPawn version to still format your code like that. But youll have to wait a little while for the new system. |
Autoformat always shifts one-line ( without { } ) functions (and not only functions, can be also inside loops). Would be better if autoformat will not touch it.
And some from GitHub:
The text was updated successfully, but these errors were encountered: