mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +02:00
Added Clean Cmds
This commit is contained in:
parent
1caaec9b56
commit
863009f329
3 changed files with 40 additions and 0 deletions
|
@ -3520,6 +3520,39 @@ namespace IDE.ui
|
|||
return hasFocus ? mHiliteColor : mUnfocusedHiliteColor;
|
||||
}
|
||||
|
||||
public override void LinePullup(int textPos)
|
||||
{
|
||||
bool isInComment = false;
|
||||
if (textPos > 0)
|
||||
{
|
||||
if (mData.mText[textPos - 1].mDisplayTypeId == (uint8)BfSourceElementType.Comment)
|
||||
isInComment = true;
|
||||
}
|
||||
|
||||
if (!isInComment)
|
||||
return;
|
||||
|
||||
int checkPos = textPos;
|
||||
if (mData.SafeGetChar(checkPos) == '*')
|
||||
checkPos++;
|
||||
else
|
||||
{
|
||||
while (checkPos < mData.mTextLength)
|
||||
{
|
||||
if (mData.mText[checkPos].mChar != '/')
|
||||
break;
|
||||
checkPos++;
|
||||
}
|
||||
}
|
||||
|
||||
int32 deleteLen = (int32)(checkPos - textPos);
|
||||
if (deleteLen > 0)
|
||||
{
|
||||
mData.mUndoManager.Add(new DeleteCharAction(this, 0, deleteLen));
|
||||
PhysDeleteChars(0, deleteLen);
|
||||
}
|
||||
}
|
||||
|
||||
public override void Draw(Graphics g)
|
||||
{
|
||||
base.Draw(g);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue