On 05-Jun-2013 12:13 +0200, lilydjwg wrote:

> On Tue, Jun 04, 2013 at 01:23:54PM -0700, ZyX wrote:
>> вторник, 4 июня 2013 г., 17:16:33 UTC+4 пользователь 依云 написал:
>>> In Vim version <= 7.3.1031, the following code works and finds the
>>> correct function:
>>>
>>> :echo function('<SNR>138_JumpToEndForward')
>>>
>>> Of course, change '138_JumpToEndForward' to some 's:' prefixed function
>>> Vim knows.
>>>
>>> With Vim version >= 7.3.1071, it returns a string like
>>> '<80><fd>R138_JumpToEndForward' and the result can't be called.
>>
>> If you use a funcref this name is a valid thing to call.
>>
>>> This breaks the CountJump plugin. At least 'mail_movement' that using
>>> it, when editing an Email message, '][' throws an error:
>>>
>>> E129: Function name required
>>> E700: Unknown function: <80>�JumpToEndForward
>>> E488: Trailing characters
>>
>> You are using something strange here. Why does it use `function('…')()` and 
>> not `…()`? The problem is not function() call itself (it works on the 
>> command-line), but the fact that 0x80 is handles specially also here: *map 
>> does not expect already expanded <SNR> item.
> 
> Not me, it's Ingo Karkat who wrote those. He's passing a 's:'-function name
> to another script.
> 
> OK, I'll remove the 's:' prefix for my own use. I'm cc to Ingo Karkat,
> hoping he can fix them.

I've published new versions of the affected diff_movement.vim (vimscript
#3180) and mail_movement.vim (#3182) on vim.org that work around this
via autoload functions.

Nonetheless, I would hope that this regression is fixed; though passing
an <SNR>-function around in a mapping isn't that common, other plugins
and user customizations may still be broken by it. (And I sincerely hope
that development on Vim 7.5 / 8.0 will start tackling the
often-requested "cannot map certain key combinations" problem and the
"0x80 represents a special keycode for internal stuff" mess that (as I
understand) underlies this.)

-- regards, ingo

-- 
-- 
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/groups/opt_out.


Raspunde prin e-mail lui