aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-08-24 21:08:17 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-08-25 06:53:59 +0800
commitc366a63e4cdd97fc2818be348186a18e1b6eb8df (patch)
tree69e203cd9ab077e9c6d1658d7981845a8a5f81b4 /src/nvim/testdir
parentd3cd79709b6491a5806c67ea52c19f244164954e (diff)
downloadrneovim-c366a63e4cdd97fc2818be348186a18e1b6eb8df.tar.gz
rneovim-c366a63e4cdd97fc2818be348186a18e1b6eb8df.tar.bz2
rneovim-c366a63e4cdd97fc2818be348186a18e1b6eb8df.zip
vim-patch:9.0.0045: reading past end of completion with a long line
Problem: Reading past end of completion with a long line and 'infercase' set. Solution: Allocate the string if needed. https://github.com/vim/vim/commit/caea66442d86e7bbba3bf3dc202c3c0d549b9853 Cherry-pick the deletion of a blank line from patch 9.0.0027. N/A patches for version.c: vim-patch:9.0.0054: compiler warning for size_t to int conversion Problem: Compiler warning for size_t to int conversion. Solution: Add type cast. (Mike Williams, closes vim/vim#10741) https://github.com/vim/vim/commit/c7bd2f08e531f08723cdc677212a3633d11c9a97
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_ins_complete.vim15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_ins_complete.vim b/src/nvim/testdir/test_ins_complete.vim
index 54d3844100..6c59041451 100644
--- a/src/nvim/testdir/test_ins_complete.vim
+++ b/src/nvim/testdir/test_ins_complete.vim
@@ -954,5 +954,20 @@ 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))
+
+ bwipe!
+ set noic noinfercase
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab