Patch 8.2.2870
Problem: CmdlineChange event triggered twice for CTRL-R.
Solution: Return CMDLINE_NOT_CHANGED from cmdline_insert_reg().
(closes #8219)
Files: src/ex_getln.c, src/testdir/test_cmdline.vim
*** ../vim-8.2.2869/src/ex_getln.c 2021-05-15 15:09:02.144699051 +0200
--- src/ex_getln.c 2021-05-18 21:36:28.647614907 +0200
***************
*** 1253,1260 ****
}
#endif
}
redrawcmd();
! return CMDLINE_CHANGED;
}
/*
--- 1253,1263 ----
}
#endif
}
+ // remove the double quote
redrawcmd();
!
! // The text has been stuffed, the command line didn't change yet.
! return CMDLINE_NOT_CHANGED;
}
/*
*** ../vim-8.2.2869/src/testdir/test_cmdline.vim 2021-05-15 13:19:12.195816386 +0200
--- src/testdir/test_cmdline.vim 2021-05-18 21:35:58.399747045 +0200
***************
*** 1810,1815 ****
--- 1810,1821 ----
call feedkeys(":\<F1>\<CR>", 'xt')
call assert_equal(['l', 'ls'], g:log)
+ let @b = 'b'
+ cnoremap <F1> a<C-R>b
+ let g:log = []
+ call feedkeys(":\<F1>\<CR>", 'xt')
+ call assert_equal(['a', 'ab'], g:log)
+
unlet g:log
cunmap <F1>
augroup test
*** ../vim-8.2.2869/src/version.c 2021-05-18 19:18:58.840868977 +0200
--- src/version.c 2021-05-18 21:38:26.891096033 +0200
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 2870,
/**/
--
Just think of all the things we haven't thought of yet.
/// 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 ///