aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLech Lorens <lech.lorens@gmail.com>2015-03-10 02:05:47 +0100
committerJustin M. Keyes <justinkz@gmail.com>2015-03-13 17:25:04 -0400
commitbdbbdb5888e18025b0f95849a88fe6cb53454183 (patch)
treedbe2908863d630a9cf76685e5df4462caf77b80b /src
parentdda914fd6a94237dab1d43f6a5113602e6b73304 (diff)
downloadrneovim-bdbbdb5888e18025b0f95849a88fe6cb53454183.tar.gz
rneovim-bdbbdb5888e18025b0f95849a88fe6cb53454183.tar.bz2
rneovim-bdbbdb5888e18025b0f95849a88fe6cb53454183.zip
vim-patch:7.4.637 #2126
Problem: Incorrectly read the number of buffer for which an autocommand should be registered. Solution: Reverse check for "<buffer=abuf>". (Lech Lorens) https://code.google.com/p/vim/source/detail?r=v7-4-637
Diffstat (limited to 'src')
-rw-r--r--src/nvim/fileio.c13
-rw-r--r--src/nvim/version.c38
2 files changed, 45 insertions, 6 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c
index 24fe547e56..aab55bda77 100644
--- a/src/nvim/fileio.c
+++ b/src/nvim/fileio.c
@@ -5878,19 +5878,20 @@ static int do_autocmd_event(event_T event, char_u *pat, int nested, char_u *cmd,
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/nvim/version.c b/src/nvim/version.c
index 2c819c6f42..4d25c63111 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -178,6 +178,44 @@ static char *(features[]) = {
// clang-format off
static int included_patches[] = {
+ //658,
+ //657,
+ //656,
+ //655,
+ //654,
+ //653,
+ //652,
+ //651,
+ //650,
+ //649,
+ //648,
+ //647,
+ //646,
+ //645,
+ //644,
+ //643,
+ //642,
+ //641,
+ //640,
+ //639,
+ //638,
+ 637,
+ //636,
+ //635,
+ //634,
+ //633,
+ //632,
+ //631,
+ //630,
+ //629,
+ //628,
+ //627,
+ //626,
+ //625,
+ //624,
+ //623,
+ //622,
+ //621,
//620,
//619,
//618,