diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-08-13 21:31:00 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-13 21:31:00 +0800 |
commit | 02a4974418b7fb18c5034b7b2fc85ce4cde7d370 (patch) | |
tree | ba7855e0aa3708a3985a9235cdc290a6271d82c8 /src | |
parent | 33b49d5f55423a1a3174ad0ce42c4454871aa9f8 (diff) | |
download | rneovim-02a4974418b7fb18c5034b7b2fc85ce4cde7d370.tar.gz rneovim-02a4974418b7fb18c5034b7b2fc85ce4cde7d370.tar.bz2 rneovim-02a4974418b7fb18c5034b7b2fc85ce4cde7d370.zip |
vim-patch:7.4.1168 (#19645)
Problem: This doesn't give the right result: eval(string(v:true)). (Nikolay
Pavlov)
Solution: Make the string "v:true" instead of "true".
https://github.com/vim/vim/commit/f48aa160fdd7b8caa7678e1a2139244dd2bdc547
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/eval/encode.c | 6 | ||||
-rw-r--r-- | src/nvim/testdir/test_exit.vim | 2 | ||||
-rw-r--r-- | src/nvim/testdir/test_vimscript.vim | 8 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/nvim/eval/encode.c b/src/nvim/eval/encode.c index 090939666d..bb514fba47 100644 --- a/src/nvim/eval/encode.c +++ b/src/nvim/eval/encode.c @@ -30,12 +30,12 @@ #include "nvim/vim.h" // For _() const char *const encode_bool_var_names[] = { - [kBoolVarTrue] = "true", - [kBoolVarFalse] = "false", + [kBoolVarTrue] = "v:true", + [kBoolVarFalse] = "v:false", }; const char *const encode_special_var_names[] = { - [kSpecialVarNull] = "null", + [kSpecialVarNull] = "v:null", }; #ifdef INCLUDE_GENERATED_DECLARATIONS diff --git a/src/nvim/testdir/test_exit.vim b/src/nvim/testdir/test_exit.vim index befcaec2b2..37be293950 100644 --- a/src/nvim/testdir/test_exit.vim +++ b/src/nvim/testdir/test_exit.vim @@ -95,7 +95,7 @@ func Test_exit_code() [CODE] if RunVim(before, ['quit'], '') - call assert_equal(['qp = null', 'ep = null', 'lp = 0', 'l = 0'], readfile('Xtestout')) + call assert_equal(['qp = v:null', 'ep = v:null', 'lp = 0', 'l = 0'], readfile('Xtestout')) endif call delete('Xtestout') diff --git a/src/nvim/testdir/test_vimscript.vim b/src/nvim/testdir/test_vimscript.vim index de4629451b..d16783cf31 100644 --- a/src/nvim/testdir/test_vimscript.vim +++ b/src/nvim/testdir/test_vimscript.vim @@ -1165,10 +1165,10 @@ func Test_type() " call assert_equal(0, 0 + v:none) call assert_equal(0, 0 + v:null) - call assert_equal('false', '' . v:false) - call assert_equal('true', '' . v:true) - " call assert_equal('none', '' . v:none) - call assert_equal('null', '' . v:null) + call assert_equal('v:false', '' . v:false) + call assert_equal('v:true', '' . v:true) + " call assert_equal('v:none', '' . v:none) + call assert_equal('v:null', '' . v:null) call assert_true(v:false == 0) call assert_false(v:false != 0) |