From 90f0e64d8017e8ef2d241e21c14aa19a6cce152b Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 19 Jul 2017 22:05:27 -0400 Subject: [PATCH] Fix bug with line height calc with blank lines. --- ShiftOS.Frontend/Apps/Terminal.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ShiftOS.Frontend/Apps/Terminal.cs b/ShiftOS.Frontend/Apps/Terminal.cs index a99585c..aea246e 100644 --- a/ShiftOS.Frontend/Apps/Terminal.cs +++ b/ShiftOS.Frontend/Apps/Terminal.cs @@ -167,6 +167,12 @@ namespace ShiftOS.Frontend.Apps int line = GetCurrentLine(); for (int l = 0; l < line; l++) { + if (string.IsNullOrEmpty(Lines[l])) + { + vertMeasure += LoadedSkin.TerminalFont.Height; + continue; + } + lineindex += Lines[l].Length; var stringMeasure = gfx.SmartMeasureString(Lines[l] == "\r" ? " " : Lines[l], LoadedSkin.TerminalFont, Width - 4); vertMeasure += (int)stringMeasure.Height;