1
0
forked from aniani/vim

updated for version 7.0185

This commit is contained in:
Bram Moolenaar
2006-01-22 23:30:12 +00:00
parent 71fe80dddd
commit 33aec765bd
10 changed files with 93 additions and 57 deletions

View File

@@ -28,7 +28,9 @@ general_beval_cb(beval, state)
char_u *text;
static char_u *result = NULL;
long winnr = 0;
#ifdef FEAT_WINDOWS
win_T *cw;
#endif
/* Don't do anything when 'ballooneval' is off, messages scrolled the
@@ -40,9 +42,11 @@ general_beval_cb(beval, state)
if (*p_bexpr != NUL
&& get_beval_info(balloonEval, TRUE, &wp, &lnum, &text, &col) == OK)
{
# ifdef FEAT_WINDOWS
/* Convert window pointer to number. */
for (cw = firstwin; cw != wp; cw = cw->w_next)
++winnr;
# endif
set_vim_var_nr(VV_BEVAL_BUFNR, (long)wp->w_buffer->b_fnum);
set_vim_var_nr(VV_BEVAL_WINNR, winnr);
@@ -293,7 +297,11 @@ get_beval_info(beval, getword, winp, lnump, textp, colp)
*textp = NULL;
row = Y_2_ROW(beval->y);
col = X_2_COL(beval->x);
#ifdef FEAT_WINDOWS
wp = mouse_find_win(&row, &col);
#else
wp = firstwin;
#endif
if (wp != NULL && row < wp->w_height && col < W_WIDTH(wp))
{
/* Found a window and the cursor is in the text. Now find the line