diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-05-17 17:47:07 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-05-17 17:47:07 +0100 |
commit | 4748c4bd64610cf943a431d215bb1aad51f8d0b4 (patch) | |
tree | a5e483daee891807be23aac8be24587a8da4b26f /src/testdir | |
parent | bd3a9d2c946bae0427d7c9b9249716064935fb4e (diff) | |
download | vim-git-4748c4bd64610cf943a431d215bb1aad51f8d0b4.tar.gz |
patch 8.2.4974: ":so" command may read after end of bufferv8.2.4974
Problem: ":so" command may read after end of buffer.
Solution: Compute length of text properly.
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/test_source.vim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/testdir/test_source.vim b/src/testdir/test_source.vim index 5f45ab413..4736e9354 100644 --- a/src/testdir/test_source.vim +++ b/src/testdir/test_source.vim @@ -652,6 +652,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 |