diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-04-24 19:54:02 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2025-02-28 18:21:08 +0800 |
commit | b66f395ff444643852e3539b849267658e885bf4 (patch) | |
tree | fce024d2f065017d40f1536fa4d948676da54a76 /test | |
parent | 4e25b1a675976ed238752d547dc05aaaef38af29 (diff) | |
download | rneovim-b66f395ff444643852e3539b849267658e885bf4.tar.gz rneovim-b66f395ff444643852e3539b849267658e885bf4.tar.bz2 rneovim-b66f395ff444643852e3539b849267658e885bf4.zip |
vim-patch:8.2.4974: ":so" command may read after end of buffer
Problem: ":so" command may read after end of buffer.
Solution: Compute length of text properly.
https://github.com/vim/vim/commit/4748c4bd64610cf943a431d215bb1aad51f8d0b4
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'test')
-rw-r--r-- | test/old/testdir/test_source.vim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/old/testdir/test_source.vim b/test/old/testdir/test_source.vim index a8111eb03d..10b00d3784 100644 --- a/test/old/testdir/test_source.vim +++ b/test/old/testdir/test_source.vim @@ -644,6 +644,17 @@ func Test_source_buffer_long_line() norm300gr0 so bwipe! + + let lines =<< trim END + new + norm 10a0000000000ΓΈ00000000000 + norm i0000000000000000000 + silent! so + END + call writefile(lines, 'Xtest.vim') + source Xtest.vim + bwipe! + call delete('Xtest.vim') endfunc |