Mercurial > vim
diff 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 |
line wrap: on
line diff
--- a/src/testdir/test_ins_complete.vim +++ b/src/testdir/test_ins_complete.vim @@ -2097,4 +2097,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