@@ -2325,6 +2325,7 @@ do_mouse(
23252325 ui_may_remove_balloon ();
23262326 if (p_bevalterm )
23272327 {
2328+ ch_log (NULL , "setting balloon timer" );
23282329 profile_setlimit (p_bdlay , & bevalexpr_due );
23292330 bevalexpr_due_set = TRUE;
23302331 }
@@ -3327,28 +3328,28 @@ find_is_eval_item(
33273328 * Find the identifier under or to the right of the cursor.
33283329 * "find_type" can have one of three values:
33293330 * FIND_IDENT: find an identifier (keyword)
3330- * FIND_STRING: find any non-white string
3331- * FIND_IDENT + FIND_STRING: find any non-white string , identifier preferred.
3331+ * FIND_STRING: find any non-white text
3332+ * FIND_IDENT + FIND_STRING: find any non-white text , identifier preferred.
33323333 * FIND_EVAL: find text useful for C program debugging
33333334 *
33343335 * There are three steps:
3335- * 1. Search forward for the start of an identifier/string . Doesn't move if
3336+ * 1. Search forward for the start of an identifier/text . Doesn't move if
33363337 * already on one.
3337- * 2. Search backward for the start of this identifier/string .
3338+ * 2. Search backward for the start of this identifier/text .
33383339 * This doesn't match the real Vi but I like it a little better and it
33393340 * shouldn't bother anyone.
3340- * 3. Search forward to the end of this identifier/string .
3341+ * 3. Search forward to the end of this identifier/text .
33413342 * When FIND_IDENT isn't defined, we backup until a blank.
33423343 *
3343- * Returns the length of the string , or zero if no string is found.
3344- * If a string is found, a pointer to the string is put in "*string ". This
3345- * string is not always NUL terminated.
3344+ * Returns the length of the text , or zero if no text is found.
3345+ * If text is found, a pointer to the text is put in "*text ". This
3346+ * points into the current buffer line and is not always NUL terminated.
33463347 */
33473348 int
3348- find_ident_under_cursor (char_u * * string , int find_type )
3349+ find_ident_under_cursor (char_u * * text , int find_type )
33493350{
33503351 return find_ident_at_pos (curwin , curwin -> w_cursor .lnum ,
3351- curwin -> w_cursor .col , string , find_type );
3352+ curwin -> w_cursor .col , text , NULL , find_type );
33523353}
33533354
33543355/*
@@ -3360,33 +3361,34 @@ find_ident_at_pos(
33603361 win_T * wp ,
33613362 linenr_T lnum ,
33623363 colnr_T startcol ,
3363- char_u * * string ,
3364+ char_u * * text ,
3365+ int * textcol , // column where "text" starts, can be NULL
33643366 int find_type )
33653367{
33663368 char_u * ptr ;
3367- int col = 0 ; /* init to shut up GCC */
3369+ int col = 0 ; // init to shut up GCC
33683370 int i ;
33693371 int this_class = 0 ;
33703372 int prev_class ;
33713373 int prevcol ;
3372- int bn = 0 ; /* bracket nesting */
3374+ int bn = 0 ; // bracket nesting
33733375
33743376 /*
33753377 * if i == 0: try to find an identifier
3376- * if i == 1: try to find any non-white string
3378+ * if i == 1: try to find any non-white text
33773379 */
33783380 ptr = ml_get_buf (wp -> w_buffer , lnum , FALSE);
33793381 for (i = (find_type & FIND_IDENT ) ? 0 : 1 ; i < 2 ; ++ i )
33803382 {
33813383 /*
3382- * 1. skip to start of identifier/string
3384+ * 1. skip to start of identifier/text
33833385 */
33843386 col = startcol ;
33853387 if (has_mbyte )
33863388 {
33873389 while (ptr [col ] != NUL )
33883390 {
3389- /* Stop at a ']' to evaluate "a[x]". */
3391+ // Stop at a ']' to evaluate "a[x]".
33903392 if ((find_type & FIND_EVAL ) && ptr [col ] == ']' )
33913393 break ;
33923394 this_class = mb_get_class (ptr + col );
@@ -3402,11 +3404,11 @@ find_ident_at_pos(
34023404 )
34033405 ++ col ;
34043406
3405- /* When starting on a ']' count it, so that we include the '['. */
3407+ // When starting on a ']' count it, so that we include the '['.
34063408 bn = ptr [col ] == ']' ;
34073409
34083410 /*
3409- * 2. Back up to start of identifier/string .
3411+ * 2. Back up to start of identifier/text .
34103412 */
34113413 if (has_mbyte )
34123414 {
@@ -3432,8 +3434,8 @@ find_ident_at_pos(
34323434 col = prevcol ;
34333435 }
34343436
3435- /* If we don't want just any old string , or we've found an
3436- * identifier, stop searching. */
3437+ // If we don't want just any old text , or we've found an
3438+ // identifier, stop searching.
34373439 if (this_class > 2 )
34383440 this_class = 2 ;
34393441 if (!(find_type & FIND_STRING ) || this_class == 2 )
@@ -3454,8 +3456,8 @@ find_ident_at_pos(
34543456 ))
34553457 -- col ;
34563458
3457- /* If we don't want just any old string , or we've found an
3458- * identifier, stop searching. */
3459+ // If we don't want just any old text , or we've found an
3460+ // identifier, stop searching.
34593461 if (!(find_type & FIND_STRING ) || vim_iswordc (ptr [col ]))
34603462 break ;
34613463 }
@@ -3464,7 +3466,7 @@ find_ident_at_pos(
34643466 if (ptr [col ] == NUL || (i == 0
34653467 && (has_mbyte ? this_class != 2 : !vim_iswordc (ptr [col ]))))
34663468 {
3467- // didn't find an identifier or string
3469+ // didn't find an identifier or text
34683470 if ((find_type & FIND_NOERROR ) == 0 )
34693471 {
34703472 if (find_type & FIND_STRING )
@@ -3475,17 +3477,19 @@ find_ident_at_pos(
34753477 return 0 ;
34763478 }
34773479 ptr += col ;
3478- * string = ptr ;
3480+ * text = ptr ;
3481+ if (textcol != NULL )
3482+ * textcol = col ;
34793483
34803484 /*
3481- * 3. Find the end if the identifier/string .
3485+ * 3. Find the end if the identifier/text .
34823486 */
34833487 bn = 0 ;
34843488 startcol -= col ;
34853489 col = 0 ;
34863490 if (has_mbyte )
34873491 {
3488- /* Search for point of changing multibyte character class. */
3492+ // Search for point of changing multibyte character class.
34893493 this_class = mb_get_class (ptr );
34903494 while (ptr [col ] != NUL
34913495 && ((i == 0 ? mb_get_class (ptr + col ) == this_class
0 commit comments