klorenz / atom-regex-railroad-diagrams

display regex as railroad diagram, if cursor moves to it
MIT License
250 stars 31 forks source link

Plugin does not like files with "hard" TABs #78

Closed BlaM closed 7 years ago

BlaM commented 7 years ago

To reproduce...

Now if you move the cursor into the regular expression everything is fine.

Now if you move the cursor into the regular expression it will break.

This probably causes #77.

stugol commented 7 years ago

Yes, that seems to be the cause. Any chance of a fix? I use this extension a lot.

klorenz commented 7 years ago

Hi @BlaM , this should be fixed by latest release.

I had a workaround, which fixed #58 in the past, when an atom API function did not return correct values (bufferRangeForScopeAtPosition and bufferRangeForScopeAtCursor). This workaround did some calculation with the tabs, which obviously did not work in all cases.

Luckily, the workaround is not needed anymore, because the functions now return correct values (as far I have seen by now).

Best regards