diff src/ex_cmds2.c @ 6749:57e81ce74c06 v7.4.697

patch 7.4.697 Problem: The filename used for ":profile" must be given literally. Solution: Expand "~" and environment variables. (Marco Hinz)
author Bram Moolenaar <bram@vim.org>
date Mon, 13 Apr 2015 15:37:56 +0200
parents ceda6d8af447
children 286fd54c7ae3
line wrap: on
line diff
--- a/src/ex_cmds2.c
+++ b/src/ex_cmds2.c
@@ -1108,7 +1108,7 @@ ex_profile(eap)
     if (len == 5 && STRNCMP(eap->arg, "start", 5) == 0 && *e != NUL)
     {
 	vim_free(profile_fname);
-	profile_fname = vim_strsave(e);
+	profile_fname = expand_env_save_opt(e, TRUE);
 	do_profiling = PROF_YES;
 	profile_zero(&prof_wait_time);
 	set_vim_var_nr(VV_PROFILING, 1L);