1
0
forked from aniani/vim

patch 8.2.5012: cannot select one character inside ()

Problem:    Cannot select one character inside ().
Solution:   Do not try to extend the area if it is empty. (closes #10472,
            closes #6616)
This commit is contained in:
LemonBoy
2022-05-24 11:49:31 +01:00
committed by Bram Moolenaar
parent 971f6825ee
commit 53737b5eee
3 changed files with 24 additions and 2 deletions

View File

@@ -1133,8 +1133,10 @@ current_block(
/*
* In Visual mode, when the resulting area is not bigger than what we
* started with, extend it to the next block, and then exclude again.
* Don't try to expand the area if the area is empty.
*/
if (!LT_POS(start_pos, old_start) && !LT_POS(old_end, curwin->w_cursor)
&& !EQUAL_POS(start_pos, curwin->w_cursor)
&& VIsual_active)
{
curwin->w_cursor = old_start;