aheze / Multiliner

An Xcode source extension to expand lengthy lines.
https://twitter.com/aheze0/status/1541578738239885312
MIT License
827 stars 23 forks source link

Does not support tabs indentation #11

Closed fedulvtubudul closed 2 years ago

fedulvtubudul commented 2 years ago

If I indent with spaces:

spaces_1

result is OK:

spaces_2

But when tabs are used:

tabs_1

result is just a mess of tabs and spaces (which is never correct):

tabs_2

fedulvtubudul commented 2 years ago

Probably invocation.buffer.usesTabsForIndentation should be checked. Now it seems to be ignored, as you always generate the tab this way: let tab = String(repeating: " ", count: invocation.buffer.indentationWidth).

aheze commented 2 years ago

Thanks for report, will check let tab = String(repeating: " ", count: invocation.buffer.indentationWidth)

aheze commented 2 years ago

@fedulvtubudul fixed in 1.1! https://github.com/aheze/Multiliner/releases/tag/1.1.0