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

Strange behavior while moving code using built-in indentation rules in VS Code #319

Closed
kyklish opened this issue Jan 17, 2023 · 3 comments
Closed
Assignees
Labels
bug something isn't working wontfix this will not be worked on

Comments

@kyklish
Copy link
Contributor

kyklish commented Jan 17, 2023

Description

Strange behavior while moving code using built-in indentation rules in VS Code .\language\ahk.configuration.json parameter indentNextLinePattern.

Example

Possible wrong state while moving var

if (expr)
    var
    code
@kyklish kyklish added the bug something isn't working label Jan 17, 2023
@mark-wiemer mark-wiemer added the pre-release affects the most recent prerelease, not the stable release label Jan 18, 2023
@mark-wiemer mark-wiemer mentioned this issue Jan 29, 2023
@mark-wiemer
Copy link
Member

mark-wiemer commented Jan 29, 2023

Hey, this may be related to the comments. I'm not able to repro the issue with this snippet, are you?

var
foo() {
    if expression
        code
    code
    if (expression)
        code
    if (expression) {
        code
    }
    
}

@mark-wiemer mark-wiemer removed the pre-release affects the most recent prerelease, not the stable release label Jan 29, 2023
@kyklish
Copy link
Contributor Author

kyklish commented Jan 30, 2023

Now I see strange behavior in both directions :)

Initial (move var down)

var
if (expr)
    code
code

Expected

if (expr)
    var
code
code

Actual

if (expr)
    var
    code ;<-- why there indent?
code

@kyklish kyklish changed the title Strange behavior while moving code UP using built-in indentation rules in VS Code Strange behavior while moving code using built-in indentation rules in VS Code Jan 30, 2023
@mark-wiemer
Copy link
Member

Closing this as very low impact, I see the same behavior with JS/TS but a quick format resolves the issue :)

@mark-wiemer mark-wiemer closed this as not planned Won't fix, can't repro, duplicate, stale Oct 18, 2024
@mark-wiemer mark-wiemer added the wontfix this will not be worked on label Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something isn't working wontfix this will not be worked on
Projects
Status: Done
Development

No branches or pull requests

2 participants