Fix bug with line height calc with blank lines.

This commit is contained in:
Michael 2017-07-19 22:05:27 -04:00
parent d3ce724d28
commit 90f0e64d80

View file

@ -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;