updated for version 7.3.235
Problem: ";" gets stuck on a "t" command, it's not useful.
Solution: Add the ';' flag in 'cpo'. (Christian Brabandt)
diff --git a/src/search.c b/src/search.c
index acd4c8d..6c9e1da 100644
--- a/src/search.c
+++ b/src/search.c
@@ -1546,6 +1546,7 @@
int col;
char_u *p;
int len;
+ int stop = TRUE;
#ifdef FEAT_MBYTE
static char_u bytes[MB_MAXBYTES];
static int bytelen = 1; /* >1 for multi-byte char */
@@ -1580,6 +1581,12 @@
t_cmd = last_t_cmd;
c = lastc;
/* For multi-byte re-use last bytes[] and bytelen. */
+
+ /* Force a move of at least one char, so ";" and "," will move the
+ * cursor, even if the cursor is right in front of char we are looking
+ * at. */
+ if (vim_strchr(p_cpo, CPO_SCOLON) == NULL && count == 1)
+ stop = FALSE;
}
if (dir == BACKWARD)
@@ -1612,14 +1619,15 @@
}
if (bytelen == 1)
{
- if (p[col] == c)
+ if (p[col] == c && stop)
break;
}
else
{
- if (vim_memcmp(p + col, bytes, bytelen) == 0)
+ if (vim_memcmp(p + col, bytes, bytelen) == 0 && stop)
break;
}
+ stop = TRUE;
}
}
else
@@ -1629,8 +1637,9 @@
{
if ((col += dir) < 0 || col >= len)
return FAIL;
- if (p[col] == c)
+ if (p[col] == c && stop)
break;
+ stop = TRUE;
}
}
}