mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
updated for version 7.3.841
Problem: When a "cond ? one : two" expression has a subscript it is not parsed correctly. (Andy Wokula) Solution: Handle a subscript also when the type is unknown. (Christian Brabandt)
This commit is contained in:
parent
f5e44a7e90
commit
e17c260335
10
src/eval.c
10
src/eval.c
@ -5164,6 +5164,16 @@ eval7(arg, rettv, evaluate, want_string)
|
|||||||
ret = get_func_tv(s, len, rettv, arg,
|
ret = get_func_tv(s, len, rettv, arg,
|
||||||
curwin->w_cursor.lnum, curwin->w_cursor.lnum,
|
curwin->w_cursor.lnum, curwin->w_cursor.lnum,
|
||||||
&len, evaluate, NULL);
|
&len, evaluate, NULL);
|
||||||
|
|
||||||
|
/* If evaluate is FALSE rettv->v_type was not set in
|
||||||
|
* get_func_tv, but it's needed in handle_subscript() to parse
|
||||||
|
* what follows. So set it here. */
|
||||||
|
if (rettv->v_type == VAR_UNKNOWN && !evaluate && **arg == '(')
|
||||||
|
{
|
||||||
|
rettv->vval.v_string = vim_strsave("");
|
||||||
|
rettv->v_type = VAR_FUNC;
|
||||||
|
}
|
||||||
|
|
||||||
/* Stop the expression evaluation when immediately
|
/* Stop the expression evaluation when immediately
|
||||||
* aborting on error, or when an interrupt occurred or
|
* aborting on error, or when an interrupt occurred or
|
||||||
* an exception was thrown but not caught. */
|
* an exception was thrown but not caught. */
|
||||||
|
@ -728,6 +728,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
841,
|
||||||
/**/
|
/**/
|
||||||
840,
|
840,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user