forked from aniani/vim
patch 9.1.0012: regression with empty inner blocks introduced
Problem: regression with empty inner blocks introduced (after v9.1.0007) Solution: Set correct cursor position, Check for visual mode being active (Maxim Kim) relates: #13514 closes: #13819 Signed-off-by: Maxim Kim <habamax@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
7b7672d5ca
commit
3779516988
@@ -1131,10 +1131,15 @@ current_block(
|
||||
break;
|
||||
}
|
||||
|
||||
if (EQUAL_POS(start_pos, *end_pos))
|
||||
// empty block like this: ()
|
||||
// there is no inner block to select, abort
|
||||
/*
|
||||
* In Visual mode, when resulting area is empty
|
||||
* i.e. there is no inner block to select, abort.
|
||||
*/
|
||||
if (EQUAL_POS(start_pos, *end_pos) && VIsual_active)
|
||||
{
|
||||
curwin->w_cursor = old_pos;
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
/*
|
||||
* In Visual mode, when the resulting area is not bigger than what we
|
||||
|
Reference in New Issue
Block a user