Multiline balloon support is enabled according to :echo has("balloon_multiline") saying 1.
To Reproduce
function! MyBalloonExpr()
let macros = {
\ 'true':"true\n1",
\ 'false':"false\n0",
\ }
return get(macros, v:beval_text, '')
endfunction
set balloonexpr=MyBalloonExpr()
set ballooneval
set balloonevalterm
Expected behavior
Balloon for true displayed as
true
1
but displayed as true^@1.
(Works fine in the GUI version, only terminal version seems to be affected).
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
has("balloon_multiline") just returns whether the feature is enabled at compile time, however, balloon_multiline works only on GUI. Currently, it is not supported on terminal.
@k-takata Are you sure? Because balloons work quite fine in the terminal. Only newlines have a problem.
@k-takata Are you sure? Because balloons work quite fine in the terminal. Only newlines have a problem.
From eval.txt line 10537 (under *feature-list*):
balloon_multiline GUI supports multiline balloons.
Nothing is said about multiline balloons elsewhere. Balloons in the terminal is +balloon_eval_term which is not in that list (while ±balloon_multiline does not appear in the output of :version).
Best regards,
Tony.
Closed #5193.
@tonymec So I'm dealing with a Schröding-Feature here. It's there, but isn't at the same time :-)
I can even use true multiline ballons in the terminal when I add
'foo':"foo\nbar(line1, line2, line3, line4)",
which gets balloon-displayed as
foo^@bar(line1,
line2,
line3,
line4)
Observe how "comma space" is auto-converted to a newline. Just the escaped newline isn't. Can we please get this buglet fixed and call terminal multiline balloons "working like a charm"?
So this is actually a feature request: "Please convert '\n' in balloon values to a true linefeed".
Reopened #5193.
@chrisbra ...like you already do for GUI balloons.
So this is actually a feature request: "Please convert '\n' in balloon values to a true linefeed".
...like gvim already does. My humble desire is matching behavior of ballon text for GUI and terminal, so I don't have to create different balloon configurations files for each because one of them gets quirky with newlines. Once that works, you may want to update the line in eval.txt that still says
balloon_multiline GUI supports multiline balloons.
to accurately reflect the state of affairs. Thanks guys, you rock. Check for Bram is in the mail.
Showing ^@ or <00> in the balloon is not useful. And that this works differently in a terminal vs GUI is also not good. It's easy enough to change.