From 0a8c8c2e46d6f9fcd290e3f023fbb63fa2cfa075 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 17 Feb 2015 16:04:57 +0100 Subject: [PATCH] updated for version 7.4.637 Problem: Incorrectly read the number of buffer for which an autocommand should be registered. Solution: Reverse check for "". (Lech Lorens) --- src/fileio.c | 13 +++++++------ src/version.c | 2 ++ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/fileio.c b/src/fileio.c index c4bf5577e3..f40b2daaeb 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -8565,21 +8565,22 @@ do_autocmd_event(event, pat, nested, cmd, forceit, group) is_buflocal = FALSE; buflocal_nr = 0; - if (patlen >= 7 && STRNCMP(pat, "= 8 && STRNCMP(pat, "') { - /* Error will be printed only for addition. printing and removing - * will proceed silently. */ + /* "": Error will be printed only for addition. + * printing and removing will proceed silently. */ is_buflocal = TRUE; if (patlen == 8) + /* "" */ buflocal_nr = curbuf->b_fnum; else if (patlen > 9 && pat[7] == '=') { - /* */ - if (patlen == 13 && STRNICMP(pat, "", 13)) + if (patlen == 13 && STRNICMP(pat, "", 13) == 0) + /* "" */ buflocal_nr = autocmd_bufnr; - /* */ else if (skipdigits(pat + 8) == pat + patlen - 1) + /* "" */ buflocal_nr = atoi((char *)pat + 8); } } diff --git a/src/version.c b/src/version.c index bfe2d8f3fa..b856e781c6 100644 --- a/src/version.c +++ b/src/version.c @@ -756,6 +756,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 637, /**/ 636, /**/