To: vim_dev@googlegroups.com Subject: Patch 9.0.1329 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 9.0.1329 Problem: Completion of map includes simplified ones. Solution: Do not complete simplified mappings. (closes #12013) Files: src/map.c, src/testdir/test_mapping.vim *** ../vim-9.0.1328/src/map.c 2023-01-27 21:03:08.895101849 +0000 --- src/map.c 2023-02-19 20:57:44.091515499 +0000 *************** *** 180,186 **** len = msg_outtrans_special(mp->m_keys, TRUE, 0); do { ! msg_putchar(' '); // padd with blanks ++len; } while (len < 12); --- 180,186 ---- len = msg_outtrans_special(mp->m_keys, TRUE, 0); do { ! msg_putchar(' '); // pad with blanks ++len; } while (len < 12); *************** *** 1445,1451 **** mp = maphash[hash]; for (; mp; mp = mp->m_next) { ! if (!(mp->m_mode & expand_mapmodes)) continue; p = translate_mapping(mp->m_keys); --- 1445,1451 ---- mp = maphash[hash]; for (; mp; mp = mp->m_next) { ! if (mp->m_simplified || !(mp->m_mode & expand_mapmodes)) continue; p = translate_mapping(mp->m_keys); *** ../vim-9.0.1328/src/testdir/test_mapping.vim 2022-11-27 12:45:37.311707363 +0000 --- src/testdir/test_mapping.vim 2023-02-19 20:57:44.091515499 +0000 *************** *** 783,793 **** call feedkeys(":abbr! \\\"\", 'tx') call assert_equal("\"abbr! \x01", @:) ! " Multiple matches for a map ! nmap ,f /H ! omap ,f /H call feedkeys(":map ,\\\"\", 'tx') ! call assert_equal('"map ,f', @:) mapclear endfunc --- 783,794 ---- call feedkeys(":abbr! \\\"\", 'tx') call assert_equal("\"abbr! \x01", @:) ! " When multiple matches have the same {lhs}, it should only appear once. ! " The simplified form should also not be included. ! nmap , /H ! omap , /H call feedkeys(":map ,\\\"\", 'tx') ! call assert_equal('"map ,', @:) mapclear endfunc *** ../vim-9.0.1328/src/version.c 2023-02-19 20:49:35.159795893 +0000 --- src/version.c 2023-02-19 20:59:02.483483523 +0000 *************** *** 697,698 **** --- 697,700 ---- { /* Add new patch number below this line */ + /**/ + 1329, /**/ -- Although the scythe isn't pre-eminent among the weapons of war, anyone who has been on the wrong end of, say, a peasants' revolt will know that in skilled hands it is fearsome. -- (Terry Pratchett, Mort) /// 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 ///