mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 01:16:31 +00:00
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: vim/vim#13514
closes: vim/vim#13819
3779516988
Co-authored-by: Maxim Kim <habamax@gmail.com>
This commit is contained in:
@@ -955,9 +955,10 @@ int current_block(oparg_T *oap, int count, bool include, int what, int other)
|
||||
}
|
||||
}
|
||||
|
||||
if (equalpos(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 (equalpos(start_pos, *end_pos) && VIsual_active) {
|
||||
curwin->w_cursor = old_pos;
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user