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

Nothing selected inside "(a)" in one-character case of 'vib' with selection=exclusive #6616

Closed
rparenzs opened this issue Aug 4, 2020 · 1 comment

Comments

@rparenzs
Copy link

rparenzs commented Aug 4, 2020

With "set selection=exclusive", if there is only one character between the parentheses, eg '(a)', and the cursor is on the character, then 'vib' does not select anything, where it should select the one character ('a' in this case). Notably, if the cursor is on either parenthesis, then it works correctly. Also fails for vi[, vi{, vi<.

Tested with "gvim --clean" on vim(32-bit) 8.2.1313 on Windows 10-64

@tonymec
Copy link

tonymec commented Aug 4, 2020

I confirm the problem on gvim 8.2.1360 with GTK2 GUI on Linux. On a line containing

(x)

vib or vi(
(with the cursor on x) remains in Visual mode without selecting anything; but

vib or vi(
(with the cursor on a parenthesis) selects the x and moves the cursor to the right parenthesis; and

yib or yi(
yank the single x character into the unnamed register, moving the cursor on the x if it was on a parenthesis.
To make sure, I used
:let @@ = ""
before each yank.

Best regards,
Tony.

LemonBoy added a commit to LemonBoy/vim that referenced this issue May 23, 2022
zeertzjq added a commit to zeertzjq/neovim that referenced this issue May 24, 2022
Problem:    Cannot select one character inside ().
Solution:   Do not try to extend the area if it is empty. (closes vim/vim#10472,
            closes vim/vim#6616)
vim/vim@53737b5
zeertzjq added a commit to neovim/neovim that referenced this issue May 24, 2022
Problem:    Cannot select one character inside ().
Solution:   Do not try to extend the area if it is empty. (closes vim/vim#10472,
            closes vim/vim#6616)
vim/vim@53737b5
kraftwerk28 pushed a commit to kraftwerk28/neovim that referenced this issue Jun 1, 2022
Problem:    Cannot select one character inside ().
Solution:   Do not try to extend the area if it is empty. (closes vim/vim#10472,
            closes vim/vim#6616)
vim/vim@53737b5
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.

2 participants