diff options
author | Bram Moolenaar <Bram@vim.org> | 2005-05-18 22:06:55 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2005-05-18 22:06:55 +0000 |
commit | d8a4e563d0827c88caea9baf97f70083737fb9c9 (patch) | |
tree | 0ebb75804c7ee3d7b60bb6545266e60b44a03697 /src/buffer.c | |
parent | c9a2d2e2403663946ea804a00ffa3699d1d8b927 (diff) | |
download | vim-git-d8a4e563d0827c88caea9baf97f70083737fb9c9.tar.gz |
updated for version 7.0072
Diffstat (limited to 'src/buffer.c')
-rw-r--r-- | src/buffer.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/buffer.c b/src/buffer.c index 977233644..668cd9c00 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -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) |