Earlier, I asked:
> Some questions on balloons:
>
> 1) In response to an user-event (say, a right click) can a
> message be shown in a balloon?
>
> 2) And if this is possible, would it be faster than, say,
> splitting to make a new buffer and showing the message there?
>
> For an example, consider Yasuhiro Matsumoto's calendar utility
> (www.vim.org/scripts/script.php?script_id=52) being made to show
> its output calendar in a balloon.
Just to experiment, here's what I did:
The version of calendar.vim that works for me is 1.3r
1) :nmap <rightmouse> :CalendarH<cr>
2) In calendar.vim, near line 830 there are a bunch of setlocal
commands. I modified calendar.vim by adding the following
line at the end of that bunch of setlocals
nmap <buffer> <space> :q!<cr>
3) Ensured that this file was sourced.
A) Then I right clicked, and hit space to make the calendar come
up and disappear.
Continuing with the experiment,
4) Inside function! Calendar(...) and before the section:
"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
"+++ build window
"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
I added the lines:
echo vdisplay1
return''
5) Ensured that this file was sourced.
B) Then I right clicked, and hit space to make the calendar come
up and disappear.
I find that B is much faster than A for both display and exit.
One can guess why A is slower for display, but why is it slow
for exit too?
--Suresh