@@ -3353,9 +3353,6 @@ reset_VIsual(void)
3353
3353
}
3354
3354
}
3355
3355
3356
- #if defined(FEAT_BEVAL )
3357
- static int find_is_eval_item (char_u * ptr , int * colp , int * nbp , int dir );
3358
-
3359
3356
/*
3360
3357
* Check for a balloon-eval special item to include when searching for an
3361
3358
* identifier. When "dir" is BACKWARD "ptr[-1]" must be valid!
@@ -3394,7 +3391,6 @@ find_is_eval_item(
3394
3391
}
3395
3392
return FALSE;
3396
3393
}
3397
- #endif
3398
3394
3399
3395
/*
3400
3396
* Find the identifier under or to the right of the cursor.
@@ -3444,9 +3440,7 @@ find_ident_at_pos(
3444
3440
int prev_class ;
3445
3441
int prevcol ;
3446
3442
#endif
3447
- #if defined(FEAT_BEVAL )
3448
3443
int bn = 0 ; /* bracket nesting */
3449
- #endif
3450
3444
3451
3445
/*
3452
3446
* if i == 0: try to find an identifier
@@ -3464,11 +3458,9 @@ find_ident_at_pos(
3464
3458
{
3465
3459
while (ptr [col ] != NUL )
3466
3460
{
3467
- # if defined(FEAT_BEVAL )
3468
3461
/* Stop at a ']' to evaluate "a[x]". */
3469
3462
if ((find_type & FIND_EVAL ) && ptr [col ] == ']' )
3470
3463
break ;
3471
- # endif
3472
3464
this_class = mb_get_class (ptr + col );
3473
3465
if (this_class != 0 && (i == 1 || this_class != 1 ))
3474
3466
break ;
@@ -3479,16 +3471,12 @@ find_ident_at_pos(
3479
3471
#endif
3480
3472
while (ptr [col ] != NUL
3481
3473
&& (i == 0 ? !vim_iswordc (ptr [col ]) : VIM_ISWHITE (ptr [col ]))
3482
- # if defined(FEAT_BEVAL )
3483
3474
&& (!(find_type & FIND_EVAL ) || ptr [col ] != ']' )
3484
- # endif
3485
3475
)
3486
3476
++ col ;
3487
3477
3488
- #if defined(FEAT_BEVAL )
3489
3478
/* When starting on a ']' count it, so that we include the '['. */
3490
3479
bn = ptr [col ] == ']' ;
3491
- #endif
3492
3480
3493
3481
/*
3494
3482
* 2. Back up to start of identifier/string.
@@ -3497,11 +3485,9 @@ find_ident_at_pos(
3497
3485
if (has_mbyte )
3498
3486
{
3499
3487
/* Remember class of character under cursor. */
3500
- # if defined(FEAT_BEVAL )
3501
3488
if ((find_type & FIND_EVAL ) && ptr [col ] == ']' )
3502
3489
this_class = mb_get_class ((char_u * )"a" );
3503
3490
else
3504
- # endif
3505
3491
this_class = mb_get_class (ptr + col );
3506
3492
while (col > 0 && this_class != 0 )
3507
3493
{
@@ -3511,12 +3497,10 @@ find_ident_at_pos(
3511
3497
&& (i == 0
3512
3498
|| prev_class == 0
3513
3499
|| (find_type & FIND_IDENT ))
3514
- # if defined(FEAT_BEVAL )
3515
3500
&& (!(find_type & FIND_EVAL )
3516
3501
|| prevcol == 0
3517
3502
|| !find_is_eval_item (ptr + prevcol , & prevcol ,
3518
3503
& bn , BACKWARD ))
3519
- # endif
3520
3504
)
3521
3505
break ;
3522
3506
col = prevcol ;
@@ -3538,12 +3522,10 @@ find_ident_at_pos(
3538
3522
: (!VIM_ISWHITE (ptr [col - 1 ])
3539
3523
&& (!(find_type & FIND_IDENT )
3540
3524
|| !vim_iswordc (ptr [col - 1 ]))))
3541
- #if defined(FEAT_BEVAL )
3542
3525
|| ((find_type & FIND_EVAL )
3543
3526
&& col > 1
3544
3527
&& find_is_eval_item (ptr + col - 1 , & col ,
3545
3528
& bn , BACKWARD ))
3546
- #endif
3547
3529
))
3548
3530
-- col ;
3549
3531
@@ -3575,10 +3557,8 @@ find_ident_at_pos(
3575
3557
/*
3576
3558
* 3. Find the end if the identifier/string.
3577
3559
*/
3578
- #if defined(FEAT_BEVAL )
3579
3560
bn = 0 ;
3580
3561
startcol -= col ;
3581
- #endif
3582
3562
col = 0 ;
3583
3563
#ifdef FEAT_MBYTE
3584
3564
if (has_mbyte )
@@ -3588,23 +3568,19 @@ find_ident_at_pos(
3588
3568
while (ptr [col ] != NUL
3589
3569
&& ((i == 0 ? mb_get_class (ptr + col ) == this_class
3590
3570
: mb_get_class (ptr + col ) != 0 )
3591
- # if defined(FEAT_BEVAL )
3592
3571
|| ((find_type & FIND_EVAL )
3593
3572
&& col <= (int )startcol
3594
3573
&& find_is_eval_item (ptr + col , & col , & bn , FORWARD ))
3595
- # endif
3596
3574
))
3597
3575
col += (* mb_ptr2len )(ptr + col );
3598
3576
}
3599
3577
else
3600
3578
#endif
3601
3579
while ((i == 0 ? vim_iswordc (ptr [col ])
3602
3580
: (ptr [col ] != NUL && !VIM_ISWHITE (ptr [col ])))
3603
- # if defined(FEAT_BEVAL )
3604
3581
|| ((find_type & FIND_EVAL )
3605
3582
&& col <= (int )startcol
3606
3583
&& find_is_eval_item (ptr + col , & col , & bn , FORWARD ))
3607
- # endif
3608
3584
)
3609
3585
{
3610
3586
++ col ;
0 commit comments