diff options
| author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-02-09 21:26:41 -0500 |
|---|---|---|
| committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-02-10 17:54:24 -0500 |
| commit | be981112b8949506d05d6e38f23cd8976b8133c6 (patch) | |
| tree | a1d756122816e2dc82c1dc24afc8186c7ad6d8c1 /src/nvim/testdir | |
| parent | 61aea004d7101e138794a337c03ef00a6b3994e6 (diff) | |
| download | rneovim-be981112b8949506d05d6e38f23cd8976b8133c6.tar.gz rneovim-be981112b8949506d05d6e38f23cd8976b8133c6.tar.bz2 rneovim-be981112b8949506d05d6e38f23cd8976b8133c6.zip | |
vim-patch:8.2.2489: current buffer is wrong after deletebufline() fails
Problem: current buffer is wrong after deletebufline() fails to delete a
line in another buffer.
Solution: Restore the current buffer.
https://github.com/vim/vim/commit/963ffa0a5a6091655ed72b4590ec5d5a1653bce8
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_bufline.vim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_bufline.vim b/src/nvim/testdir/test_bufline.vim index 076f03fdd8..e038bce08e 100644 --- a/src/nvim/testdir/test_bufline.vim +++ b/src/nvim/testdir/test_bufline.vim @@ -112,6 +112,17 @@ func Test_deletebufline() call assert_equal(0, deletebufline(b, 1)) call assert_equal(['b', 'c'], getbufline(b, 1, 2)) exe "bwipe! " . b + + edit XbufOne + let one = bufnr() + call setline(1, ['a', 'b', 'c']) + setlocal nomodifiable + split XbufTwo + let two = bufnr() + call assert_fails('call deletebufline(one, 1)', 'E21:') + call assert_equal(two, bufnr()) + bwipe! XbufTwo + bwipe! XbufOne endfunc func Test_appendbufline_redraw() |