Open blueyed opened 6 years ago
I wonder if https://github.com/justinmk/vim-sneak/pull/181 fixes this.
Nope..
Yep, operators won't work properly if the target area extends to the very last column in the buffer, because we cannot "nudge" the cursor beyond the last column (to compensate the default "exclusive" interpretation of the motion). There are two solutions: 1. We can just tell the user to use the 'v' modifier, forcing inclusiveness (:h o_v
) 2. We could set virtualedit
temporarily to onemore
, move the cursor beyond the last column, and then revert virtualedit
with an autocommand after the function has finished. Do we need to bother with this edge case?
We could set
virtualedit
temporarily toonemore
, move the cursor beyond the last column, and then revertvirtualedit
with an autocommand after the function has finished.
good idea! not ideal because it changes the :verbose set virtualedit?
history, but we could be smart about it and only do this hack when this edge case is detected.
Given a minimal vimrc:
cfl
in a buffer that contains only one like "eval" will result inl
being left (and not changed/removed). This appears to be related for when it is at the end of the buffer, i.e. a newline after it will remove the "l" as expected.