diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-04-21 22:01:14 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-04-21 22:01:14 +0200 |
commit | ff06f283e3e4b3ec43012dd3b83f8454c98f6639 (patch) | |
tree | 61a07e0fa072ae02212421515c60745109f2b924 /src/testdir/test_popup.vim | |
parent | 1966c248814d5195edcd1208ed0e51e664a61283 (diff) |
patch 8.2.0614: get ml_get error when deleting a line in 'completefunc'v8.2.0614
Problem: Get ml_get error when deleting a line in 'completefunc'. (Yegappan
Lakshmanan)
Solution: Lock the text while evaluating 'completefunc'.
Diffstat (limited to 'src/testdir/test_popup.vim')
-rw-r--r-- | src/testdir/test_popup.vim | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/testdir/test_popup.vim b/src/testdir/test_popup.vim index e96d5fda50..9890377ea7 100644 --- a/src/testdir/test_popup.vim +++ b/src/testdir/test_popup.vim @@ -334,19 +334,17 @@ func DummyCompleteOne(findstart, base) endif endfunc -" Test that nothing happens if the 'completefunc' opens -" a new window (no completion, no crash) +" Test that nothing happens if the 'completefunc' tries to open +" a new window (fails to open window, continues) func Test_completefunc_opens_new_window_one() new let winid = win_getid() setlocal completefunc=DummyCompleteOne call setline(1, 'one') /^one - call assert_fails('call feedkeys("A\<C-X>\<C-U>\<C-N>\<Esc>", "x")', 'E839:') - call assert_notequal(winid, win_getid()) - q! + call assert_fails('call feedkeys("A\<C-X>\<C-U>\<C-N>\<Esc>", "x")', 'E565:') call assert_equal(winid, win_getid()) - call assert_equal('', getline(1)) + call assert_equal('oneDEF', getline(1)) q! endfunc |