patch 8.1.1303: not possible to hide a balloon
Problem: Not possible to hide a balloon.
Solution: Hide the balloon when balloon_show() is called with an empty
string or list. Add balloon_gettext().
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 84001b7..15732d6 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -2226,6 +2226,7 @@
asin({expr}) Float arc sine of {expr}
atan({expr}) Float arc tangent of {expr}
atan2({expr1}, {expr2}) Float arc tangent of {expr1} / {expr2}
+balloon_gettext() String current text in the balloon
balloon_show({expr}) none show {expr} inside the balloon
balloon_split({msg}) List split {msg} as used for a balloon
browse({save}, {title}, {initdir}, {default})
@@ -3007,15 +3008,20 @@
< 2.356194
{only available when compiled with the |+float| feature}
+balloon_gettext() *balloon_gettext()*
+ Return the current text in the balloon. Only for the string,
+ not used for the List.
+
balloon_show({expr}) *balloon_show()*
Show {expr} inside the balloon. For the GUI {expr} is used as
a string. For a terminal {expr} can be a list, which contains
the lines of the balloon. If {expr} is not a list it will be
split with |balloon_split()|.
+ If {expr} is an empty string any existing balloon is removed.
Example: >
func GetBalloonContent()
- " initiate getting the content
+ " ... initiate getting the content
return ''
endfunc
set balloonexpr=GetBalloonContent()
@@ -4229,6 +4235,8 @@
and "\..." notation |expr-quote|. For example,
feedkeys("\<CR>") simulates pressing of the <Enter> key. But
feedkeys('\<CR>') pushes 5 characters.
+ A special code that might be useful is <Ignore>, it exits the
+ wait for a character without doing anything. *<Ignore>*
{mode} is a String, which can contain these character flags:
'm' Remap keys. This is default. If {mode} is absent,