vim-patch:8.1.0130: ":profdel func" does not work if func was called already

Problem:    ":profdel func" does not work if func was called already.
            (Dominique Pelle)
Solution:   Reset uf_profiling and add a flag to indicate initialization was
            done.
ad64809610
This commit is contained in:
Daniel Hahler
2019-06-08 13:04:06 +02:00
parent b398b1eedd
commit 7823b35781
2 changed files with 31 additions and 23 deletions

View File

@@ -260,6 +260,7 @@ struct ufunc {
garray_T uf_args; ///< arguments
garray_T uf_lines; ///< function lines
int uf_profiling; ///< true when func is being profiled
int uf_prof_initialized;
// Profiling the function as a whole.
int uf_tm_count; ///< nr of calls
proftime_T uf_tm_total; ///< time spent in function + children