summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-09-10 18:44:29 +0200
committerBram Moolenaar <Bram@vim.org>2017-09-10 18:44:29 +0200
commit95c83c64be8d4af74bfda1f283a5bcf3f110719e (patch)
treef3e4e2ed634ed3d53f3adcf1afdb9e38fb1ad98e
parent65f084749b260746d7f186af4f080298be2df55b (diff)
patch 8.0.1091: test for <cexpr> fails without +balloon_eval featurev8.0.1091
Problem: Test for <cexpr> fails without +balloon_eval feature. Solution: Remove #ifdefs.
-rw-r--r--src/normal.c24
-rw-r--r--src/version.c2
2 files changed, 2 insertions, 24 deletions
diff --git a/src/normal.c b/src/normal.c
index b5c4a81ad9..a1b2612f77 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -3353,9 +3353,6 @@ reset_VIsual(void)
}
}
-#if defined(FEAT_BEVAL)
-static int find_is_eval_item(char_u *ptr, int *colp, int *nbp, int dir);
-
/*
* Check for a balloon-eval special item to include when searching for an
* identifier. When "dir" is BACKWARD "ptr[-1]" must be valid!
@@ -3394,7 +3391,6 @@ find_is_eval_item(
}
return FALSE;
}
-#endif
/*
* Find the identifier under or to the right of the cursor.
@@ -3444,9 +3440,7 @@ find_ident_at_pos(
int prev_class;
int prevcol;
#endif
-#if defined(FEAT_BEVAL)
int bn = 0; /* bracket nesting */
-#endif
/*
* if i == 0: try to find an identifier
@@ -3464,11 +3458,9 @@ find_ident_at_pos(
{
while (ptr[col] != NUL)
{
-# if defined(FEAT_BEVAL)
/* Stop at a ']' to evaluate "a[x]". */
if ((find_type & FIND_EVAL) && ptr[col] == ']')
break;
-# endif
this_class = mb_get_class(ptr + col);
if (this_class != 0 && (i == 1 || this_class != 1))
break;
@@ -3479,16 +3471,12 @@ find_ident_at_pos(
#endif
while (ptr[col] != NUL
&& (i == 0 ? !vim_iswordc(ptr[col]) : VIM_ISWHITE(ptr[col]))
-# if defined(FEAT_BEVAL)
&& (!(find_type & FIND_EVAL) || ptr[col] != ']')
-# endif
)
++col;
-#if defined(FEAT_BEVAL)
/* When starting on a ']' count it, so that we include the '['. */
bn = ptr[col] == ']';
-#endif
/*
* 2. Back up to start of identifier/string.
@@ -3497,11 +3485,9 @@ find_ident_at_pos(
if (has_mbyte)
{
/* Remember class of character under cursor. */
-# if defined(FEAT_BEVAL)
if ((find_type & FIND_EVAL) && ptr[col] == ']')
this_class = mb_get_class((char_u *)"a");
else
-# endif
this_class = mb_get_class(ptr + col);
while (col > 0 && this_class != 0)
{
@@ -3511,12 +3497,10 @@ find_ident_at_pos(
&& (i == 0
|| prev_class == 0
|| (find_type & FIND_IDENT))
-# if defined(FEAT_BEVAL)
&& (!(find_type & FIND_EVAL)
|| prevcol == 0
|| !find_is_eval_item(ptr + prevcol, &prevcol,
&bn, BACKWARD))
-# endif
)
break;
col = prevcol;
@@ -3538,12 +3522,10 @@ find_ident_at_pos(
: (!VIM_ISWHITE(ptr[col - 1])
&& (!(find_type & FIND_IDENT)
|| !vim_iswordc(ptr[col - 1]))))
-#if defined(FEAT_BEVAL)
|| ((find_type & FIND_EVAL)
&& col > 1
&& find_is_eval_item(ptr + col - 1, &col,
&bn, BACKWARD))
-#endif
))
--col;
@@ -3575,10 +3557,8 @@ find_ident_at_pos(
/*
* 3. Find the end if the identifier/string.
*/
-#if defined(FEAT_BEVAL)
bn = 0;
startcol -= col;
-#endif
col = 0;
#ifdef FEAT_MBYTE
if (has_mbyte)
@@ -3588,11 +3568,9 @@ find_ident_at_pos(
while (ptr[col] != NUL
&& ((i == 0 ? mb_get_class(ptr + col) == this_class
: mb_get_class(ptr + col) != 0)
-# if defined(FEAT_BEVAL)
|| ((find_type & FIND_EVAL)
&& col <= (int)startcol
&& find_is_eval_item(ptr + col, &col, &bn, FORWARD))
-# endif
))
col += (*mb_ptr2len)(ptr + col);
}
@@ -3600,11 +3578,9 @@ find_ident_at_pos(
#endif
while ((i == 0 ? vim_iswordc(ptr[col])
: (ptr[col] != NUL && !VIM_ISWHITE(ptr[col])))
-# if defined(FEAT_BEVAL)
|| ((find_type & FIND_EVAL)
&& col <= (int)startcol
&& find_is_eval_item(ptr + col, &col, &bn, FORWARD))
-# endif
)
{
++col;
diff --git a/src/version.c b/src/version.c
index b1054964fe..e3239953a3 100644
--- a/src/version.c
+++ b/src/version.c
@@ -770,6 +770,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1091,
+/**/
1090,
/**/
1089,