Patch 9.0.0572
Problem: Insert complete tests leave a mapping behind.
Solution: Use a buffer-local mapping. (closes #11211)
Files: src/testdir/test_ins_complete.vim
*** ../vim-9.0.0571/src/testdir/test_ins_complete.vim 2022-09-24
11:17:48.373970710 +0100
--- src/testdir/test_ins_complete.vim 2022-09-24 14:06:48.396945358 +0100
***************
*** 701,708 ****
" Test for using complete() with completeopt+=longest
func Test_complete_with_longest()
- inoremap <f3> <cmd>call complete(1, ["iaax", "iaay", "iaaz"])<cr>
new
" default: insert first match
set completeopt&
--- 701,708 ----
" Test for using complete() with completeopt+=longest
func Test_complete_with_longest()
new
+ inoremap <buffer> <f3> <cmd>call complete(1, ["iaax", "iaay", "iaaz"])<cr>
" default: insert first match
set completeopt&
***************
*** 716,721 ****
--- 716,722 ----
exe "normal Aa\<f3>\<esc>"
call assert_equal('iaa', getline(1))
set completeopt&
+ bwipe!
endfunc
***************
*** 1272,1278 ****
" A mapping is not used for the key after CTRL-X.
func Test_no_mapping_for_ctrl_x_key()
new
! inoremap <C-K> <Cmd>let was_mapped = 'yes'<CR>
setlocal dictionary=README.txt
call feedkeys("aexam\<C-X>\<C-K> ", 'xt')
call assert_equal('example ', getline(1))
--- 1273,1279 ----
" A mapping is not used for the key after CTRL-X.
func Test_no_mapping_for_ctrl_x_key()
new
! inoremap <buffer> <C-K> <Cmd>let was_mapped = 'yes'<CR>
setlocal dictionary=README.txt
call feedkeys("aexam\<C-X>\<C-K> ", 'xt')
call assert_equal('example ', getline(1))
*** ../vim-9.0.0571/src/version.c 2022-09-24 13:10:00.739938625 +0100
--- src/version.c 2022-09-24 14:06:38.856999233 +0100
***************
*** 701,702 ****
--- 701,704 ----
{ /* Add new patch number below this line */
+ /**/
+ 572,
/**/
--
hundred-and-one symptoms of being an internet addict:
162. You go outside and look for a brightness knob to turn down the sun.
/// 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/20220924130856.713001C0615%40moolenaar.net.