From 4748c4bd64610cf943a431d215bb1aad51f8d0b4 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 17 May 2022 17:47:07 +0100 Subject: 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. --- src/testdir/test_source.vim | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/testdir') 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 -- cgit v1.2.1