summaryrefslogtreecommitdiff
path: root/src/gui_beval.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-01-22 23:30:12 +0000
committerBram Moolenaar <Bram@vim.org>2006-01-22 23:30:12 +0000
commit33aec765bdc2096f123c5a4c61f8948a61aa9ef5 (patch)
tree858b75b899a2ed6cf6e5543a1f29201c04650bd4 /src/gui_beval.c
parent71fe80dddd436b36de5d814c1165a3e56b1f0974 (diff)
downloadvim-33aec765bdc2096f123c5a4c61f8948a61aa9ef5.zip
updated for version 7.0185
Diffstat (limited to 'src/gui_beval.c')
-rw-r--r--src/gui_beval.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui_beval.c b/src/gui_beval.c
index 755f94310..bb26497fc 100644
--- a/src/gui_beval.c
+++ b/src/gui_beval.c
@@ -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