aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_textobjects.vim
diff options
context:
space:
mode:
authorJan Edmund Lazo <janedmundlazo@hotmail.com>2018-08-20 10:03:08 -0400
committerJan Edmund Lazo <janedmundlazo@hotmail.com>2018-08-20 10:15:06 -0400
commit7763c19a709f2a6127585c3fed8962c1a28b87a9 (patch)
treeb4adc0cbd119d6e1b0f988a13a26dcaa417e0cb4 /src/nvim/testdir/test_textobjects.vim
parent953c3fcfee416d5e390643d384aa39b68e720374 (diff)
downloadrneovim-7763c19a709f2a6127585c3fed8962c1a28b87a9.tar.gz
rneovim-7763c19a709f2a6127585c3fed8962c1a28b87a9.tar.bz2
rneovim-7763c19a709f2a6127585c3fed8962c1a28b87a9.zip
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
Diffstat (limited to 'src/nvim/testdir/test_textobjects.vim')
-rw-r--r--src/nvim/testdir/test_textobjects.vim17
1 files changed, 17 insertions, 0 deletions
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, '<div></div>')
+ normal 0citxxx
+ call assert_equal('<div>xxx</div>', getline(1))
+
+ call setline(1, '<div></div>')
+ normal 0f<cityyy
+ call assert_equal('<div>yyy</div>', getline(1))
+
+ call setline(1, '<div></div>')
+ normal 0f<vitsaaa
+ call assert_equal('aaa', getline(1))
+
+ bwipe!
+endfunc
+
" Tests for match() and matchstr()
func Test_match()
call assert_equal("b", matchstr("abcd", ".", 0, 2))