Patch 8.2.2938
Problem: After using motion force from feedkeys() it may not be reset.
Solution: Clear motion_force in clearop(). (closes #8323)
Files: src/normal.c, src/testdir/test_visual.vim
*** ../vim-8.2.2937/src/normal.c 2021-06-03 22:11:04.418516318 +0200
--- src/normal.c 2021-06-04 21:53:33.680182967 +0200
***************
*** 1750,1755 ****
--- 1750,1756 ----
oap->regname = 0;
oap->motion_force = NUL;
oap->use_reg_one = FALSE;
+ motion_force = NUL;
}
void
*** ../vim-8.2.2937/src/testdir/test_visual.vim 2021-05-31 19:22:58.583454940 +0200
--- src/testdir/test_visual.vim 2021-06-04 21:53:13.384224554 +0200
***************
*** 913,918 ****
--- 913,927 ----
set tabstop& shiftwidth&
endfunc
+ func Test_visual_force_motion_feedkeys()
+ onoremap <expr> i- execute('let g:mode = mode(1)')->slice(0, 0)
+ 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
*** ../vim-8.2.2937/src/version.c 2021-06-04 21:09:51.725329002 +0200
--- src/version.c 2021-06-04 21:44:58.673223132 +0200
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 2938,
/**/
--
ARTHUR: If you do not open these doors, we will take this castle by force ...
[A bucket of slops land on ARTHUR. He tries to retain his dignity.]
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- Br...@Moolenaar.net --
http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features --
http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims --
http://ICCF-Holland.org ///