1
0
forked from aniani/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 #3332)
This commit is contained in:
Bram Moolenaar
2018-08-16 21:37:50 +02:00
parent 2dfcef4c08
commit b476cb7d8d
3 changed files with 23 additions and 3 deletions

View File

@@ -4106,9 +4106,10 @@ again:
}
curwin->w_cursor = end_pos;
/* If we now have the same text as before reset "do_include" and try
* again. */
if (EQUAL_POS(start_pos, old_start) && EQUAL_POS(end_pos, old_end))
// If we are in Visual mode and now have the same text as before set
// "do_include" and try again.
if (VIsual_active && EQUAL_POS(start_pos, old_start)
&& EQUAL_POS(end_pos, old_end))
{
do_include = TRUE;
curwin->w_cursor = old_start;