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

Strange behavior of ~ #158

Open
cideM opened this issue Jan 8, 2023 · 0 comments
Open

Strange behavior of ~ #158

cideM opened this issue Jan 8, 2023 · 0 comments

Comments

@cideM
Copy link

cideM commented Jan 8, 2023

I have the following configuration:

        let g:sandwich_no_default_key_mappings = 1
        silent! nmap <unique><silent> gd <Plug>(operator-sandwich-delete)<Plug>(operator-sandwich-release-count)<Plug>(textobj-sandwich-query-a)
        silent! nmap <unique><silent> gr <Plug>(operator-sandwich-replace)<Plug>(operator-sandwich-release-count)<Plug>(textobj-sandwich-query-a)
        silent! nmap <unique><silent> gdb <Plug>(operator-sandwich-delete)<Plug>(operator-sandwich-release-count)<Plug>(textobj-sandwich-auto-a)
        silent! nmap <unique><silent> grb <Plug>(operator-sandwich-replace)<Plug>(operator-sandwich-release-count)<Plug>(textobj-sandwich-auto-a)

        let g:operator_sandwich_no_default_key_mappings = 1
        silent! map <unique> ga <Plug>(operator-sandwich-add)
        silent! xmap <unique> gd <Plug>(operator-sandwich-delete)
        silent! xmap <unique> gr <Plug>(operator-sandwich-replace)

        silent! omap <unique> ib <Plug>(textobj-sandwich-auto-i)
        silent! xmap <unique> ib <Plug>(textobj-sandwich-auto-i)
        silent! omap <unique> ab <Plug>(textobj-sandwich-auto-a)
        silent! xmap <unique> ab <Plug>(textobj-sandwich-auto-a)

        silent! omap <unique> iq <Plug>(textobj-sandwich-query-i)
        silent! xmap <unique> iq <Plug>(textobj-sandwich-query-i)
        silent! omap <unique> aq <Plug>(textobj-sandwich-query-a)
        silent! xmap <unique> aq <Plug>(textobj-sandwich-query-a)

        silent! xmap <unique> im <Plug>(textobj-sandwich-literal-query-i)
        silent! xmap <unique> am <Plug>(textobj-sandwich-literal-query-a)
        silent! omap <unique> im <Plug>(textobj-sandwich-literal-query-i)
        silent! omap <unique> am <Plug>(textobj-sandwich-literal-query-a)

Here's what happens:

~foo~
 ^-- cursor

viq~ selects foo which is correct.


~foo~
^-- cursor

viq~ selects foo which is correct.


~~foo~~
 ^-- cursor

viq~ selects nothing, which is unexpected


~~foo~~
^-- cursor

viq~ selects nothing, which is unexpected

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

No branches or pull requests

1 participant