Closed abysas closed 11 years ago
abysas, thanks a lot for reporting this issue. i appreciate your feedback and thorough example :) though after some thought, i think ignoring whitespace during sorting would reduce possible use cases of the plugin. i would usually recommend to keep indentation/ white space consistent by using either tabs or spaces. (there is a "reformat" option for that in the code menu, CTRL + ALT + L). or can you tell me any reason to intentionally mix whitespace styles (and then sort ignoring it) that i might not have thought of?
Not sure that it is a bug or is intended by design, but at the first glance it seemed like a bug: when sorting lines in multi-line selection, plugin sorts separately lines that begin with tab charcter and lines that begin with spaces. Therefore I got strange sorting result which seemed like a bug of the plugin until I turned on whitespace display on IDE which revealed the reason.
As an example here if I sort these lines (where field name in each line indicate how this line starts):
and as a result got:
I guess sorting should ignore whitespace at the beginning.
I use Shifter plugin v1.0.11 on Intellij IDEA v11.1.4