mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-18 16:10:26 +02:00
Made Home/End go to extents of symbol being renamed
This commit is contained in:
parent
c3b697c0a4
commit
640a20c961
1 changed files with 35 additions and 0 deletions
|
@ -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;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue