summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2015-02-17 16:04:57 +0100
committerBram Moolenaar <Bram@vim.org>2015-02-17 16:04:57 +0100
commit1e997827f12b38359fe8a4e7b033bbb6465b6668 (patch)
tree6dd3ba99308bb8d74c2eacea2d11122deb0af2e6
parent35e7594dd429f7a8a06cefd61c3e8d48b9bd74e2 (diff)
downloadvim-git-1e997827f12b38359fe8a4e7b033bbb6465b6668.tar.gz
updated for version 7.4.637v7.4.637
Problem: Incorrectly read the number of buffer for which an autocommand should be registered. Solution: Reverse check for "<buffer=abuf>". (Lech Lorens)
-rw-r--r--src/fileio.c13
-rw-r--r--src/version.c2
2 files changed, 9 insertions, 6 deletions
diff --git a/src/fileio.c b/src/fileio.c
index 319c7ba97..1d16ee8dd 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -8527,21 +8527,22 @@ do_autocmd_event(event, pat, nested, cmd, forceit, group)
is_buflocal = FALSE;
buflocal_nr = 0;
- if (patlen >= 7 && STRNCMP(pat, "<buffer", 7) == 0
+ if (patlen >= 8 && STRNCMP(pat, "<buffer", 7) == 0
&& pat[patlen - 1] == '>')
{
- /* Error will be printed only for addition. printing and removing
- * will proceed silently. */
+ /* "<buffer...>": Error will be printed only for addition.
+ * printing and removing will proceed silently. */
is_buflocal = TRUE;
if (patlen == 8)
+ /* "<buffer>" */
buflocal_nr = curbuf->b_fnum;
else if (patlen > 9 && pat[7] == '=')
{
- /* <buffer=abuf> */
- if (patlen == 13 && STRNICMP(pat, "<buffer=abuf>", 13))
+ if (patlen == 13 && STRNICMP(pat, "<buffer=abuf>", 13) == 0)
+ /* "<buffer=abuf>" */
buflocal_nr = autocmd_bufnr;
- /* <buffer=123> */
else if (skipdigits(pat + 8) == pat + patlen - 1)
+ /* "<buffer=123>" */
buflocal_nr = atoi((char *)pat + 8);
}
}
diff --git a/src/version.c b/src/version.c
index 226386ac5..207ac12b0 100644
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 637,
+/**/
636,
/**/
635,