From 1e997827f12b38359fe8a4e7b033bbb6465b6668 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 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, "= 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 226386ac5..207ac12b0 100644 --- a/src/version.c +++ b/src/version.c @@ -741,6 +741,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 637, /**/ 636, /**/ -- 2.50.1