mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 03:05:11 -07:00
vim-patch:8.2.2938: after using motion force from feedkeys() it sticks (#15240)
Problem: After using motion force from feedkeys() it may not be reset.
Solution: Clear motion_force in clearop(). (closes vim/vim#8323)
21492743e8
This commit is contained in:
parent
4e66e74fd7
commit
b35de6c525
@ -3277,6 +3277,7 @@ static void clearop(oparg_T *oap)
|
||||
oap->regname = 0;
|
||||
oap->motion_force = NUL;
|
||||
oap->use_reg_one = false;
|
||||
motion_force = NUL;
|
||||
}
|
||||
|
||||
static void clearopbeep(oparg_T *oap)
|
||||
|
@ -861,6 +861,15 @@ func Test_visual_block_mode()
|
||||
set tabstop& shiftwidth&
|
||||
endfunc
|
||||
|
||||
func Test_visual_force_motion_feedkeys()
|
||||
onoremap <expr> i- execute('let g:mode = mode(1)')
|
||||
call feedkeys('dvi-', 'x')
|
||||
call assert_equal('nov', g:mode)
|
||||
call feedkeys('di-', 'x')
|
||||
call assert_equal('no', g:mode)
|
||||
ounmap i-
|
||||
endfunc
|
||||
|
||||
" Test block-insert using cursor keys for movement
|
||||
func Test_visual_block_insert_cursor_keys()
|
||||
new
|
||||
|
Loading…
Reference in New Issue
Block a user