diff options
-rw-r--r-- | src/charset.c | 17 | ||||
-rw-r--r-- | src/ex_cmds.c | 2 | ||||
-rw-r--r-- | src/ex_docmd.c | 7 | ||||
-rw-r--r-- | src/proto/charset.pro | 1 | ||||
-rw-r--r-- | src/version.c | 4 |
5 files changed, 27 insertions, 4 deletions
diff --git a/src/charset.c b/src/charset.c index 5a2952cd6..32d755532 100644 --- a/src/charset.c +++ b/src/charset.c @@ -932,6 +932,23 @@ vim_isfilec(c) } /* + * return TRUE if 'c' is a valid file-name character or a wildcard character + * Assume characters above 0x100 are valid (multi-byte). + * Explicitly interpret ']' as a wildcard character as mch_has_wildcard("]") + * returns false. + */ + int +vim_isfilec_or_wc(c) + int c; +{ + char_u buf[2]; + + buf[0] = (char_u)c; + buf[1] = NUL; + return vim_isfilec(c) || c == ']' || mch_has_wildcard(buf); +} + +/* * return TRUE if 'c' is a printable character * Assume characters above 0x100 are printable (multi-byte), except for * Unicode. diff --git a/src/ex_cmds.c b/src/ex_cmds.c index 46671dca0..1b2672fd2 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -3776,7 +3776,7 @@ do_ecmd(fnum, ffname, sfname, eap, newlnum, flags) workshop_file_opened((char *)curbuf->b_ffname, curbuf->b_p_ro); # endif # ifdef FEAT_NETBEANS_INTG - if (usingNetbeans & ((flags & ECMD_SET_HELP) != ECMD_SET_HELP)) + if (usingNetbeans && ((flags & ECMD_SET_HELP) != ECMD_SET_HELP)) netbeans_file_opened(curbuf); # endif } diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 73a990c72..0b33e7994 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -3311,9 +3311,10 @@ set_one_cmd_context(xp, buff) in_quote = !in_quote; } #ifdef SPACE_IN_FILENAME - else if (!vim_isfilec(c) && (!(ea.argt & NOSPC) || usefilter)) + else if (!vim_isfilec_or_wc(c) + && (!(ea.argt & NOSPC) || usefilter)) #else - else if (!vim_isfilec(c)) + else if (!vim_isfilec_or_wc(c)) #endif { while (*p != NUL) @@ -3324,7 +3325,7 @@ set_one_cmd_context(xp, buff) else #endif c = *p; - if (c == '`' || vim_isfilec(c)) + if (c == '`' || vim_isfilec_or_wc(c)) break; #ifdef FEAT_MBYTE if (has_mbyte) diff --git a/src/proto/charset.pro b/src/proto/charset.pro index 4b6890d18..ff0c45c27 100644 --- a/src/proto/charset.pro +++ b/src/proto/charset.pro @@ -21,6 +21,7 @@ int vim_iswordc __ARGS((int c)); int vim_iswordp __ARGS((char_u *p)); int vim_iswordc_buf __ARGS((char_u *p, buf_T *buf)); int vim_isfilec __ARGS((int c)); +int vim_isfilec_or_wc __ARGS((int c)); int vim_isprintc __ARGS((int c)); int vim_isprintc_strict __ARGS((int c)); int lbr_chartabsize __ARGS((unsigned char *s, colnr_T col)); diff --git a/src/version.c b/src/version.c index a28301502..2b04ff436 100644 --- a/src/version.c +++ b/src/version.c @@ -667,6 +667,10 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 84, +/**/ + 83, +/**/ 82, /**/ 81, |