From 6b7c48a279423a37d39f4295f1ab82051ab1cbc3 Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Wed, 3 May 2023 14:24:05 -0700 Subject: [PATCH] Fix a bug in tooltip rendering that caused incorrect calculation of the tooltip height (#3671) --- PSReadLine/Prediction.Views.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PSReadLine/Prediction.Views.cs b/PSReadLine/Prediction.Views.cs index f64e6f5b..a2770eca 100644 --- a/PSReadLine/Prediction.Views.cs +++ b/PSReadLine/Prediction.Views.cs @@ -1054,7 +1054,7 @@ private int RenderTooltip(string tooltip, List consoleBufferLines } buff.Append(VTColorUtils.AnsiReset); - return _maxTooltipHeight - linesLeft > 0 ? linesLeft : 0; + return _maxTooltipHeight - (linesLeft > 0 ? linesLeft : 0); } ///