aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.Frontend
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-07-19 22:05:27 -0400
committerMichael <[email protected]>2017-07-19 22:05:27 -0400
commit90f0e64d8017e8ef2d241e21c14aa19a6cce152b (patch)
tree17f4d46dd4063e3132d00fc506ad0b26fcdaf5e6 /ShiftOS.Frontend
parentd3ce724d287cbacdef35b06832d37e4cb65a6013 (diff)
downloadshiftos_thereturn-90f0e64d8017e8ef2d241e21c14aa19a6cce152b.tar.gz
shiftos_thereturn-90f0e64d8017e8ef2d241e21c14aa19a6cce152b.tar.bz2
shiftos_thereturn-90f0e64d8017e8ef2d241e21c14aa19a6cce152b.zip
Fix bug with line height calc with blank lines.
Diffstat (limited to 'ShiftOS.Frontend')
-rw-r--r--ShiftOS.Frontend/Apps/Terminal.cs6
1 files changed, 6 insertions, 0 deletions
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;