]> granicus.if.org Git - vim/commitdiff
updated for version 7.0072
authorBram Moolenaar <Bram@vim.org>
Wed, 18 May 2005 22:06:55 +0000 (22:06 +0000)
committerBram Moolenaar <Bram@vim.org>
Wed, 18 May 2005 22:06:55 +0000 (22:06 +0000)
src/buffer.c

index 9772336448ea2617c8ed8eba492862977a29a929..668cd9c00b3ac96f2a0227562ae72fa2a1e9d58c 100644 (file)
@@ -2102,13 +2102,13 @@ ExpandBufnames(pat, num_file, file, options)
 
     /*
      * attempt == 0: try match with    '\<', match at start of word
-     * attempt == 2: try match without '\<', match anywhere
+     * attempt == 1: try match without '\<', match anywhere
      */
-    for (attempt = 0; attempt <= 2; attempt += 2)
+    for (attempt = 0; attempt <= 1; ++attempt)
     {
-       if (attempt == 2 && patc == pat)
+       if (attempt > 0 && patc == pat)
            break;      /* there was no anchor, no need to try again */
-       prog = vim_regcomp(patc + attempt, RE_MAGIC);
+       prog = vim_regcomp(patc + attempt * 11, RE_MAGIC);
        if (prog == NULL)
        {
            if (patc != pat)