/* vi:set ts=8 sts=4 sw=4 noet:
*
* VIM - Vi IMproved by Bram Moolenaar
* Visual Workshop integration by Gordon Prieur
*
* Do ":help uganda" in Vim to read copying and usage conditions.
* Do ":help credits" in Vim to see a list of people who contributed.
* See README.txt for an overview of the Vim source code.
*/
#include "vim.h"
#if defined(FEAT_BEVAL) || defined(PROTO)
/*
* Common code, invoked when the mouse is resting for a moment.
*/
void
general_beval_cb(BalloonEval *beval, int state UNUSED)
{
#ifdef FEAT_EVAL
win_T *wp;
int col;
int use_sandbox;
linenr_T lnum;
char_u *text;
static char_u *result = NULL;
long winnr = 0;
char_u *bexpr;
buf_T *save_curbuf;
size_t len;
# ifdef FEAT_WINDOWS
win_T *cw;
# endif
#endif
static int recursive = FALSE;
/* Don't do anything when 'ballooneval' is off, messages scrolled the
* windows up or we have no beval area. */
if (!p_beval || balloonEval == NULL || msg_scrolled >