To: vim-dev@vim.org Subject: Patch 6.2.441 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.2.441 Problem: ":unabbreviate foo " doesn't work, because of the trailing space, while an abbreviation with a trailing space is not possible. (Paul Jolly) Solution: Accept a match with the lhs of an abbreviation without the trailing space. Files: src/getchar.c *** ../vim-6.2.440/src/getchar.c Tue Mar 30 22:00:48 2004 --- src/getchar.c Wed Mar 31 13:17:41 2004 *************** *** 766,772 **** /* * Stuff the redo buffer into the stuffbuff. * Insert the redo count into the command. ! * If 'old_redo' is TRUE, the last but one command is repeated * instead of the last command (inserting text). This is used for * CTRL-O <.> in insert mode * --- 766,772 ---- /* * Stuff the redo buffer into the stuffbuff. * Insert the redo count into the command. ! * If "old_redo" is TRUE, the last but one command is repeated * instead of the last command (inserting text). This is used for * CTRL-O <.> in insert mode * *************** *** 3178,3184 **** { if (maptype == 1) /* delete entry */ { ! if (n != len) /* not a full match */ { mpp = &(mp->m_next); continue; --- 3178,3189 ---- { if (maptype == 1) /* delete entry */ { ! /* Only accept a full match. For abbreviations we ! * ignore trailing space when matching with the ! * "lhs", since an abbreviation can't have ! * trailing space. */ ! if (n != len && (!abbrev || round || n > len ! || *skipwhite(keys + n) != NUL)) { mpp = &(mp->m_next); continue; *** ../vim-6.2.440/src/version.c Sun Apr 4 12:06:41 2004 --- src/version.c Sun Apr 4 12:08:48 2004 *************** *** 639,640 **** --- 639,642 ---- { /* Add new patch number below this line */ + /**/ + 441, /**/ -- hundred-and-one symptoms of being an internet addict: 261. You find diskettes in your pockets when doing laundry. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///