mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-20 17:08:00 +02:00
Fix for Up/Down with selection without mAllowVirtualCursor
This commit is contained in:
parent
190e52ae2e
commit
1ac5992d8e
1 changed files with 10 additions and 5 deletions
|
@ -2368,11 +2368,16 @@ namespace Beefy.widgets
|
||||||
int32 aDir = (keyCode == KeyCode.Up) ? -1 : 1;
|
int32 aDir = (keyCode == KeyCode.Up) ? -1 : 1;
|
||||||
if ((HasSelection()) && (!mWidgetWindow.IsKeyDown(KeyCode.Shift)))
|
if ((HasSelection()) && (!mWidgetWindow.IsKeyDown(KeyCode.Shift)))
|
||||||
{
|
{
|
||||||
var lineAndCol = CursorLineAndColumn;
|
if (mAllowVirtualCursor)
|
||||||
var usePos = (aDir < 0) ? (int32)mSelection.Value.MinPos : mSelection.Value.MaxPos;
|
{
|
||||||
GetLineCharAtIdx(usePos, var selLine, var selLineChar);
|
var lineAndCol = CursorLineAndColumn;
|
||||||
CursorLineAndColumn = .(selLine, lineAndCol.mColumn);
|
var usePos = (aDir < 0) ? (int32)mSelection.Value.MinPos : mSelection.Value.MaxPos;
|
||||||
mSelection = null;
|
GetLineCharAtIdx(usePos, var selLine, var selLineChar);
|
||||||
|
CursorLineAndColumn = .(selLine, lineAndCol.mColumn);
|
||||||
|
mSelection = null;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
PrepareForCursorMove(aDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
GetCursorLineChar(out lineIdx, out lineChar);
|
GetCursorLineChar(out lineIdx, out lineChar);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue