|
Karsten Hopp |
be7907 |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
be7907 |
Subject: Patch 7.3.1148
|
|
Karsten Hopp |
be7907 |
Fcc: outbox
|
|
Karsten Hopp |
be7907 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
be7907 |
Mime-Version: 1.0
|
|
Karsten Hopp |
be7907 |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
be7907 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
be7907 |
------------
|
|
Karsten Hopp |
be7907 |
|
|
Karsten Hopp |
be7907 |
Patch 7.3.1148
|
|
Karsten Hopp |
be7907 |
Problem: No command line completion for ":syntime".
|
|
Karsten Hopp |
be7907 |
Solution: Implement the completion. (Dominique Pelle)
|
|
Karsten Hopp |
be7907 |
Files: runtime/doc/map.txt, src/ex_cmds.h, src/ex_docmd.c,
|
|
Karsten Hopp |
be7907 |
src/ex_getln.c, src/proto/syntax.pro, src/syntax.c, src/vim.h
|
|
Karsten Hopp |
be7907 |
|
|
Karsten Hopp |
be7907 |
|
|
Karsten Hopp |
be7907 |
*** ../vim-7.3.1147/runtime/doc/map.txt 2012-08-15 14:04:50.000000000 +0200
|
|
Karsten Hopp |
be7907 |
--- runtime/doc/map.txt 2013-06-08 15:08:20.000000000 +0200
|
|
Karsten Hopp |
be7907 |
***************
|
|
Karsten Hopp |
be7907 |
*** 1225,1230 ****
|
|
Karsten Hopp |
be7907 |
--- 1242,1248 ----
|
|
Karsten Hopp |
be7907 |
-complete=shellcmd Shell command
|
|
Karsten Hopp |
be7907 |
-complete=sign |:sign| suboptions
|
|
Karsten Hopp |
be7907 |
-complete=syntax syntax file names |'syntax'|
|
|
Karsten Hopp |
be7907 |
+ -complete=syntime |:syntime| suboptions
|
|
Karsten Hopp |
be7907 |
-complete=tag tags
|
|
Karsten Hopp |
be7907 |
-complete=tag_listfiles tags, file names are shown when CTRL-D is hit
|
|
Karsten Hopp |
be7907 |
-complete=user user names
|
|
Karsten Hopp |
be7907 |
*** ../vim-7.3.1147/src/ex_cmds.h 2013-06-06 14:01:35.000000000 +0200
|
|
Karsten Hopp |
be7907 |
--- src/ex_cmds.h 2013-06-08 15:08:20.000000000 +0200
|
|
Karsten Hopp |
be7907 |
***************
|
|
Karsten Hopp |
be7907 |
*** 926,932 ****
|
|
Karsten Hopp |
be7907 |
EX(CMD_syntax, "syntax", ex_syntax,
|
|
Karsten Hopp |
be7907 |
EXTRA|NOTRLCOM|CMDWIN),
|
|
Karsten Hopp |
be7907 |
EX(CMD_syntime, "syntime", ex_syntime,
|
|
Karsten Hopp |
be7907 |
! WORD1|TRLBAR|CMDWIN),
|
|
Karsten Hopp |
be7907 |
EX(CMD_syncbind, "syncbind", ex_syncbind,
|
|
Karsten Hopp |
be7907 |
TRLBAR),
|
|
Karsten Hopp |
be7907 |
EX(CMD_t, "t", ex_copymove,
|
|
Karsten Hopp |
be7907 |
--- 926,932 ----
|
|
Karsten Hopp |
be7907 |
EX(CMD_syntax, "syntax", ex_syntax,
|
|
Karsten Hopp |
be7907 |
EXTRA|NOTRLCOM|CMDWIN),
|
|
Karsten Hopp |
be7907 |
EX(CMD_syntime, "syntime", ex_syntime,
|
|
Karsten Hopp |
be7907 |
! NEEDARG|WORD1|TRLBAR|CMDWIN),
|
|
Karsten Hopp |
be7907 |
EX(CMD_syncbind, "syncbind", ex_syncbind,
|
|
Karsten Hopp |
be7907 |
TRLBAR),
|
|
Karsten Hopp |
be7907 |
EX(CMD_t, "t", ex_copymove,
|
|
Karsten Hopp |
be7907 |
*** ../vim-7.3.1147/src/ex_docmd.c 2013-06-06 14:55:16.000000000 +0200
|
|
Karsten Hopp |
be7907 |
--- src/ex_docmd.c 2013-06-08 15:08:20.000000000 +0200
|
|
Karsten Hopp |
be7907 |
***************
|
|
Karsten Hopp |
be7907 |
*** 3994,3999 ****
|
|
Karsten Hopp |
be7907 |
--- 3994,4005 ----
|
|
Karsten Hopp |
be7907 |
xp->xp_pattern = arg;
|
|
Karsten Hopp |
be7907 |
break;
|
|
Karsten Hopp |
be7907 |
#endif
|
|
Karsten Hopp |
be7907 |
+ #if defined(FEAT_PROFILE)
|
|
Karsten Hopp |
be7907 |
+ case CMD_syntime:
|
|
Karsten Hopp |
be7907 |
+ xp->xp_context = EXPAND_SYNTIME;
|
|
Karsten Hopp |
be7907 |
+ xp->xp_pattern = arg;
|
|
Karsten Hopp |
be7907 |
+ break;
|
|
Karsten Hopp |
be7907 |
+ #endif
|
|
Karsten Hopp |
be7907 |
|
|
Karsten Hopp |
be7907 |
#endif /* FEAT_CMDL_COMPL */
|
|
Karsten Hopp |
be7907 |
|
|
Karsten Hopp |
be7907 |
***************
|
|
Karsten Hopp |
be7907 |
*** 5436,5441 ****
|
|
Karsten Hopp |
be7907 |
--- 5442,5450 ----
|
|
Karsten Hopp |
be7907 |
{EXPAND_MAPPINGS, "mapping"},
|
|
Karsten Hopp |
be7907 |
{EXPAND_MENUS, "menu"},
|
|
Karsten Hopp |
be7907 |
{EXPAND_OWNSYNTAX, "syntax"},
|
|
Karsten Hopp |
be7907 |
+ #if defined(FEAT_PROFILE)
|
|
Karsten Hopp |
be7907 |
+ {EXPAND_SYNTIME, "syntime"},
|
|
Karsten Hopp |
be7907 |
+ #endif
|
|
Karsten Hopp |
be7907 |
{EXPAND_SETTINGS, "option"},
|
|
Karsten Hopp |
be7907 |
{EXPAND_SHELLCMD, "shellcmd"},
|
|
Karsten Hopp |
be7907 |
#if defined(FEAT_SIGNS)
|
|
Karsten Hopp |
be7907 |
*** ../vim-7.3.1147/src/ex_getln.c 2013-04-24 15:39:06.000000000 +0200
|
|
Karsten Hopp |
be7907 |
--- src/ex_getln.c 2013-06-08 15:08:20.000000000 +0200
|
|
Karsten Hopp |
be7907 |
***************
|
|
Karsten Hopp |
be7907 |
*** 4674,4679 ****
|
|
Karsten Hopp |
be7907 |
--- 4674,4682 ----
|
|
Karsten Hopp |
be7907 |
#ifdef FEAT_SYN_HL
|
|
Karsten Hopp |
be7907 |
{EXPAND_SYNTAX, get_syntax_name, TRUE, TRUE},
|
|
Karsten Hopp |
be7907 |
#endif
|
|
Karsten Hopp |
be7907 |
+ #ifdef FEAT_PROFILE
|
|
Karsten Hopp |
be7907 |
+ {EXPAND_SYNTIME, get_syntime_arg, TRUE, TRUE},
|
|
Karsten Hopp |
be7907 |
+ #endif
|
|
Karsten Hopp |
be7907 |
{EXPAND_HIGHLIGHT, get_highlight_name, TRUE, TRUE},
|
|
Karsten Hopp |
be7907 |
#ifdef FEAT_AUTOCMD
|
|
Karsten Hopp |
be7907 |
{EXPAND_EVENTS, get_event_name, TRUE, TRUE},
|
|
Karsten Hopp |
be7907 |
*** ../vim-7.3.1147/src/proto/syntax.pro 2013-06-06 14:01:35.000000000 +0200
|
|
Karsten Hopp |
be7907 |
--- src/proto/syntax.pro 2013-06-08 15:08:20.000000000 +0200
|
|
Karsten Hopp |
be7907 |
***************
|
|
Karsten Hopp |
be7907 |
*** 20,25 ****
|
|
Karsten Hopp |
be7907 |
--- 20,26 ----
|
|
Karsten Hopp |
be7907 |
int syn_get_stack_item __ARGS((int i));
|
|
Karsten Hopp |
be7907 |
int syn_get_foldlevel __ARGS((win_T *wp, long lnum));
|
|
Karsten Hopp |
be7907 |
void ex_syntime __ARGS((exarg_T *eap));
|
|
Karsten Hopp |
be7907 |
+ char_u *get_syntime_arg __ARGS((expand_T *xp, int idx));
|
|
Karsten Hopp |
be7907 |
void init_highlight __ARGS((int both, int reset));
|
|
Karsten Hopp |
be7907 |
int load_colors __ARGS((char_u *name));
|
|
Karsten Hopp |
be7907 |
void do_highlight __ARGS((char_u *line, int forceit, int init));
|
|
Karsten Hopp |
be7907 |
*** ../vim-7.3.1147/src/syntax.c 2013-06-07 19:48:29.000000000 +0200
|
|
Karsten Hopp |
be7907 |
--- src/syntax.c 2013-06-08 15:12:43.000000000 +0200
|
|
Karsten Hopp |
be7907 |
***************
|
|
Karsten Hopp |
be7907 |
*** 6577,6582 ****
|
|
Karsten Hopp |
be7907 |
--- 6577,6603 ----
|
|
Karsten Hopp |
be7907 |
}
|
|
Karsten Hopp |
be7907 |
}
|
|
Karsten Hopp |
be7907 |
|
|
Karsten Hopp |
be7907 |
+ #if defined(FEAT_CMDL_COMPL) || defined(PROTO)
|
|
Karsten Hopp |
be7907 |
+ /*
|
|
Karsten Hopp |
be7907 |
+ * Function given to ExpandGeneric() to obtain the possible arguments of the
|
|
Karsten Hopp |
be7907 |
+ * ":syntime {on,off,clear,report}" command.
|
|
Karsten Hopp |
be7907 |
+ */
|
|
Karsten Hopp |
be7907 |
+ char_u *
|
|
Karsten Hopp |
be7907 |
+ get_syntime_arg(xp, idx)
|
|
Karsten Hopp |
be7907 |
+ expand_T *xp UNUSED;
|
|
Karsten Hopp |
be7907 |
+ int idx;
|
|
Karsten Hopp |
be7907 |
+ {
|
|
Karsten Hopp |
be7907 |
+ switch (idx)
|
|
Karsten Hopp |
be7907 |
+ {
|
|
Karsten Hopp |
be7907 |
+ case 0: return (char_u *)"on";
|
|
Karsten Hopp |
be7907 |
+ case 1: return (char_u *)"off";
|
|
Karsten Hopp |
be7907 |
+ case 2: return (char_u *)"clear";
|
|
Karsten Hopp |
be7907 |
+ case 3: return (char_u *)"report";
|
|
Karsten Hopp |
be7907 |
+ }
|
|
Karsten Hopp |
be7907 |
+ return NULL;
|
|
Karsten Hopp |
be7907 |
+ }
|
|
Karsten Hopp |
be7907 |
+ #endif
|
|
Karsten Hopp |
be7907 |
+
|
|
Karsten Hopp |
be7907 |
typedef struct
|
|
Karsten Hopp |
be7907 |
{
|
|
Karsten Hopp |
be7907 |
proftime_T total;
|
|
Karsten Hopp |
be7907 |
***************
|
|
Karsten Hopp |
be7907 |
*** 6610,6616 ****
|
|
Karsten Hopp |
be7907 |
--- 6631,6639 ----
|
|
Karsten Hopp |
be7907 |
{
|
|
Karsten Hopp |
be7907 |
int idx;
|
|
Karsten Hopp |
be7907 |
synpat_T *spp;
|
|
Karsten Hopp |
be7907 |
+ # ifdef FEAT_FLOAT
|
|
Karsten Hopp |
be7907 |
proftime_T tm;
|
|
Karsten Hopp |
be7907 |
+ # endif
|
|
Karsten Hopp |
be7907 |
int len;
|
|
Karsten Hopp |
be7907 |
proftime_T total_total;
|
|
Karsten Hopp |
be7907 |
int total_count = 0;
|
|
Karsten Hopp |
be7907 |
*** ../vim-7.3.1147/src/vim.h 2013-05-30 13:37:23.000000000 +0200
|
|
Karsten Hopp |
be7907 |
--- src/vim.h 2013-06-08 15:08:20.000000000 +0200
|
|
Karsten Hopp |
be7907 |
***************
|
|
Karsten Hopp |
be7907 |
*** 783,788 ****
|
|
Karsten Hopp |
be7907 |
--- 783,789 ----
|
|
Karsten Hopp |
be7907 |
#define EXPAND_LOCALES 40
|
|
Karsten Hopp |
be7907 |
#define EXPAND_HISTORY 41
|
|
Karsten Hopp |
be7907 |
#define EXPAND_USER 42
|
|
Karsten Hopp |
be7907 |
+ #define EXPAND_SYNTIME 43
|
|
Karsten Hopp |
be7907 |
|
|
Karsten Hopp |
be7907 |
/* Values for exmode_active (0 is no exmode) */
|
|
Karsten Hopp |
be7907 |
#define EXMODE_NORMAL 1
|
|
Karsten Hopp |
be7907 |
*** ../vim-7.3.1147/src/version.c 2013-06-08 14:38:23.000000000 +0200
|
|
Karsten Hopp |
be7907 |
--- src/version.c 2013-06-08 15:23:00.000000000 +0200
|
|
Karsten Hopp |
be7907 |
***************
|
|
Karsten Hopp |
be7907 |
*** 730,731 ****
|
|
Karsten Hopp |
be7907 |
--- 730,733 ----
|
|
Karsten Hopp |
be7907 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
be7907 |
+ /**/
|
|
Karsten Hopp |
be7907 |
+ 1148,
|
|
Karsten Hopp |
be7907 |
/**/
|
|
Karsten Hopp |
be7907 |
|
|
Karsten Hopp |
be7907 |
--
|
|
Karsten Hopp |
be7907 |
hundred-and-one symptoms of being an internet addict:
|
|
Karsten Hopp |
be7907 |
113. You are asked about a bus schedule, you wonder if it is 16 or 32 bits.
|
|
Karsten Hopp |
be7907 |
|
|
Karsten Hopp |
be7907 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
be7907 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
be7907 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
be7907 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|