diff options
author | John Schmidt <john.schmidt.h@gmail.com> | 2014-03-31 00:39:11 +0200 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-04-01 08:08:07 -0300 |
commit | e29e9563480946e13252f5aea6a9d137c9483a61 (patch) | |
tree | b07357c0b6cbbc83e0ef3f9d4b7019b8ffa61dec /src/path.c | |
parent | 2cb026c65c489743b3c5a4955dc9f276a18bd530 (diff) | |
download | rneovim-e29e9563480946e13252f5aea6a9d137c9483a61.tar.gz rneovim-e29e9563480946e13252f5aea6a9d137c9483a61.tar.bz2 rneovim-e29e9563480946e13252f5aea6a9d137c9483a61.zip |
Move after_pathsep from misc2.c
Diffstat (limited to 'src/path.c')
-rw-r--r-- | src/path.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/path.c b/src/path.c index a83f4f3fd9..078c26467a 100644 --- a/src/path.c +++ b/src/path.c @@ -1662,3 +1662,14 @@ char_u *fix_fname(char_u *fname) #endif } +/* + * Return TRUE if "p" points to just after a path separator. + * Takes care of multi-byte characters. + * "b" must point to the start of the file name + */ +int after_pathsep(char_u *b, char_u *p) +{ + return p > b && vim_ispathsep(p[-1]) + && (!has_mbyte || (*mb_head_off)(b, p - 1) == 0); +} + |