diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-07-07 04:47:18 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-07 04:47:18 +0800 |
| commit | 664efa497e4e3d79d2e4ab486acbf1471b2389b0 (patch) | |
| tree | 389a04a3846cf3d5df7464b03294be48302ee09e /src/nvim/testdir/test_edit.vim | |
| parent | 1e03255646be3a31d44db4118ee2194d45f6bf1c (diff) | |
| download | rneovim-664efa497e4e3d79d2e4ab486acbf1471b2389b0.tar.gz rneovim-664efa497e4e3d79d2e4ab486acbf1471b2389b0.tar.bz2 rneovim-664efa497e4e3d79d2e4ab486acbf1471b2389b0.zip | |
vim-patch:8.2.0614: get ml_get error when deleting a line in 'completefunc' (#19244)
Problem: Get ml_get error when deleting a line in 'completefunc'. (Yegappan
Lakshmanan)
Solution: Lock the text while evaluating 'completefunc'.
https://github.com/vim/vim/commit/ff06f283e3e4b3ec43012dd3b83f8454c98f6639
Fix a mistake in the porting of patch 8.1.0098.
Cherry-pick Test_run_excmd_with_text_locked() from patch 8.2.0270.
Cherry-pick test_gf.vim changes from patch 8.2.0369.
Cherry-pick message change from later patches.
Diffstat (limited to 'src/nvim/testdir/test_edit.vim')
| -rw-r--r-- | src/nvim/testdir/test_edit.vim | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/nvim/testdir/test_edit.vim b/src/nvim/testdir/test_edit.vim index c14afbe5b9..19b088959b 100644 --- a/src/nvim/testdir/test_edit.vim +++ b/src/nvim/testdir/test_edit.vim @@ -985,6 +985,22 @@ func Test_edit_CTRL_U() bw! endfunc +func Test_edit_completefunc_delete() + func CompleteFunc(findstart, base) + if a:findstart == 1 + return col('.') - 1 + endif + normal dd + return ['a', 'b'] + endfunc + new + set completefunc=CompleteFunc + call setline(1, ['', 'abcd', '']) + 2d + call assert_fails("normal 2G$a\<C-X>\<C-U>", 'E565:') + bwipe! +endfunc + func Test_edit_CTRL_Z() " Ctrl-Z when insertmode is not set inserts it literally new @@ -1331,7 +1347,7 @@ func Test_edit_forbidden() try call feedkeys("ix\<esc>", 'tnix') call assert_fails(1, 'textlock') - catch /^Vim\%((\a\+)\)\=:E523/ " catch E523: not allowed here + catch /^Vim\%((\a\+)\)\=:E565/ " catch E565: not allowed here endtry " TODO: Might be a bug: should x really be inserted here call assert_equal(['xa'], getline(1, '$')) @@ -1356,7 +1372,7 @@ func Test_edit_forbidden() try call feedkeys("i\<c-x>\<c-u>\<esc>", 'tnix') call assert_fails(1, 'change in complete function') - catch /^Vim\%((\a\+)\)\=:E523/ " catch E523 + catch /^Vim\%((\a\+)\)\=:E565/ " catch E565 endtry delfu Complete set completefunc= |