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)
b476cb7d8d
This commit is contained in:
Jan Edmund Lazo
2018-08-20 10:03:08 -04:00
parent 953c3fcfee
commit 7763c19a70
2 changed files with 22 additions and 3 deletions

View File

@@ -3445,9 +3445,11 @@ again:
}
curwin->w_cursor = end_pos;
/* If we now have the same text as before reset "do_include" and try
* again. */
if (equalpos(start_pos, old_start) && equalpos(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
&& equalpos(start_pos, old_start)
&& equalpos(end_pos, old_end)) {
do_include = TRUE;
curwin->w_cursor = old_start;
count = count_arg;