diff options
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/eval.txt | 15 | ||||
-rw-r--r-- | runtime/pack/dist/opt/termdebug/plugin/termdebug.vim | 13 |
2 files changed, 22 insertions, 6 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index c001f6f2b7..2ce6c48efc 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -2032,6 +2032,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_show({msg}) none show {msg} inside the balloon +balloon_split({msg}) List split {msg} as used for a balloon browse({save}, {title}, {initdir}, {default}) String put up a file requester browsedir({title}, {initdir}) String put up a directory requester @@ -2682,8 +2683,12 @@ atan2({expr1}, {expr2}) *atan2()* < 2.356194 {only available when compiled with the |+float| feature} -balloon_show({msg}) *balloon_show()* - Show {msg} inside the balloon. +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()|. + Example: > func GetBalloonContent() " initiate getting the content @@ -2705,6 +2710,12 @@ balloon_show({msg}) *balloon_show()* error message. {only available when compiled with the +balloon_eval feature} +balloon_split({msg}) *balloon_split()* + Split {msg} into lines to be displayed in a balloon. The + splits are made for the current window size and optimize to + show debugger output. + Returns a |List| with the split lines. + *browse()* browse({save}, {title}, {initdir}, {default}) Put up a file requester. This only works when "has("browse")" diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim index 1c3c9df9a7..aca56d2a7b 100644 --- a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim +++ b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim @@ -127,9 +127,11 @@ func s:StartDebug(cmd) call win_gotoid(s:gdbwin) " Enable showing a balloon with eval info - if has("balloon_eval") - set ballooneval + if has("balloon_eval") || has("balloon_eval_term") set balloonexpr=TermDebugBalloonExpr() + if has("balloon_eval") + set ballooneval + endif if has("balloon_eval_term") set balloonevalterm endif @@ -158,9 +160,11 @@ func s:EndDebug(job, status) let &columns = s:save_columns endif - if has("balloon_eval") - set noballooneval + if has("balloon_eval") || has("balloon_eval_term") set balloonexpr= + if has("balloon_eval") + set noballooneval + endif if has("balloon_eval_term") set noballoonevalterm endif @@ -366,6 +370,7 @@ func s:HandleError(msg) if a:msg =~ 'No symbol .* in current context' \ || a:msg =~ 'Cannot access memory at address ' \ || a:msg =~ 'Attempt to use a type name as an expression' + \ || a:msg =~ 'A syntax error in expression,' " Result of s:SendEval() failed, ignore. return endif |