-
Notifications
You must be signed in to change notification settings - Fork 69
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
Pressing Backspace incorrectly removes all spaces/tabs at the beginning of a line #234
Comments
Ok so I modified the code like this and it does fix the problem, however it creates a similar problem when pressing Delete at the beginning of the line:
|
Alright, this should fix both problems:
|
I suppose I could make an option for it, but you can also press Shift+{Backspace} which bypasses the normal Backspace routine. I'll look at what you coded to see if it still keeps the functionality of removing all of the spaces before the beginning of the line. |
It does keep that functionality as long as the caret is at the beginning of the line, before any space/tab. |
Now that I'm reading it again, did you mean it should also remove all spaces/tabs at the end of the previous line once the current line is merged with it? Because it doesn't in both of our versions. |
I never intended it to do that. I do not leave any whitespace at the end of my lines so it never really occurred to me. |
Ok, I'll update my pull request tonight to also fix that. |
Unfortunately, I haven't found anything that could help detecting whitespace at the end of a line in the Scintilla documentation. I don't leave whitespace at the end of lines so that's not a problem for me either. Maybe if there's a way of reversing the order of all the characters of the previous line, removing the indentation at the beginning of the reversed line (if there's any), then reversing the line again? Just throwing an idea out there. |
@maestrith I don't know what you did in your commits for 1.005.37 (all commits between 1.005.00 and 1.005.37 are gone?) but #235 wasn't merged. The code is slightly different than what it was before though. I updated AHK Studio to confirm and the issue still persists. |
I understand it is a QOL, however if you have tabbed lines like in this example:
Pressing Backspace while the caret is at the beginning of the second line will result in
While pressing Backspace while the caret is before KeyWait will result in
I do this all the time and it's really annoying. I had to locally revert the changes from 8a7d1ae at line 421. I think the problem comes from sc.2128(Start) which isn't the beginning of the line but the end of the indentation at the beginning of the line. It should be replaced by something like GETLINEBEGINPOSITION (which I can't seem find or create).
The expected behavior should be the reverse, it should only remove tabs when you're at the beginning of the line (like stated in the commit description).
The text was updated successfully, but these errors were encountered: