diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-05-07 03:38:24 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-05-07 03:43:47 -0400 |
commit | 4423759d0360acda87dd829f361957d55748dab5 (patch) | |
tree | 019b123ae688aeaf425d30aea9c3b5848dabd0bb /src | |
parent | 32059526de9419c30d7aa2a8bb7634ebbe29dd9d (diff) | |
download | rneovim-4423759d0360acda87dd829f361957d55748dab5.tar.gz rneovim-4423759d0360acda87dd829f361957d55748dab5.tar.bz2 rneovim-4423759d0360acda87dd829f361957d55748dab5.zip |
vim-patch:8.0.1144: using wrong #ifdef for computing length
Problem: Using wrong #ifdef for computing length.
Solution: use BACKSLASH_IN_FILENAME instead of COLON_IN_FILENAME. (Yasuhiro
Matsomoto, closes vim/vim#2153)
https://github.com/vim/vim/commit/0b05e491b473dbf39cd9f519030bf6363c272300
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/quickfix.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c index be643a6062..786e40254d 100644 --- a/src/nvim/quickfix.c +++ b/src/nvim/quickfix.c @@ -430,7 +430,11 @@ static efm_T * parse_efm_option(char_u *efm) for (int round = FMT_PATTERNS - 1; round >= 0; ) { i += STRLEN(fmt_pat[round--].pattern); } +#ifdef BACKSLASH_IN_FILENAME + i += 12; // "%f" can become twelve chars longer (see efm_to_regpat) +#else i += 2; // "%f" can become two chars longer +#endif char_u *fmtstr = xmalloc(i); while (efm[0] != NUL) { |