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

Blockwise deletion with charwise choice (i.e. dva}) misses last brace #28163

Open
hardenedapple opened this issue Apr 3, 2024 · 3 comments
Open
Labels
bug-vim wrong behavior inherited from vim needs:vim-patch upstream issue that needs to be fixed in vim first

Comments

@hardenedapple
Copy link
Contributor

Problem

When spanning multiple lines, da} acts likewise.
One would use dva} to force charwise action.
This mostly works, except that the last character is not deleted.

Steps to reproduce

Editing the text below (with nvim --clean):

abcd{
  hello
  }abcd

Position cursor in between braces.
Type dva}.
Observe that file now contains abcd}abcd

Expected behavior

File should contain abcdabcd.

Neovim version (nvim -v)

NVIM v0.9.5, Also v0.10.0-dev-2574+g41fb98d6f

Vim (not Nvim) behaves the same?

Yes, 8.2 and 9.1

Operating system/version

Linux -- both Arch and Ubuntu

Terminal name/version

XTerm(390)

$TERM environment variable

xterm-256color (also happens inside tux)

Installation

original vim installed using package manager, nvim installed from source.

@hardenedapple hardenedapple added the bug issues reporting wrong behavior label Apr 3, 2024
@zeertzjq
Copy link
Member

zeertzjq commented Apr 3, 2024

This is working as intended:

							*o_v*
v		When used after an operator, before the motion command: Force
		the operator to work charwise, also when the motion is
		linewise.  If the motion was linewise, it will become
		|exclusive|.
		If the motion already was charwise, toggle
		inclusive/exclusive.  This can be used to make an exclusive
		motion inclusive and an inclusive motion exclusive.

However, it seems that the toggling of inclusive/exclusive isn't working.

@zeertzjq
Copy link
Member

zeertzjq commented Apr 3, 2024

When spanning multiple lines, da} acts likewise.

What is "likewise"? I tested this and it acts charwise.

@zeertzjq zeertzjq added the needs:response waiting for reply from the author label Apr 3, 2024
@hardenedapple
Copy link
Contributor Author

When spanning multiple lines, da} acts likewise.

What is "likewise"? I tested this and it acts charwise.

Hmm ... I could have sworn I tested it and saw it act linewise, but it's clearly not doing that for me now.
No idea what I did differently then to now ...

@github-actions github-actions bot removed the needs:response waiting for reply from the author label Apr 3, 2024
@zeertzjq zeertzjq added bug-vim wrong behavior inherited from vim needs:vim-patch upstream issue that needs to be fixed in vim first and removed bug issues reporting wrong behavior labels Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-vim wrong behavior inherited from vim needs:vim-patch upstream issue that needs to be fixed in vim first
Projects
None yet
Development

No branches or pull requests

2 participants