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