1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-19 08:30:25 +02:00

Improved display of anchorless collapses

This commit is contained in:
Brian Fiete 2022-03-02 10:49:29 -08:00
parent 4df1254743
commit 5fc95f8f07
2 changed files with 15 additions and 9 deletions

View file

@ -152,7 +152,7 @@ namespace IDE.ui
if (rect.mHeight >= DarkTheme.sDarkTheme.mSmallBoldFont.GetLineSpacing())
g.SetFont(DarkTheme.sDarkTheme.mSmallBoldFont);
if (mEditWidgetContent.mSelection != null)
if ((mEditWidgetContent.mSelection != null) && (mCollapseIndex < mEditWidgetContent.mOrderedCollapseEntries.Count))
{
var collapseEntry = mEditWidgetContent.mOrderedCollapseEntries[mCollapseIndex];
if ((mEditWidgetContent.mSelection.Value.MinPos <= collapseEntry.mEndIdx) && (mEditWidgetContent.mSelection.Value.MaxPos >= collapseEntry.mStartIdx))
@ -228,7 +228,8 @@ namespace IDE.ui
}
else if (mAnchorLine == mStartLine)
{
mStartLine++;
if (mAnchorId != mStartId)
mStartLine++;
}
}
}