diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-02-11 14:09:45 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-02-11 19:03:27 +0100 |
commit | d285d6ca0dc5123b5111239140751f4d986ee15c (patch) | |
tree | dc3328cd439b76ecb4fc9ed791935c152f723b61 /src/nvim/testdir | |
parent | abed6a0b1a71e54b143e98678f4daa6818b02f8d (diff) | |
download | rneovim-d285d6ca0dc5123b5111239140751f4d986ee15c.tar.gz rneovim-d285d6ca0dc5123b5111239140751f4d986ee15c.tar.bz2 rneovim-d285d6ca0dc5123b5111239140751f4d986ee15c.zip |
vim-patch:8.0.1223: crash when using autocomplete and tab pages
Problem: Crash when using autocomplete and tab pages.
Solution: Check if the current tab changed. (Christian Brabandt, closes
vim/vim#2239)
https://github.com/vim/vim/commit/9ad89c6c4f89cd710d8244d8010b8b0ae30ba79d
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r-- | src/nvim/testdir/test_popup.vim | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_popup.vim b/src/nvim/testdir/test_popup.vim index e1ba142d1c..7f818dd40d 100644 --- a/src/nvim/testdir/test_popup.vim +++ b/src/nvim/testdir/test_popup.vim @@ -570,4 +570,41 @@ func Test_completion_clear_candidate_list() endfunc +func Test_popup_and_preview_autocommand() + " This used to crash Vim + if !has('python') + return + endif + let h = winheight(0) + if h < 15 + return + endif + new + augroup MyBufAdd + au! + au BufAdd * nested tab sball + augroup END + set omnifunc=pythoncomplete#Complete + call setline(1, 'import os') + " make the line long + call setline(2, ' os.') + $ + call feedkeys("A\<C-X>\<C-O>\<C-N>\<C-N>\<C-N>\<enter>\<esc>", 'tx') + call assert_equal(["import os", " os.EX_IOERR", ''], getline(1,'$')) + call assert_equal(1, winnr('$')) + " previewwindow option is not set + call assert_equal(0, &previewwindow) + norm! gt + call assert_equal(0, &previewwindow) + norm! gT + call assert_equal(12, tabpagenr('$')) + tabonly + pclose + augroup MyBufAdd + au! + augroup END + augroup! MyBufAdd + bw! +endfunc + " vim: shiftwidth=2 sts=2 expandtab |