@@ -3353,9 +3353,6 @@ reset_VIsual(void)
33533353 }
33543354}
33553355
3356- #if defined(FEAT_BEVAL )
3357- static int find_is_eval_item (char_u * ptr , int * colp , int * nbp , int dir );
3358-
33593356/*
33603357 * Check for a balloon-eval special item to include when searching for an
33613358 * identifier. When "dir" is BACKWARD "ptr[-1]" must be valid!
@@ -3394,7 +3391,6 @@ find_is_eval_item(
33943391 }
33953392 return FALSE;
33963393}
3397- #endif
33983394
33993395/*
34003396 * Find the identifier under or to the right of the cursor.
@@ -3444,9 +3440,7 @@ find_ident_at_pos(
34443440 int prev_class ;
34453441 int prevcol ;
34463442#endif
3447- #if defined(FEAT_BEVAL )
34483443 int bn = 0 ; /* bracket nesting */
3449- #endif
34503444
34513445 /*
34523446 * if i == 0: try to find an identifier
@@ -3464,11 +3458,9 @@ find_ident_at_pos(
34643458 {
34653459 while (ptr [col ] != NUL )
34663460 {
3467- # if defined(FEAT_BEVAL )
34683461 /* Stop at a ']' to evaluate "a[x]". */
34693462 if ((find_type & FIND_EVAL ) && ptr [col ] == ']' )
34703463 break ;
3471- # endif
34723464 this_class = mb_get_class (ptr + col );
34733465 if (this_class != 0 && (i == 1 || this_class != 1 ))
34743466 break ;
@@ -3479,16 +3471,12 @@ find_ident_at_pos(
34793471#endif
34803472 while (ptr [col ] != NUL
34813473 && (i == 0 ? !vim_iswordc (ptr [col ]) : VIM_ISWHITE (ptr [col ]))
3482- # if defined(FEAT_BEVAL )
34833474 && (!(find_type & FIND_EVAL ) || ptr [col ] != ']' )
3484- # endif
34853475 )
34863476 ++ col ;
34873477
3488- #if defined(FEAT_BEVAL )
34893478 /* When starting on a ']' count it, so that we include the '['. */
34903479 bn = ptr [col ] == ']' ;
3491- #endif
34923480
34933481 /*
34943482 * 2. Back up to start of identifier/string.
@@ -3497,11 +3485,9 @@ find_ident_at_pos(
34973485 if (has_mbyte )
34983486 {
34993487 /* Remember class of character under cursor. */
3500- # if defined(FEAT_BEVAL )
35013488 if ((find_type & FIND_EVAL ) && ptr [col ] == ']' )
35023489 this_class = mb_get_class ((char_u * )"a" );
35033490 else
3504- # endif
35053491 this_class = mb_get_class (ptr + col );
35063492 while (col > 0 && this_class != 0 )
35073493 {
@@ -3511,12 +3497,10 @@ find_ident_at_pos(
35113497 && (i == 0
35123498 || prev_class == 0
35133499 || (find_type & FIND_IDENT ))
3514- # if defined(FEAT_BEVAL )
35153500 && (!(find_type & FIND_EVAL )
35163501 || prevcol == 0
35173502 || !find_is_eval_item (ptr + prevcol , & prevcol ,
35183503 & bn , BACKWARD ))
3519- # endif
35203504 )
35213505 break ;
35223506 col = prevcol ;
@@ -3538,12 +3522,10 @@ find_ident_at_pos(
35383522 : (!VIM_ISWHITE (ptr [col - 1 ])
35393523 && (!(find_type & FIND_IDENT )
35403524 || !vim_iswordc (ptr [col - 1 ]))))
3541- #if defined(FEAT_BEVAL )
35423525 || ((find_type & FIND_EVAL )
35433526 && col > 1
35443527 && find_is_eval_item (ptr + col - 1 , & col ,
35453528 & bn , BACKWARD ))
3546- #endif
35473529 ))
35483530 -- col ;
35493531
@@ -3575,10 +3557,8 @@ find_ident_at_pos(
35753557 /*
35763558 * 3. Find the end if the identifier/string.
35773559 */
3578- #if defined(FEAT_BEVAL )
35793560 bn = 0 ;
35803561 startcol -= col ;
3581- #endif
35823562 col = 0 ;
35833563#ifdef FEAT_MBYTE
35843564 if (has_mbyte )
@@ -3588,23 +3568,19 @@ find_ident_at_pos(
35883568 while (ptr [col ] != NUL
35893569 && ((i == 0 ? mb_get_class (ptr + col ) == this_class
35903570 : mb_get_class (ptr + col ) != 0 )
3591- # if defined(FEAT_BEVAL )
35923571 || ((find_type & FIND_EVAL )
35933572 && col <= (int )startcol
35943573 && find_is_eval_item (ptr + col , & col , & bn , FORWARD ))
3595- # endif
35963574 ))
35973575 col += (* mb_ptr2len )(ptr + col );
35983576 }
35993577 else
36003578#endif
36013579 while ((i == 0 ? vim_iswordc (ptr [col ])
36023580 : (ptr [col ] != NUL && !VIM_ISWHITE (ptr [col ])))
3603- # if defined(FEAT_BEVAL )
36043581 || ((find_type & FIND_EVAL )
36053582 && col <= (int )startcol
36063583 && find_is_eval_item (ptr + col , & col , & bn , FORWARD ))
3607- # endif
36083584 )
36093585 {
36103586 ++ col ;
0 commit comments