diff options
| author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-04-03 20:36:11 -0400 |
|---|---|---|
| committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-04-13 12:00:34 -0400 |
| commit | 572627255983b7733b6ad05da52b3e704aae8a2f (patch) | |
| tree | db4262ffb11d38689dad8740a6f8264e3483ef6f /src/nvim/testdir | |
| parent | 366e75b6be57220b28f2abc22add19d5df33b5a3 (diff) | |
| download | rneovim-572627255983b7733b6ad05da52b3e704aae8a2f.tar.gz rneovim-572627255983b7733b6ad05da52b3e704aae8a2f.tar.bz2 rneovim-572627255983b7733b6ad05da52b3e704aae8a2f.zip | |
vim-patch:8.2.0507: getbufvar() may get the wrong dictionary
Problem: Getbufvar() may get the wrong dictionary. (David le Blanc)
Solution: Check for empty name. (closes vim/vim#5878)
https://github.com/vim/vim/commit/5259275347667a90fb88d8ea74331f88ad68edfc
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_functions.vim | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_functions.vim b/src/nvim/testdir/test_functions.vim index b75b095841..bd5cb6ad19 100644 --- a/src/nvim/testdir/test_functions.vim +++ b/src/nvim/testdir/test_functions.vim @@ -666,6 +666,16 @@ func Test_getbufvar() call assert_equal('iso-8859-2', getbufvar(bufnr('%'), '&fenc')) close + " Get the b: dict. + let b:testvar = 'one' + new + let b:testvar = 'two' + let thebuf = bufnr() + wincmd w + call assert_equal('two', getbufvar(thebuf, 'testvar')) + call assert_equal('two', getbufvar(thebuf, '').testvar) + bwipe! + set fileformats& endfunc |