Mercurial > vim
diff src/memline.c @ 14475:dddba3937532 v8.1.0251
patch 8.1.0251: using full path is not supported for 'backupdir'
commit https://github.com/vim/vim/commit/b782ba475a3f8f2b0be99dda164ba4545347f60f
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Aug 7 21:39:28 2018 +0200
patch 8.1.0251: using full path is not supported for 'backupdir'
Problem: Using a full path is supported for 'directory' but not for
'backupdir'. (Mikolaj Machowski)
Solution: Support 'backupdir' as well. (Christian Brabandt, closes #179)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 07 Aug 2018 21:45:05 +0200 |
parents | 8631b54ae2a2 |
children | 23d6d9e9ae3e |
line wrap: on
line diff
--- a/src/memline.c +++ b/src/memline.c @@ -262,9 +262,6 @@ static int fnamecmp_ino(char_u *, char_u #endif static void long_to_char(long, char_u *); static long char_to_long(char_u *); -#if defined(UNIX) || defined(WIN3264) -static char_u *make_percent_swname(char_u *dir, char_u *name); -#endif #ifdef FEAT_CRYPT static cryptstate_T *ml_crypt_prepare(memfile_T *mfp, off_T offset, int reading); #endif @@ -2007,18 +2004,18 @@ recover_names( return file_count; } -#if defined(UNIX) || defined(WIN3264) /* Need _very_ long file names */ +#if defined(UNIX) || defined(WIN3264) || defined(PROTO) /* + * Need _very_ long file names. * Append the full path to name with path separators made into percent * signs, to dir. An unnamed buffer is handled as "" (<currentdir>/"") */ - static char_u * + char_u * make_percent_swname(char_u *dir, char_u *name) { - char_u *d, *s, *f; - - f = fix_fname(name != NULL ? name : (char_u *) ""); - d = NULL; + char_u *d = NULL, *s, *f; + + f = fix_fname(name != NULL ? name : (char_u *)""); if (f != NULL) { s = alloc((unsigned)(STRLEN(f) + 1)); @@ -4070,8 +4067,6 @@ attention_message( } #if defined(FEAT_EVAL) -static int do_swapexists(buf_T *buf, char_u *fname); - /* * Trigger the SwapExists autocommands. * Returns a value for equivalent to do_dialog() (see below):