Hi,

uh... but that only affects the tests, right? or do we have to update our 
mappings?

Steve

On 14 Aug 2016, at 16:08, Bram Moolenaar <[email protected]> wrote:

> 
> Dominique Pellé wrote:
> 
>> Stephen Riehm <[email protected]> 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
>> 
>> I attach a patch which re-allows <M-"> in mappings while
>> still fixing the memory error that was fixed in 7.4.1968.
>> 
>> Please confirm whether that works for you.
>> 
>> I verified that:
>> 
>> * all tests pass with the patch
>> 
>> * valgrind --num-callers=20 vim -u NONE -c 'echo "\<M-">' -c q 2> log
>>  which reported memory errors before 7.4.1968 is still fixed.
>> 
>> * in gvim, mappings with <M-">  works  (it was broken
>>  by patch 7.4.1968). Example:
>> 
>>  :imap <M-"> foo
> 
> Thanks.  While writing a test for this I realized that there is no way
> to use <M-"> in a string.  Since many places expect the " to terminate
> the string, we need to put a backslash before it to avoid that.  And
> then have the special key code recognize that backslash, so that
> "<M-\">" works.  I'll make it that way.
> 
> -- 
> hundred-and-one symptoms of being an internet addict:
> 25. You believe nothing looks sexier than a man in boxer shorts illuminated
>    only by a 17" inch svga monitor.
> 
> /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
> ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
> \\\  an exciting new programming language -- http://www.Zimbu.org        ///
> \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
> 
> -- 
> -- 
> 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.

-- 
-- 
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