Patch 8.2.4502
Problem: In the GUI a modifier is not recognized for the key typed after
CTRL-X, which may result in a mapping to be used. (Daniel
Steinberg)
Solution: Recognize a modifier starting with CSI. (closes #9889)
Files: src/getchar.c, src/testdir/test_ins_complete.vim
*** ../vim-8.2.4501/src/getchar.c 2022-03-03 13:55:34.155276058 +0000
--- src/getchar.c 2022-03-04 14:42:04.712161330 +0000
***************
*** 2331,2337 ****
int c = *p;
if (typebuf.tb_len > 3
! && c == K_SPECIAL
&& p[1] == KS_MODIFIER
&& (p[2] & MOD_MASK_CTRL))
c = p[3] & 0x1f;
--- 2331,2337 ----
int c = *p;
if (typebuf.tb_len > 3
! && (c == K_SPECIAL || c == CSI) // CSI is used by the GUI
&& p[1] == KS_MODIFIER
&& (p[2] & MOD_MASK_CTRL))
c = p[3] & 0x1f;
*** ../vim-8.2.4501/src/testdir/test_ins_complete.vim 2022-03-03
11:45:37.347173149 +0000
--- src/testdir/test_ins_complete.vim 2022-03-04 14:50:14.039616944 +0000
***************
*** 1294,1300 ****
exe "normal owh\<C-X>\<C-K>"
exe "normal owh\<C-N>"
call assert_equal(currmess, execute('messages'))
! close!
endfunc
" Test for different ways of setting the 'completefunc' option
--- 1294,1311 ----
exe "normal owh\<C-X>\<C-K>"
exe "normal owh\<C-N>"
call assert_equal(currmess, execute('messages'))
! bwipe!
! endfunc
!
! " 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))
! call assert_false(exists('was_mapped'))
! bwipe!
endfunc
" Test for different ways of setting the 'completefunc' option
*** ../vim-8.2.4501/src/version.c 2022-03-03 20:03:44.657088284 +0000
--- src/version.c 2022-03-04 14:32:14.672667995 +0000
***************
*** 756,757 ****
--- 756,759 ----
{ /* Add new patch number below this line */
+ /**/
+ 4502,
/**/
--
Two sheep in a meadow. One says "baaah". The other says "exactly!".
/// 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/20220304145326.81B691C00F6%40moolenaar.net.