vim-patch:7.4.268

Problem:  Using exists() on a funcref for a script-local function
          does not work.
Solution: Translate <SNR> to the special byte sequence.
          Add a test.

https://code.google.com/p/vim/source/detail?r=1a5ed2626b26a982e307a206572121a557adf709
This commit is contained in:
Marco Hinz
2014-04-29 16:55:27 +02:00
committed by Thiago de Arruda
parent f30a83f101
commit 046debb935
5 changed files with 28 additions and 2 deletions

View File

@@ -17883,6 +17883,13 @@ trans_function_name (
if (name != NULL) {
name = vim_strsave(name);
*pp = end;
if (strncmp((char *)name, "<SNR>", 5) == 0) {
// Change "<SNR>" to the byte sequence.
name[0] = K_SPECIAL;
name[1] = KS_EXTRA;
name[2] = (int)KE_SNR;
memmove(name + 3, name + 5, strlen((char *)name + 5) + 1);
}
goto theend;
}