Mercurial > vim
diff src/fileio.c @ 15794:0d8291665b59 v8.1.0904
patch 8.1.0904: USE_LONG_FNAME never defined
commit https://github.com/vim/vim/commit/00f148d2f24fb955ab36b0833811582c58b2cf2f
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Feb 12 22:37:27 2019 +0100
patch 8.1.0904: USE_LONG_FNAME never defined
Problem: USE_LONG_FNAME never defined.
Solution: Remove using USE_LONG_FNAME. (Ken Takata, closes https://github.com/vim/vim/issues/3938)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 12 Feb 2019 22:45:06 +0100 |
parents | 7f91de3f5e35 |
children | 40336d427dd2 |
line wrap: on
line diff
--- a/src/fileio.c +++ b/src/fileio.c @@ -6224,13 +6224,7 @@ buf_modname( */ for (ptr = retval + fnamelen; ptr > retval; MB_PTR_BACK(retval, ptr)) { - if (*ext == '.' -#ifdef USE_LONG_FNAME - && (!USE_LONG_FNAME || shortname) -#else - && shortname -#endif - ) + if (*ext == '.' && shortname) if (*ptr == '.') /* replace '.' by '_' */ *ptr = '_'; if (vim_ispathsep(*ptr)) @@ -6249,11 +6243,7 @@ buf_modname( /* * For 8.3 file names we may have to reduce the length. */ -#ifdef USE_LONG_FNAME - if (!USE_LONG_FNAME || shortname) -#else if (shortname) -#endif { /* * If there is no file name, or the file name ends in '/', and the @@ -6291,7 +6281,7 @@ buf_modname( else if ((int)STRLEN(e) + extlen > 4) s = e + 4 - extlen; } -#if defined(USE_LONG_FNAME) || defined(WIN3264) +#ifdef WIN3264 /* * If there is no file name, and the extension starts with '.', put a * '_' before the dot, because just ".ext" may be invalid if it's on a @@ -6310,11 +6300,7 @@ buf_modname( /* * Prepend the dot. */ - if (prepend_dot && !shortname && *(e = gettail(retval)) != '.' -#ifdef USE_LONG_FNAME - && USE_LONG_FNAME -#endif - ) + if (prepend_dot && !shortname && *(e = gettail(retval)) != '.') { STRMOVE(e + 1, e); *e = '.';