mirror of
https://github.com/neovim/neovim.git
synced 2025-09-17 08:48:16 +00:00
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)
0b05e491b4
This commit is contained in:
@@ -430,7 +430,11 @@ static efm_T * parse_efm_option(char_u *efm)
|
|||||||
for (int round = FMT_PATTERNS - 1; round >= 0; ) {
|
for (int round = FMT_PATTERNS - 1; round >= 0; ) {
|
||||||
i += STRLEN(fmt_pat[round--].pattern);
|
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
|
i += 2; // "%f" can become two chars longer
|
||||||
|
#endif
|
||||||
char_u *fmtstr = xmalloc(i);
|
char_u *fmtstr = xmalloc(i);
|
||||||
|
|
||||||
while (efm[0] != NUL) {
|
while (efm[0] != NUL) {
|
||||||
|
Reference in New Issue
Block a user