/* 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;
win_T *cw;
#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 > 0)
return;
/* Don't do this recursively. Happens when the expression evaluation
* takes a long time and invokes something that checks for CTRL-C typed. */
if