# HG changeset patch # User Bram Moolenaar # Date 1424185497 -3600 # Node ID a532340f39406fa50e8db45f769468bdeff1e982 # Parent 3c312e259c799e4f1e25390cf157ccc222b63c24 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) diff --git a/src/fileio.c b/src/fileio.c --- a/src/fileio.c +++ b/src/fileio.c @@ -8527,21 +8527,22 @@ do_autocmd_event(event, pat, nested, cmd 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 --- 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,