@@ -10650,31 +10650,33 @@ find_cmdline_var(char_u *src, int *usedlen)
1065010650 "%" ,
1065110651#define SPEC_PERC 0
1065210652 "#" ,
10653- #define SPEC_HASH 1
10653+ #define SPEC_HASH ( SPEC_PERC + 1 )
1065410654 "<cword>" , /* cursor word */
10655- #define SPEC_CWORD 2
10655+ #define SPEC_CWORD ( SPEC_HASH + 1 )
1065610656 "<cWORD>" , /* cursor WORD */
10657- #define SPEC_CCWORD 3
10657+ #define SPEC_CCWORD (SPEC_CWORD + 1 )
10658+ "<cexpr>" , /* expr under cursor */
10659+ #define SPEC_CEXPR (SPEC_CCWORD + 1 )
1065810660 "<cfile>" , /* cursor path name */
10659- #define SPEC_CFILE 4
10661+ #define SPEC_CFILE ( SPEC_CEXPR + 1 )
1066010662 "<sfile>" , /* ":so" file name */
10661- #define SPEC_SFILE 5
10663+ #define SPEC_SFILE ( SPEC_CFILE + 1 )
1066210664 "<slnum>" , /* ":so" file line number */
10663- #define SPEC_SLNUM 6
10665+ #define SPEC_SLNUM ( SPEC_SFILE + 1 )
1066410666#ifdef FEAT_AUTOCMD
1066510667 "<afile>" , /* autocommand file name */
10666- # define SPEC_AFILE 7
10668+ # define SPEC_AFILE ( SPEC_SLNUM + 1 )
1066710669 "<abuf>" , /* autocommand buffer number */
10668- # define SPEC_ABUF 8
10670+ # define SPEC_ABUF ( SPEC_AFILE + 1 )
1066910671 "<amatch>" , /* autocommand match name */
10670- # define SPEC_AMATCH 9
10672+ # define SPEC_AMATCH ( SPEC_ABUF + 1 )
1067110673#endif
1067210674#ifdef FEAT_CLIENTSERVER
1067310675 "<client>"
1067410676# ifdef FEAT_AUTOCMD
10675- # define SPEC_CLIENT 10
10677+ # define SPEC_CLIENT ( SPEC_AMATCH + 1 )
1067610678# else
10677- # define SPEC_CLIENT 7
10679+ # define SPEC_CLIENT ( SPEC_SLNUM + 1 )
1067810680# endif
1067910681#endif
1068010682 };
@@ -10762,10 +10764,13 @@ eval_vars(
1076210764 /*
1076310765 * word or WORD under cursor
1076410766 */
10765- if (spec_idx == SPEC_CWORD || spec_idx == SPEC_CCWORD )
10767+ if (spec_idx == SPEC_CWORD || spec_idx == SPEC_CCWORD
10768+ || spec_idx == SPEC_CEXPR )
1076610769 {
10767- resultlen = find_ident_under_cursor (& result , spec_idx == SPEC_CWORD ?
10768- (FIND_IDENT |FIND_STRING ) : FIND_STRING );
10770+ resultlen = find_ident_under_cursor (& result ,
10771+ spec_idx == SPEC_CWORD ? (FIND_IDENT | FIND_STRING )
10772+ : spec_idx == SPEC_CEXPR ? (FIND_IDENT | FIND_STRING | FIND_EVAL )
10773+ : FIND_STRING );
1076910774 if (resultlen == 0 )
1077010775 {
1077110776 * errormsg = (char_u * )"" ;
0 commit comments