To: vim-dev@vim.org Subject: Patch 6.1.461 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.461 Problem: When a keymap is active, typing a character in Select mode does not use it. (Benji Fisher) Solution: Apply Insert mode mapping to the character typed in Select mode. Files: src/normal.c *** ../vim61.460/src/normal.c Sun Apr 6 14:47:26 2003 --- src/normal.c Sun Apr 13 20:37:18 2003 *************** *** 626,632 **** && VIsual_select && (vim_isprintc(c) || c == NL || c == CR || c == K_KENTER)) { ! stuffcharReadbuff(c); c = 'c'; } #endif --- 626,646 ---- && VIsual_select && (vim_isprintc(c) || c == NL || c == CR || c == K_KENTER)) { ! # ifdef FEAT_MBYTE ! char_u buf[MB_MAXBYTES + 1]; ! ! buf[(*mb_char2bytes)(c, buf)] = NUL; ! # else ! char_u buf[2]; ! ! buf[0] = c; ! buf[1] = NUL; ! # endif ! /* Fake a "c"hange command. ! * Insert the typed character in the typeahead buffer, so that it will ! * be mapped in Insert mode. Required for ":lmap" to work. May cause ! * mapping a character from ":vnoremap"... */ ! (void)ins_typebuf(buf, REMAP_YES, 0, !KeyTyped, FALSE); c = 'c'; } #endif *** ../vim61.460/src/version.c Sun Apr 13 20:31:02 2003 --- src/version.c Sun Apr 13 20:33:00 2003 *************** *** 613,614 **** --- 613,616 ---- { /* Add new patch number below this line */ + /**/ + 461, /**/ -- DENNIS: Oh, very nice. King, eh! I expect you've got a palace and fine clothes and courtiers and plenty of food. And how d'you get that? By exploiting the workers! By hanging on to outdated imperialist dogma which perpetuates the social and economic differences in our society! "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html ///