diff options
| author | lonerover <pathfinder1644@yahoo.com> | 2017-01-17 16:33:53 +0800 |
|---|---|---|
| committer | lonerover <pathfinder1644@yahoo.com> | 2017-01-19 10:11:53 +0800 |
| commit | 827f2f9f6b75ba182d27c30a6a056968bed65eaa (patch) | |
| tree | dc2897859052c548ecc2e3b9241388eea3cfb28a /src/nvim/testdir | |
| parent | 1a06a3948861b11a9bae0b044f0342fc2190584d (diff) | |
| download | rneovim-827f2f9f6b75ba182d27c30a6a056968bed65eaa.tar.gz rneovim-827f2f9f6b75ba182d27c30a6a056968bed65eaa.tar.bz2 rneovim-827f2f9f6b75ba182d27c30a6a056968bed65eaa.zip | |
vim-patch:7.4.2050
Problem: When using ":vimgrep" may end up with duplicate buffers.
Solution: When adding an error list entry pass the buffer number if possible.
https://github.com/vim/vim/commit/015102e91e978a0bb42a14461c132a85e8f7e1ea
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_quickfix.vim | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim index 17f0bde6d3..008cc6c11b 100644 --- a/src/nvim/testdir/test_quickfix.vim +++ b/src/nvim/testdir/test_quickfix.vim @@ -1444,3 +1444,18 @@ func Test_history() call HistoryTest('c') call HistoryTest('l') endfunc + +func Test_duplicate_buf() + " make sure we can get the highest buffer number + edit DoesNotExist + edit DoesNotExist2 + let last_buffer = bufnr("$") + + " make sure only one buffer is created + call writefile(['this one', 'that one'], 'Xgrepthis') + vimgrep one Xgrepthis + vimgrep one Xgrepthis + call assert_equal(last_buffer + 1, bufnr("$")) + + call delete('Xgrepthis') +endfunc |