forked from aniani/vim
patch 9.1.0613: tests: termdebug test may fail and leave file around
Problem: tests: termdebug test may fail and leave temp file around (Dominique Pellé) Solution: only run balloon_show() if the function exists, validate termdebug is running using the g: termdebug_is_running var, use defer to delete temporary files fixes: #15334 Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
@@ -1535,6 +1535,12 @@ def CleanupExpr(passed_expr: string): string
|
||||
return expr
|
||||
enddef
|
||||
|
||||
def Balloon_show(expr: string)
|
||||
if has("+balloon_eval") || has("+balloon_eval_term")
|
||||
balloon_show(expr)
|
||||
endif
|
||||
enddef
|
||||
|
||||
def HandleEvaluate(msg: string)
|
||||
var value = msg
|
||||
->substitute('.*value="\(.*\)"', '\1', '')
|
||||
@@ -1555,7 +1561,7 @@ def HandleEvaluate(msg: string)
|
||||
else
|
||||
evalFromBalloonExprResult ..= $' = {value}'
|
||||
endif
|
||||
balloon_show(evalFromBalloonExprResult)
|
||||
Balloon_show(evalFromBalloonExprResult)
|
||||
else
|
||||
echomsg $'"{evalexpr}": {value}'
|
||||
endif
|
||||
|
Reference in New Issue
Block a user