On Thu, Jun 08, 2006 at 06:05:51PM -0600, Christian J. Robinson wrote:
> On Fri, 9 Jun 2006, Edwin Steiner wrote:
> 
> > I see a strange behaviour for <buffer> mappings in vim 7.  Vim seems
> > to change such mappings to select-mode mappings when the buffer is
> > deleted, and then re-opened.
> 
> I can confirm this behavior, although it's not that Vim 7 is changing
> the mapping, it just appears that it's clearing all but the select
> mode mapping from memory since ":map" creates a visual/select mode
> mapping (see ":help mapmode-nvo").

I found the cause in the vim source. The problem is this:

#define MAP_ALL_MODES   0x3f    /* all mode bits used for mapping */

It does not include SELECTMODE, which is

#define SELECTMODE      0x1000  /* Select mode, only for mappings */

I don't know the vim source enough to tell if changing it to

#define MAP_ALL_MODES   0x103f  /* all mode bits used for mapping */

is valid.

-Edwin

Reply via email to