added sccs, Bill put in more buffers
[unix-history] / usr / src / usr.bin / ex / ex_vops3.c
index b0e9697..b1ae183 100644 (file)
@@ -322,11 +322,11 @@ lmatchp(addr)
        register int i;
        register char *parens, *cp;
 
        register int i;
        register char *parens, *cp;
 
-       for (cp = cursor; !any(*cp, "({)}");)
+       for (cp = cursor; !any(*cp, "({[)}]");)
                if (*cp++ == 0)
                        return (0);
        lf = 0;
                if (*cp++ == 0)
                        return (0);
        lf = 0;
-       parens = any(*cp, "()") ? "()" : "{}";
+       parens = any(*cp, "()") ? "()" : any(*cp, "[]") ? "[]" : "{}";
        if (*cp == parens[1]) {
                dir = -1;
                llimit = one;
        if (*cp == parens[1]) {
                dir = -1;
                llimit = one;
@@ -370,6 +370,12 @@ lsmatch(cp)
                if (i)
                        goim();
        }
                if (i)
                        goim();
        }
+       else {
+               strcLIN(sp);
+               strcpy(scurs, genbuf);
+               if (!lmatchp((line *) 0))
+                       beep();
+       }
        strcLIN(sp);
        wdot = 0;
        wcursor = 0;
        strcLIN(sp);
        wdot = 0;
        wcursor = 0;
@@ -456,7 +462,7 @@ lnext()
                if (*wcursor)
                        return (1);
                if (wdot >= llimit) {
                if (*wcursor)
                        return (1);
                if (wdot >= llimit) {
-                       if (wcursor > linebuf)
+                       if (lf == vmove && wcursor > linebuf)
                                wcursor--;
                        return (0);
                }
                                wcursor--;
                        return (0);
                }