diff options
author | oni-link <knil.ino@gmail.com> | 2014-05-22 16:14:32 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2014-06-20 02:28:51 -0400 |
commit | 937c78fe2e59e831d4acddaf7a13fafa78741179 (patch) | |
tree | d0ec8d5cd6886c53be223df9a8762e838c4160ec /src/nvim/eval.c | |
parent | 59fc9e3aec4aaa19a1f7f632b01acd70e2d3ef5c (diff) | |
download | rneovim-937c78fe2e59e831d4acddaf7a13fafa78741179.tar.gz rneovim-937c78fe2e59e831d4acddaf7a13fafa78741179.tar.bz2 rneovim-937c78fe2e59e831d4acddaf7a13fafa78741179.zip |
vim-patch:7.4.298 #815
Problem: Can't have a funcref start with "t:".
Solution: Add "t" to the list of accepted names. (Yukihiro Nakadaira)
https://code.google.com/p/vim/source/detail?r=156f891d520e93eab5d3ce02784660fb13a3b0d3
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index c8042695d2..92075e46f8 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -16114,11 +16114,11 @@ var_check_func_name ( int new_var /* TRUE when creating the variable */ ) { - if (!(vim_strchr((char_u *)"wbs", name[0]) != NULL && name[1] == ':') - && !ASCII_ISUPPER((name[0] != NUL && name[1] == ':') - ? name[2] : name[0])) { - EMSG2(_("E704: Funcref variable name must start with a capital: %s"), - name); + // Allow for w: b: s: and t:. + if (!(vim_strchr((char_u *)"wbst", name[0]) != NULL && name[1] == ':') + && !ASCII_ISUPPER((name[0] != NUL && name[1] == ':') ? name[2] + : name[0])) { + EMSG2(_("E704: Funcref variable name must start with a capital: %s"), name); return TRUE; } /* Don't allow hiding a function. When "v" is not NULL we might be |