fix(operators): correctly handle newlines at start of textobject#2248
fix(operators): correctly handle newlines at start of textobject#2248echasnovski merged 1 commit intonvim-mini:backlogfrom
Conversation
|
If it is a change in Also, I am a bit hesitant to yet merge this as it doesn't address both problems of #2247. |
On it.
Fair. I'll try to take a look at what may be causing the issue with the trailing newline tomorrow |
|
I changed the commit message to include newlines at the We would be accepting that this is a current limitation of Neovim and the behavior is expected. |
|
Could you please move cache-set-unset of 'virtualedit' at least inside Also, please add the same one-line comment above each 'virtualedit' caching describing why this is needed. For tests, it looks like the behavior is Visual mode specific. So could you please move them after |
|
I currently have time to finish nit-picking parts myself. Hope to merge into |
|
The first version of this (with only After looking more closely, having all "cache-set-unset" separate didn't gain much. The only case is for "replace" to act less wrong on trailing newline. The problem is that the resulting behavior is still wrong (replacing a region with itself should have produced the same text, not add another line). So as the first version is much simpler and to the point, let's go with that one. Thanks for all the deep research and PR to make 'mini.operators' better in this very narrow use case :) |
Partially fixes #2247