diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-06-06 14:01:46 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-06-06 14:01:46 +0200 |
commit | 8a7f5a2d4379bdc16502c01456bb4dc5051ed965 (patch) | |
tree | 7d186db050fb2682a54269a598f65dbffc75cb6d /src/structs.h | |
parent | cd2d8bb6ea55179d69aaf559942133ed8e93341e (diff) | |
download | vim-git-8a7f5a2d4379bdc16502c01456bb4dc5051ed965.tar.gz |
updated for version 7.3.1129v7.3.1129
Problem: Can't see what pattern in syntax highlighting is slow.
Solution: Add the ":syntime" command.
Diffstat (limited to 'src/structs.h')
-rw-r--r-- | src/structs.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/structs.h b/src/structs.h index d7bb88e5a..20b12baf0 100644 --- a/src/structs.h +++ b/src/structs.h @@ -1206,6 +1206,18 @@ struct dictvar_S typedef struct qf_info_S qf_info_T; #endif +#ifdef FEAT_RELTIME +/* + * Used for :syntime: timing of executing a syntax pattern. + */ +typedef struct { + proftime_T total; /* total time used */ + proftime_T slowest; /* time of slowest call */ + long count; /* nr of times used */ + long match; /* nr of times matched */ +} syn_time_T; +#endif + /* * These are items normally related to a buffer. But when using ":ownsyntax" * a window may have its own instance. @@ -1230,6 +1242,9 @@ typedef struct { long b_syn_sync_linebreaks; /* offset for multi-line pattern */ char_u *b_syn_linecont_pat; /* line continuation pattern */ regprog_T *b_syn_linecont_prog; /* line continuation program */ +#ifdef FEAT_RELTIME + syn_time_T b_syn_linecont_time; +#endif int b_syn_linecont_ic; /* ignore-case flag for above */ int b_syn_topgrp; /* for ":syntax include" */ # ifdef FEAT_CONCEAL |