1
0
forked from aniani/vim

patch 8.2.3255: ci" finds following string but ci< and others don't

Problem:    ci" finds following string but ci< and others don't.
Solution:   When not inside an object find the start. (Connor Lane Smit,
            closes #8670)
This commit is contained in:
Connor Lane Smith
2021-07-31 13:31:42 +02:00
committed by Bram Moolenaar
parent 28d8421bfb
commit b9115da4be
4 changed files with 54 additions and 5 deletions

View File

@@ -1079,12 +1079,25 @@ current_block(
*/
save_cpo = p_cpo;
p_cpo = (char_u *)(vim_strchr(p_cpo, CPO_MATCHBSL) != NULL ? "%M" : "%");
while (count-- > 0)
if ((pos = findmatch(NULL, what)) != NULL)
{
if ((pos = findmatch(NULL, what)) == NULL)
break;
curwin->w_cursor = *pos;
start_pos = *pos; // the findmatch for end_pos will overwrite *pos
while (count-- > 0)
{
if ((pos = findmatch(NULL, what)) == NULL)
break;
curwin->w_cursor = *pos;
start_pos = *pos; // the findmatch for end_pos will overwrite *pos
}
}
else
{
while (count-- > 0)
{
if ((pos = findmatchlimit(NULL, what, FM_FORWARD, 0)) == NULL)
break;
curwin->w_cursor = *pos;
start_pos = *pos; // the findmatch for end_pos will overwrite *pos
}
}
p_cpo = save_cpo;