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

moveLinesUpAction indentation broken after if statement #692

Open
safield opened this issue Oct 28, 2018 · 1 comment
Open

moveLinesUpAction indentation broken after if statement #692

safield opened this issue Oct 28, 2018 · 1 comment
Assignees

Comments

@safield
Copy link

safield commented Oct 28, 2018

Version: 1.29.0-insider
Commit: 5d68db08cda5accef740c69541178911b865d069
Date: 2018-10-26T05:13:31.757Z
Electron: 2.0.12
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64

Java Language Extension version: 0.33.0

OS: Linux Mint 19

When I run the command moveLinesUpAction/DownAction, indentation can be affected when deemed proper. In certain cases indentation is erroneously affected. The erroneous behaviour is not present when Java Language Support Extension is disabled or removed.

Observe the following code:

if (blah)
    someCode;

line1;
line2;

This code is properly indented and syntactically correct.

  1. Put the caret at line2 and run moveLinesUpAction
  2. Observe that in addition to swapping lines 1 and 2, line2 will erroneously have its indentation affected by adding an additional tab in front of it.

The previously error is rectified by adding brackets to the already syntactically correct if statement.

if (blah) {
    someCode;
}

line1;
line2;

In this new example, running moveLinesUpAction/DownAction will not affect the indentation of line1/line2.

@parthasaradhie
Copy link

I'm still facing this issue any update on this?

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

No branches or pull requests

3 participants