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

move-line-up/down command breaks JSX indentation #150

Closed
jgebhardt opened this issue Mar 3, 2016 · 4 comments
Closed

move-line-up/down command breaks JSX indentation #150

jgebhardt opened this issue Mar 3, 2016 · 4 comments

Comments

@jgebhardt
Copy link

Repro steps

Using the following test file:

<div>
  <div>
    <p>
      first line
    </p>
  </div>
  <div>second line</div>
</div>

Select the first child of the enclosing <div />:
screen shot 2016-03-03 at 12 49 08 pm

Use the editor:move-line-down / editor:move-line-up (cmd+ctrl+up/down) command to move the selection around. This breaks the indentation by setting each line to the first line's indent level.

screen shot 2016-03-03 at 12 49 17 pm

@gandm
Copy link
Owner

gandm commented Mar 3, 2016

OK Thanks. I'll take a look. In the meantime just cursor into the last row moved and it will re-indent the previous rows.

@gandm
Copy link
Owner

gandm commented Mar 4, 2016

@jgebhardt Looks like I'm indenting it correctly but on return Atom re-indents at https://github.com/atom/atom/blob/master/src/language-mode.coffee#L235 using the previous line's indent.

I may have to monkey patch this method which I'd hoped to avoid.

@gandm gandm closed this as completed in 89d539e Mar 4, 2016
@gandm
Copy link
Owner

gandm commented Mar 11, 2016

Incorrect scopes returned by atom.

@gandm gandm reopened this Mar 11, 2016
@gandm
Copy link
Owner

gandm commented Mar 11, 2016

@jgebhardt Should now be fixed in 2.15.6 release.

@gandm gandm closed this as completed Mar 11, 2016
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