Open Emberstorm-John opened 1 year ago
This is almost certainly due to the fact that we're counting characters, rather than using display characters. Not sure if there's a way to use the latter, but that would solve this issue. wdyt @AndreasArvidsson?
I agree, but there is no way to do that to my knowledge.
I think it's probably doable. I believe there is a setting which will tell us the tab width, and then we can try to reproduce VSCode's tab display logic. It feels a bit dicey tho tbh, and things get even more confusing with grapheme clusters (see #1264), which are multiple javascript characters but show as a single display char. VSCode's logic for determining display columns is gnarly, so I'd be a bit nervous to try to reproduce it. We could try to handle the simple tab case, then leverage #1264 once we have that to make it even fancier. Prob not too bad
@Emberstorm-John you mentioned on slack you usually do this sort of thing by mouse and keyboard. Curious how you do that
You can click top left corner of the rectangle and then click the bottom right with shift+alt+click. That is how I got the expected results screenshot.
Command used:
Take made past play rangle take slice yellow cross rangle
Behaviour:
Expected Behaviour:
Example code: