1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-13 05:44:11 +02:00

Param doc fix

This commit is contained in:
Brian Fiete 2020-09-14 13:06:45 -07:00
parent 82fed8ea6f
commit 7dc9fb699c

View file

@ -115,7 +115,7 @@ namespace IDE.ui
{ {
if (mParamInfo == null) if (mParamInfo == null)
mParamInfo = new .(); mParamInfo = new .();
curDocStr = new String(pragma, splitEnum.MatchPos + 1); curDocStr = new String(pragma, Math.Min(splitEnum.MatchPos + 1, pragma.Length));
mParamInfo[new String(paramName)] = curDocStr; mParamInfo[new String(paramName)] = curDocStr;
lineHadContent = true; lineHadContent = true;
} }
@ -1010,6 +1010,8 @@ namespace IDE.ui
maxDocWidth = Math.Min(maxDocWidth, workspaceWidth - drawScreenX - GS!(8)); maxDocWidth = Math.Min(maxDocWidth, workspaceWidth - drawScreenX - GS!(8));
maxDocWidth = Math.Max(maxDocWidth, GS!(80)); maxDocWidth = Math.Max(maxDocWidth, GS!(80));
if (!docString.IsWhiteSpace)
{
curY += font.GetLineSpacing() + GS!(4); curY += font.GetLineSpacing() + GS!(4);
if (g != null) if (g != null)
{ {
@ -1018,6 +1020,7 @@ namespace IDE.ui
} }
else else
docHeight = font.GetWrapHeight(docString, maxDocWidth); docHeight = font.GetWrapHeight(docString, maxDocWidth);
}
extWidth = Math.Max(extWidth, Math.Min(font.GetWidth(docString), maxDocWidth) + GS!(48)); extWidth = Math.Max(extWidth, Math.Min(font.GetWidth(docString), maxDocWidth) + GS!(48));
} }