-
-
Notifications
You must be signed in to change notification settings - Fork 84
Slice fails sometimes if using tabs. #1586
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
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:
The text was updated successfully, but these errors were encountered: