mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-20 00:50:25 +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;
|
||||
if ((HasSelection()) && (!mWidgetWindow.IsKeyDown(KeyCode.Shift)))
|
||||
{
|
||||
var lineAndCol = CursorLineAndColumn;
|
||||
var usePos = (aDir < 0) ? (int32)mSelection.Value.MinPos : mSelection.Value.MaxPos;
|
||||
GetLineCharAtIdx(usePos, var selLine, var selLineChar);
|
||||
CursorLineAndColumn = .(selLine, lineAndCol.mColumn);
|
||||
mSelection = null;
|
||||
if (mAllowVirtualCursor)
|
||||
{
|
||||
var lineAndCol = CursorLineAndColumn;
|
||||
var usePos = (aDir < 0) ? (int32)mSelection.Value.MinPos : mSelection.Value.MaxPos;
|
||||
GetLineCharAtIdx(usePos, var selLine, var selLineChar);
|
||||
CursorLineAndColumn = .(selLine, lineAndCol.mColumn);
|
||||
mSelection = null;
|
||||
}
|
||||
else
|
||||
PrepareForCursorMove(aDir);
|
||||
}
|
||||
|
||||
GetCursorLineChar(out lineIdx, out lineChar);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue