mirror of
https://github.com/neovim/neovim.git
synced 2024-12-29 14:41:06 -07:00
Merge pull request #13526 from janlazo/vim-8.1.0839
vim-patch:8.1.{839,1630,2382},8.2.{669,739,1911,2136,2140}
This commit is contained in:
commit
0285fae5ec
@ -2463,7 +2463,7 @@ static void f_fnameescape(typval_T *argvars, typval_T *rettv, FunPtr fptr)
|
||||
static void f_fnamemodify(typval_T *argvars, typval_T *rettv, FunPtr fptr)
|
||||
{
|
||||
char_u *fbuf = NULL;
|
||||
size_t len;
|
||||
size_t len = 0;
|
||||
char buf[NUMBUFLEN];
|
||||
const char *fname = tv_get_string_chk(&argvars[0]);
|
||||
const char *const mods = tv_get_string_buf_chk(&argvars[1], buf);
|
||||
@ -2472,8 +2472,10 @@ static void f_fnamemodify(typval_T *argvars, typval_T *rettv, FunPtr fptr)
|
||||
} else {
|
||||
len = strlen(fname);
|
||||
size_t usedlen = 0;
|
||||
(void)modify_fname((char_u *)mods, false, &usedlen,
|
||||
(char_u **)&fname, &fbuf, &len);
|
||||
if (mods != NULL && *mods != NUL) {
|
||||
(void)modify_fname((char_u *)mods, false, &usedlen,
|
||||
(char_u **)&fname, &fbuf, &len);
|
||||
}
|
||||
}
|
||||
|
||||
rettv->v_type = VAR_STRING;
|
||||
|
@ -492,7 +492,7 @@ static inline void tv_list_ref(list_T *const l)
|
||||
static inline void tv_list_set_ret(typval_T *const tv, list_T *const l)
|
||||
REAL_FATTR_ALWAYS_INLINE REAL_FATTR_NONNULL_ARG(1);
|
||||
|
||||
/// Set a list as the return value
|
||||
/// Set a list as the return value. Increments the reference count.
|
||||
///
|
||||
/// @param[out] tv Object to receive the list
|
||||
/// @param[in,out] l List to pass to the object
|
||||
|
Loading…
Reference in New Issue
Block a user