To: vim_dev@googlegroups.com Subject: Patch 8.2.4502 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ 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\\" exe "normal owh\" call assert_equal(currmess, execute('messages')) ! close! endfunc " Test for different ways of setting the 'completefunc' option --- 1294,1311 ---- exe "normal owh\\" exe "normal owh\" 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 let was_mapped = 'yes' ! setlocal dictionary=README.txt ! call feedkeys("aexam\\ ", '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 -- Bram@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 ///