Stephen Riehm wrote:

> Hi everyone,
>
> after upgrading from MacVim 104 to MacVim 106 I noticed that <M-"> no longer 
> works (not recognised for maps - just inserts a ¢ character). (The problem 
> also exists in 105 - which I missed).
>
> Workarounds such as <S-M-'> also had no effect.
>
> After a bit of git bisecting I found the following commit:
>
> 1d90a5a... patch 7.4.1968 Problem:    Invalid memory access with "\<C-">. 
> Solution:   Do not recognize this as a special character. (Dominique Pelle)
>
> misc2.c line 2762 (as of commit 5009946)
>
>                 /* Anything accepted, like <C-?>, except <C-">, because the "
>                  * ends the string. */
>                 if (bp[l] != '"' && bp[l + 1] == '>')
>                     bp += l;
>
> This only checks for "> - thus not only catching <C-"> but also <M-">. (which 
> always worked fine (for me at least :-)).
> Strangely, <D-"> was not adversely affected.
>
> After returning the check to its original
>
>                 if (bp[l + 1] == '>')
>
> <M-"> worked fine again.
>
> Also, even without the extra check, I still could not reproduce any problems 
> via <C-"> (except that it only produced a ' character - Mac OS 10.9.5, MacVim 
> Snapshot 106).
>
> Could we please revoke this patch, possibly replacing it with something else?
>
> IMHO: If the invalid memory access problem still exists, it should be solved 
> by "not accessing invalid memory" rather than simply turning off / breaking 
> useful functionality.
>
> Thanks in advance,
>
> Steve

Hi Steve

Sorry if I broke your mapping.  I'll see soon how else it can be fixed.

The original thread where the bug was discussed is:

https://groups.google.com/forum/#!topic/vim_dev/4fATM3pnYGc

I just tried to map <C-"> and it does not work for me even when
vim is older than 7.4.1968.  Indeed, mapping <M-"> worked but
in gvim only, not in terminal.

The memory issue should be the same for <C-"> or <M-">, since
it happened because " starts a comment, causing an invalid syntax
not handled well by vim.

This shows the invalid memory error in log file when using vim
earlier than 7.4.1968:

$ valgrind --num-callers=20 vim -u NONE -c 'echo "\<M-">' -c q 2> log

Regards
Dominique

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui