Skip to content

atom-alignment crashes Atom when alignment character is a tab char #85

@0bmxa

Description

@0bmxa

Atom: 1.23.2 x64 on macOS
atom-alignment: 0.13.0

Description

I have a few lines I want to align. Those lines all contain the tab character, and I set the alignment character (in atom-alignment Settings) to this tab character as well.

I'm talking about this unprintable tab character (between the brackets): > <

Steps to reproduce

  1. Have e.g. this text in your editor
a	aaaa
bb  bbb
ccc cc
dddd    d

Please note that the spacing is done by tabs instead of spaces. (I don't know if GitHub preserves these here).
2. Go to Atom Preferences > Packages > atom-alignment > Settings and set the Align By to the tab character only (paste it from clipboard, cause pressing the tab key jumps to the input next field).
3. Go back to your editor and start alignment.

Actual outcome

No alignment, and Atom (or the current window) hangs and after a while you get the "do you want to force close" dialog.

Expected outcome

Aligned text, like

a    aaaa
bb   bbb
ccc  cc
dddd d

Disclaimer: This is not a religious statement on tabs vs. spaces, it’s just the data I got from a spreadsheet.

Edit: Updated Atom version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions