diff options
author | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-08-20 10:03:08 -0400 |
---|---|---|
committer | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-08-20 10:15:06 -0400 |
commit | 7763c19a709f2a6127585c3fed8962c1a28b87a9 (patch) | |
tree | b4adc0cbd119d6e1b0f988a13a26dcaa417e0cb4 /src/nvim/search.c | |
parent | 953c3fcfee416d5e390643d384aa39b68e720374 (diff) | |
download | rneovim-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/search.c')
-rw-r--r-- | src/nvim/search.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/nvim/search.c b/src/nvim/search.c index b58707a3c1..7a4b585a93 100644 --- a/src/nvim/search.c +++ b/src/nvim/search.c @@ -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; |