Fix VIM cw on last character of a word doesn't work as expected:
At the moment, using the default expand_selection seems to do the job well, without the need for some additional logic, which may also make the code a little clearer, Fix #10945
Release Notes:
- N/A
I'd love to delete all the code if we can :D. What happened?
I'd love to delete all the code if we can :D. What happened?
After removing the extra logic, the logic of change is basically similar to delete, for selection, but there are some boundary cases that require them to be different, and I need to confirm a little further XD
Teˇst test after cw should be: Teˇ test, If no additional processing is done, it will become at the moment: Teˇtest, Since our range logic includes spaces, there may still be some additional details to be processed
It seems that we can only add a judgment at the end of an object to deal with the edge case, use a tactical patch, and tidy up the previous code, remove some unnecessary branches, and not modify the original execution logic
Makes sense, thanks. Could you please add a test too so we can avoid regressing this when we want to refactor it.
Makes sense, thanks. Could you please add a test too so we can avoid regressing this when we want to refactor it.
I forgot, thanks for the reminder
Thanks!