Skip to content
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

Sneak_f in operator-pending mode is incorrect if the target is on eol/eof #291

Open
tomtomjhj opened this issue Mar 31, 2022 · 2 comments · May be fixed by #292
Open

Sneak_f in operator-pending mode is incorrect if the target is on eol/eof #291

tomtomjhj opened this issue Mar 31, 2022 · 2 comments · May be fixed by #292

Comments

@tomtomjhj
Copy link
Contributor

Configuration (tested on latest nvim/vim):

omap f <Plug>Sneak_f

Buggy cases:

  • cursor on q, run dfy
    qwerty
    
    • expected:
      
      
    • actual behavior: the target char is not deleted
      y
      
  • cursor on q, run dfy
    qwerty
    a
    
    • expected:
      
      a
      
    • actual behavior: deletes newline char
      a
      
tomtomjhj added a commit to tomtomjhj/vim-sneak that referenced this issue Mar 31, 2022
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
tomtomjhj added a commit to tomtomjhj/vim-sneak that referenced this issue Mar 31, 2022
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
@tomtomjhj tomtomjhj linked a pull request Mar 31, 2022 that will close this issue
@tomtomjhj tomtomjhj changed the title Sneak_f in operator-pending mode is incorrect if the target is on eol Sneak_f in operator-pending mode is incorrect if the target is on eol/eof Mar 31, 2022
@ggandor
Copy link
Contributor

ggandor commented Aug 16, 2022

The first one is a duplicate of #228. The second one I cannot reproduce.

@justinmk
Copy link
Owner

justinmk commented Aug 21, 2022

Thanks @ggandor ! Does #292 fix #228 ? I've been hesitating here because of lack of test coverage.

tomtomjhj added a commit to tomtomjhj/vim-sneak that referenced this issue Jul 11, 2023
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
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 a pull request may close this issue.

3 participants