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

Made Home/End go to extents of symbol being renamed

This commit is contained in:
Brian Fiete 2020-10-13 08:01:28 -07:00
parent c3b697c0a4
commit 640a20c961

View file

@ -3440,6 +3440,41 @@ namespace IDE.ui
return; return;
} }
if (mSourceViewPanel?.mRenameSymbolDialog?.mKind == .Rename)
{
int wantCursorPos = -1;
if (keyCode == .Home)
{
int checkPos = CursorTextPos - 1;
while (checkPos >= 0)
{
if (mData.mText[checkPos].mDisplayFlags & (uint8)SourceElementFlags.SymbolReference == 0)
break;
wantCursorPos = checkPos;
checkPos--;
}
}
else if (keyCode == .End)
{
int checkPos = CursorTextPos;
while (checkPos < mData.mTextLength)
{
if (mData.mText[checkPos].mDisplayFlags & (uint8)SourceElementFlags.SymbolReference == 0)
break;
checkPos++;
wantCursorPos = checkPos;
}
}
if (wantCursorPos != -1)
{
mSelection = null;
CursorTextPos = wantCursorPos;
return;
}
}
//var lineAndColumn = CursorLineAndColumn; //var lineAndColumn = CursorLineAndColumn;
int prevCursorPos; int prevCursorPos;