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/option.h b/src/option.h
index b7f1bd9..c47b143 100644
--- a/src/option.h
+++ b/src/option.h
@@ -169,10 +169,12 @@
#define CPO_SUBPERCENT '/' /* % in :s string uses previous one */
#define CPO_BACKSL '\\' /* \ is not special in [] */
#define CPO_CHDIR '.' /* don't chdir if buffer is modified */
+#define CPO_SCOLON ';' /* using "," and ";" will skip over char if
+ * cursor would not move */
/* default values for Vim, Vi and POSIX */
#define CPO_VIM "aABceFs"
-#define CPO_VI "aAbBcCdDeEfFgHiIjJkKlLmMnoOpPqrRsStuvwWxXyZ$!%*-+<>"
-#define CPO_ALL "aAbBcCdDeEfFgHiIjJkKlLmMnoOpPqrRsStuvwWxXyZ$!%*-+<>#{|&/\\."
+#define CPO_VI "aAbBcCdDeEfFgHiIjJkKlLmMnoOpPqrRsStuvwWxXyZ$!%*-+<>;"
+#define CPO_ALL "aAbBcCdDeEfFgHiIjJkKlLmMnoOpPqrRsStuvwWxXyZ$!%*-+<>#{|&/\\.;"
/* characters for p_ww option: */
#define WW_ALL "bshl<>[],~"
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;
}
}
}
diff --git a/src/testdir/Make_amiga.mak b/src/testdir/Make_amiga.mak
index e9c30c4..f3035b1 100644
--- a/src/testdir/Make_amiga.mak
+++ b/src/testdir/Make_amiga.mak
@@ -28,7 +28,8 @@
test61.out test62.out test63.out test64.out test65.out \
test66.out test67.out test68.out test69.out test70.out \
test71.out test72.out test73.out test74.out test75.out \
- test76.out test77.out test78.out test79.out test80.out
+ test76.out test77.out test78.out test79.out test80.out \
+ test81.out
.SUFFIXES: .in .out
@@ -128,3 +129,4 @@
test78.out: test78.in
test79.out: test79.in
test80.out: test80.in
+test81.out: test81.in
diff --git a/src/testdir/Make_dos.mak b/src/testdir/Make_dos.mak
index e6b5ff2..9ece4b5 100644
--- a/src/testdir/Make_dos.mak
+++ b/src/testdir/Make_dos.mak
@@ -29,7 +29,7 @@
test42.out test52.out test65.out test66.out test67.out \
test68.out test69.out test71.out test72.out test73.out \
test74.out test75.out test76.out test77.out test78.out \
- test79.out test80.out
+ test79.out test80.out test81.out
SCRIPTS32 = test50.out test70.out
diff --git a/src/testdir/Make_ming.mak b/src/testdir/Make_ming.mak
index e752825..2ff20ad 100644
--- a/src/testdir/Make_ming.mak
+++ b/src/testdir/Make_ming.mak
@@ -49,7 +49,7 @@
test42.out test52.out test65.out test66.out test67.out \
test68.out test69.out test71.out test72.out test73.out \
test74.out test75.out test76.out test77.out test78.out \
- test79.out test80.out
+ test79.out test80.out test81.out
SCRIPTS32 = test50.out test70.out
diff --git a/src/testdir/Make_os2.mak b/src/testdir/Make_os2.mak
index a80dff5..4442a41 100644
--- a/src/testdir/Make_os2.mak
+++ b/src/testdir/Make_os2.mak
@@ -28,7 +28,8 @@
test61.out test62.out test63.out test64.out test65.out \
test66.out test67.out test68.out test69.out test70.out \
test71.out test72.out test73.out test74.out test75.out \
- test76.out test77.out test78.out test79.out test80.out
+ test76.out test77.out test78.out test79.out test80.out \
+ test81.out
.SUFFIXES: .in .out
diff --git a/src/testdir/Make_vms.mms b/src/testdir/Make_vms.mms
index 58ab4e8..d4101ed 100644
--- a/src/testdir/Make_vms.mms
+++ b/src/testdir/Make_vms.mms
@@ -4,7 +4,7 @@
# Authors: Zoltan Arpadffy, <arpadffy@polarhome.com>
# Sandor Kopanyi, <sandor.kopanyi@mailbox.hu>
#
-# Last change: 2011 Jun 19
+# Last change: 2011 Jun 26
#
# This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
# Edit the lines in the Configuration section below to select.
@@ -75,7 +75,7 @@
test61.out test62.out test63.out test64.out test65.out \
test66.out test67.out test68.out test69.out \
test71.out test72.out test74.out test75.out test76.out \
- test77.out test78.out test79.out test80.out
+ test77.out test78.out test79.out test80.out test81.out
# Known problems:
# Test 30: a problem around mac format - unknown reason
diff --git a/src/testdir/Makefile b/src/testdir/Makefile
index 8561016..2eea86e 100644
--- a/src/testdir/Makefile
+++ b/src/testdir/Makefile
@@ -26,7 +26,7 @@
test64.out test65.out test66.out test67.out test68.out \
test69.out test70.out test71.out test72.out test73.out \
test74.out test75.out test76.out test77.out test78.out \
- test79.out test80.out
+ test79.out test80.out test81.out
SCRIPTS_GUI = test16.out
diff --git a/src/testdir/test81.in b/src/testdir/test81.in
new file mode 100644
index 0000000..e47653f
--- /dev/null
+++ b/src/testdir/test81.in
@@ -0,0 +1,18 @@
+Test for t movement command and 'cpo-;' setting
+
+STARTTEST
+:set nocompatible
+:set cpo-=;
+/firstline/
+j0tt;D
+$Ty;D:set cpo+=;
+j0tt;;D
+$Ty;;D:?firstline?+1,$w! test.out
+:qa!
+ENDTEST
+
+firstline
+aaa two three four
+bbb yee yoo four
+ccc two three four
+ddd yee yoo four
diff --git a/src/testdir/test81.ok b/src/testdir/test81.ok
new file mode 100644
index 0000000..8f86b52
--- /dev/null
+++ b/src/testdir/test81.ok
@@ -0,0 +1,4 @@
+aaa two
+bbb y
+ccc
+ddd yee y
diff --git a/src/version.c b/src/version.c
index ccb59a0..d76c4b3 100644
--- a/src/version.c
+++ b/src/version.c
@@ -710,6 +710,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 235,
+/**/
234,
/**/
233,