aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKunMing Xie <qqzz014@gmail.com>2017-07-17 22:38:03 +0800
committerJustin M. Keyes <justinkz@gmail.com>2017-07-17 16:38:03 +0200
commit24a0d4e122024071195ac8a2828fba3184c8e12e (patch)
tree6e838368e3e630edb4f29df4a48a7c59aadfb06c
parenta76da96e86cc338dd5d8ff2f6014cff68e055ce9 (diff)
downloadrneovim-24a0d4e122024071195ac8a2828fba3184c8e12e.tar.gz
rneovim-24a0d4e122024071195ac8a2828fba3184c8e12e.tar.bz2
rneovim-24a0d4e122024071195ac8a2828fba3184c8e12e.zip
vim-patch:8.0.0004 (#7044)
Problem: A string argument for function() that is not a function name results in an error message with NULL. (Christian Brabandt) Solution: Use the argument for the error message. https://github.com/vim/vim/commit/5582ef14384525e8cec86016876d97a6b32dd548
-rw-r--r--src/nvim/testdir/test_expr.vim3
-rw-r--r--src/nvim/version.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/nvim/testdir/test_expr.vim b/src/nvim/testdir/test_expr.vim
index 82c5d21bd0..710eae9b8b 100644
--- a/src/nvim/testdir/test_expr.vim
+++ b/src/nvim/testdir/test_expr.vim
@@ -418,6 +418,9 @@ func Test_function_with_funcref()
let s:fref = function(s:f)
call assert_equal(v:t_string, s:fref('x'))
call assert_fails("call function('s:f')", 'E700:')
+
+ call assert_fails("call function('foo()')", 'E475:')
+ call assert_fails("call function('foo()')", 'foo()')
endfunc
func Test_funcref()
diff --git a/src/nvim/version.c b/src/nvim/version.c
index c7b8220776..06efcc5bfc 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -725,7 +725,7 @@ static const int included_patches[] = {
// 7 NA
6,
// 5 NA
- // 4,
+ 4,
// 3,
2,
1,