comparison src/testdir/test_ins_complete.vim @ 29406:979ce206409a v9.0.0045

patch 9.0.0045: reading past end of completion with a long line Commit: https://github.com/vim/vim/commit/caea66442d86e7bbba3bf3dc202c3c0d549b9853 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jul 7 19:42:04 2022 +0100 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.
author Bram Moolenaar <Bram@vim.org>
date Thu, 07 Jul 2022 20:45:07 +0200
parents b1f345ec827e
children c12fb2c5b1b3
comparison
equal deleted inserted replaced
29405:3372fc2a122c 29406:979ce206409a
2095 new 2095 new
2096 sil norm si”0s0  2096 sil norm si”0s0 
2097 bwipe! 2097 bwipe!
2098 endfunc 2098 endfunc
2099 2099
2100 func Test_infercase_very_long_line()
2101 " this was truncating the line when inferring case
2102 new
2103 let longLine = "blah "->repeat(300)
2104 let verylongLine = "blah "->repeat(400)
2105 call setline(1, verylongLine)
2106 call setline(2, longLine)
2107 set ic infercase
2108 exe "normal 2Go\<C-X>\<C-L>\<Esc>"
2109 call assert_equal(longLine, getline(3))
2110
2111 bwipe!
2112 set noic noinfercase
2113 endfunc
2114
2115
2100 " vim: shiftwidth=2 sts=2 expandtab 2116 " vim: shiftwidth=2 sts=2 expandtab