Patch 8.2.4237
Problem: Record buffer wrong if character in Select mode was not typed.
Solution: Only delete the tail from the record buffer if the character was
typed. (closes #9650)
Files: src/normal.c, src/testdir/test_registers.vim
*** ../vim-8.2.4236/src/normal.c 2022-01-27 13:16:54.328078845 +0000
--- src/normal.c 2022-01-28 12:50:03.672668808 +0000
***************
*** 1054,1062 ****
// be mapped in Insert mode. Required for ":lmap" to work.
len = ins_char_typebuf(vgetc_char, vgetc_mod_mask);
! // When recording the character will be recorded again, remove the
! // previously recording.
! ungetchars(len);
if (restart_edit != 0)
c = 'd';
--- 1054,1063 ----
// be mapped in Insert mode. Required for ":lmap" to work.
len = ins_char_typebuf(vgetc_char, vgetc_mod_mask);
! // When recording and gotchars() was called the character will be
! // recorded again, remove the previous recording.
! if (KeyTyped)
! ungetchars(len);
if (restart_edit != 0)
c = 'd';
*** ../vim-8.2.4236/src/testdir/test_registers.vim 2022-01-27
19:27:10.450531357 +0000
--- src/testdir/test_registers.vim 2022-01-28 12:46:14.091980752 +0000
***************
*** 745,750 ****
--- 745,761 ----
sil norm q0 0
sil norm q
call assert_equal('0ext', getline(1))
+
+ %delete
+ let @r = ''
+ call setline(1, ['abc', 'abc', 'abc'])
+ smap <F2> <Right><Right>,
+ call feedkeys("qrgh\<F2>Dk\<Esc>q", 'xt')
+ call assert_equal("gh\<F2>Dk\<Esc>", @r)
+ norm j0@rj0@@
+ call assert_equal([',Dk', ',Dk', ',Dk'], getline(1, 3))
+ sunmap <F2>
+
bwipe!
endfunc
*** ../vim-8.2.4236/src/version.c 2022-01-27 21:56:37.253698701 +0000
--- src/version.c 2022-01-28 12:50:28.964342463 +0000
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 4237,
/**/
--
A M00se once bit my sister ...
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20220128125245.8416B1C1933%40moolenaar.net.