aboutsummaryrefslogtreecommitdiffstats
path: root/testing/nvi/15search_word.patch
diff options
context:
space:
mode:
authorSören Tempel <soeren+git@soeren-tempel.net>2015-11-30 19:14:21 +0100
committerSören Tempel <soeren+git@soeren-tempel.net>2015-12-07 18:51:21 +0100
commit7525cfa63719a65d5c5f924219b13a0111f1343f (patch)
tree459dbac35248cc6b5b0c93e8764d42b5a5d541b6 /testing/nvi/15search_word.patch
parent4b763f9b85d0696d458ffbd14d99544cdd7550cf (diff)
downloadaports-7525cfa63719a65d5c5f924219b13a0111f1343f.tar.bz2
aports-7525cfa63719a65d5c5f924219b13a0111f1343f.tar.xz
testing/nvi: new aport
Including a subset of the debian patchset.
Diffstat (limited to 'testing/nvi/15search_word.patch')
-rw-r--r--testing/nvi/15search_word.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/testing/nvi/15search_word.patch b/testing/nvi/15search_word.patch
new file mode 100644
index 0000000000..f782978ff7
--- /dev/null
+++ b/testing/nvi/15search_word.patch
@@ -0,0 +1,26 @@
+From: Al Viro <viro@ZenIV.linux.org.uk>
+Subject: Fix {^A} command. (End-of-word was not included in search
+regexp leading to false positives.)
+
+--- nvi-1.81.6.orig/vi/v_search.c 2007-11-18 11:41:42.000000000 -0500
++++ nvi-1.81.6/vi/v_search.c 2009-03-05 15:37:37.000000000 -0500
+@@ -322,15 +322,16 @@
+ v_searchw(SCR *sp, VICMD *vp)
+ {
+ size_t blen, len;
++ size_t olen = STRLEN(VIP(sp)->keyw);
+ int rval;
+ CHAR_T *bp, *p;
+
+- len = VIP(sp)->klen + RE_WSTART_LEN + RE_WSTOP_LEN;
++ len = olen + RE_WSTART_LEN + RE_WSTOP_LEN;
+ GET_SPACE_RETW(sp, bp, blen, len);
+ MEMCPY(bp, RE_WSTART, RE_WSTART_LEN);
+ p = bp + RE_WSTART_LEN;
+- MEMCPY(p, VIP(sp)->keyw, VIP(sp)->klen);
+- p += VIP(sp)->klen;
++ MEMCPY(p, VIP(sp)->keyw, olen);
++ p += olen;
+ MEMCPY(p, RE_WSTOP, RE_WSTOP_LEN);
+
+ rval = v_search(sp, vp, bp, len, SEARCH_SET, FORWARD);