diff options
author | Bram Moolenaar <Bram@vim.org> | 2014-04-29 14:03:02 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2014-04-29 14:03:02 +0200 |
commit | 355a95a079d3c8c64cf496df434741891d07985a (patch) | |
tree | eb32734a34f726ce3f3c718572c612de329476d6 /src/eval.c | |
parent | d69bd9af3ccf5edd2138fb7abd68d35f7b84ef7e (diff) | |
download | vim-355a95a079d3c8c64cf496df434741891d07985a.zip |
updated for version 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.
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/eval.c b/src/eval.c index f91578928..3e1088a1e 100644 --- a/src/eval.c +++ b/src/eval.c @@ -22275,6 +22275,14 @@ trans_function_name(pp, skip, flags, fdp) { name = vim_strsave(name); *pp = end; + if (STRNCMP(name, "<SNR>", 5) == 0) + { + /* Change "<SNR>" to the byte sequence. */ + name[0] = K_SPECIAL; + name[1] = KS_EXTRA; + name[2] = (int)KE_SNR; + mch_memmove(name + 3, name + 5, STRLEN(name + 5) + 1); + } goto theend; } |