0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

updated for version 7.0072

This commit is contained in:
Bram Moolenaar
2005-05-18 22:06:55 +00:00
parent c9a2d2e240
commit d8a4e563d0

View File

@@ -2102,13 +2102,13 @@ ExpandBufnames(pat, num_file, file, options)
/* /*
* attempt == 0: try match with '\<', match at start of word * 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 */ 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 (prog == NULL)
{ {
if (patc != pat) if (patc != pat)