Skip to content

Conversation

@tuurep
Copy link
Contributor

@tuurep tuurep commented Nov 25, 2025

This PR is #292 raised from the dead to address questions in #291 that were never answered

Fix #291
Fix #228
Close #292

All the tests pass, but let me know if more edge cases are known

A limitation of the visual-mode approach is: it messes with the < > marks, try for example:

  1. Select a piece of text with vip, return to normal mode
  2. Now do a dfx
  3. Expect to get selection from 1. with gv
  4. Get some scuffed region

Perhaps should either save and restore the marks, or consider some other approach given in #228 (comment) (@ggandor do you have an opinion on this?)

tomtomjhj and others added 2 commits November 26, 2025 00:04
f1eb049 (fix for justinmk#177) broke
operator-pending mode f when the target is on eol/eof (justinmk#291). Revert
that commit in order to fix justinmk#291, and introduce an alternative fix for
 justinmk#177: exit visual mode if target is not found.

Fixes justinmk#291, justinmk#177
@justinmk
Copy link
Owner

Thanks for taking this up!

A limitation of the visual-mode approach is: it messes with the < > marks, try for example:

if the virtualedit=onemore hack works then that seems better. messing up the '< marks is pretty bad.

@tuurep
Copy link
Contributor Author

tuurep commented Nov 25, 2025

Yeah, I'm currently in the dark how it works but the tests can drive it forward in either case :)

@justinmk justinmk merged commit 0db4a19 into justinmk:master Nov 26, 2025
@justinmk
Copy link
Owner

justinmk commented Nov 26, 2025

True, let's start with this and see how it goes.

@tuurep
Copy link
Contributor Author

tuurep commented Nov 26, 2025

Ah, mind if I open an issue so we remember to look into it later? #321

@tuurep
Copy link
Contributor Author

tuurep commented Nov 26, 2025

Btw @tomtomjhj thank you

@tuurep tuurep deleted the omap-f-rebase-revival branch November 26, 2025 03:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sneak_f in operator-pending mode is incorrect if the target is on eol/eof "omap f <Plug>Sneak_f" does not include last char in buffer (using "co")

3 participants