From 1d2b7020087626ab6e8bd43a203f14f9d1cdd31a Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 19 Aug 2018 23:53:15 -0400 Subject: vim-patch:8.0.1486: accessing invalid memory with "it" Problem: Accessing invalid memory with "it". (Dominique Pelle) Solution: Avoid going over the end of the line. (Christian Brabandt, closes vim/vim#2532) https://github.com/vim/vim/commit/82846a00ac0c135946c93c48c1657018a5c96b11 --- src/nvim/testdir/test_textobjects.vim | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/nvim/testdir/test_textobjects.vim') diff --git a/src/nvim/testdir/test_textobjects.vim b/src/nvim/testdir/test_textobjects.vim index 684f197f5f..17602fbe26 100644 --- a/src/nvim/testdir/test_textobjects.vim +++ b/src/nvim/testdir/test_textobjects.vim @@ -152,3 +152,16 @@ func Test_match() call assert_equal(3 , match('abc', '\zs', 3, 1)) call assert_equal(-1, match('abc', '\zs', 4, 1)) endfunc + +" This was causing an illegal memory access +func Test_inner_tag() + new + norm ixxx + call feedkeys("v", 'xt') + insert +x +x +. + norm it + q! +endfunc -- cgit From 7763c19a709f2a6127585c3fed8962c1a28b87a9 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Mon, 20 Aug 2018 10:03:08 -0400 Subject: vim-patch:8.1.0290: "cit" on an empty HTML tag changes the whole tag Problem: "cit" on an empty HTML tag changes the whole tag. Solution: Only adjust the area in Visual mode. (Andy Massimino, closes vim/vim#3332) https://github.com/vim/vim/commit/b476cb7d8d1a8c02409f110dea8b166aa9334e18 --- src/nvim/testdir/test_textobjects.vim | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/nvim/testdir/test_textobjects.vim') diff --git a/src/nvim/testdir/test_textobjects.vim b/src/nvim/testdir/test_textobjects.vim index 17602fbe26..52c0c3698e 100644 --- a/src/nvim/testdir/test_textobjects.vim +++ b/src/nvim/testdir/test_textobjects.vim @@ -121,6 +121,23 @@ func Test_string_html_objects() enew! endfunc +func Test_empty_html_tag() + new + call setline(1, '
') + normal 0citxxx + call assert_equal('
xxx
', getline(1)) + + call setline(1, '
') + normal 0fyyy', getline(1)) + + call setline(1, '
') + normal 0f