diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-08-25 07:17:52 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-25 07:17:52 +0800 |
commit | 6d8b64fffc6face79568ebe0082aedd02ceea16f (patch) | |
tree | f18f68e8323ffa68148ccd160071fc853cfc45c4 /src/nvim/testdir | |
parent | d3cd79709b6491a5806c67ea52c19f244164954e (diff) | |
parent | dd77a0062108d6ecfc00bbc50b0d6d738df0b89d (diff) | |
download | rneovim-6d8b64fffc6face79568ebe0082aedd02ceea16f.tar.gz rneovim-6d8b64fffc6face79568ebe0082aedd02ceea16f.tar.bz2 rneovim-6d8b64fffc6face79568ebe0082aedd02ceea16f.zip |
Merge pull request #19927 from zeertzjq/vim-9.0.0045
vim-patch:9.0.{0045,0046,0060,0102}: Insert mode completion crash fixes
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r-- | src/nvim/testdir/test_ins_complete.vim | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_ins_complete.vim b/src/nvim/testdir/test_ins_complete.vim index 54d3844100..8f7d2cb278 100644 --- a/src/nvim/testdir/test_ins_complete.vim +++ b/src/nvim/testdir/test_ins_complete.vim @@ -954,5 +954,45 @@ func Test_complete_overrun() bwipe! endfunc +func Test_infercase_very_long_line() + " this was truncating the line when inferring case + new + let longLine = "blah "->repeat(300) + let verylongLine = "blah "->repeat(400) + call setline(1, verylongLine) + call setline(2, longLine) + set ic infercase + exe "normal 2Go\<C-X>\<C-L>\<Esc>" + call assert_equal(longLine, getline(3)) + + " check that the too long text is NUL terminated + %del + norm o + norm 1987ax + exec "norm ox\<C-X>\<C-L>" + call assert_equal(repeat('x', 1987), getline(3)) + + bwipe! + set noic noinfercase +endfunc + +func Test_ins_complete_add() + " this was reading past the end of allocated memory + new + norm o + norm 7o + sil! norm o + + bwipe! +endfunc + +func Test_ins_complete_end_of_line() + " this was reading past the end of the line + new + norm 8oý + sil! norm o + + bwipe! +endfunc " vim: shiftwidth=2 sts=2 expandtab |