Expand :profile's filename #2390

vim_strsave() is replaced by expand_env_save_opt(), which expands ~ for
convenience:

    :profile start ~/.nvim/prof.log

Prior to this change you had to specify an absolute path.
This commit is contained in:
Marco Hinz
2015-04-10 13:05:57 +02:00
committed by Justin M. Keyes
parent 5b390395e6
commit e4975f82c9

View File

@ -760,7 +760,7 @@ void ex_profile(exarg_T *eap)
if (len == 5 && STRNCMP(eap->arg, "start", 5) == 0 && *e != NUL) {
free(profile_fname);
profile_fname = vim_strsave(e);
profile_fname = expand_env_save_opt(e, true);
do_profiling = PROF_YES;
profile_set_wait(profile_zero());
set_vim_var_nr(VV_PROFILING, 1L);