mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-21 01:18:02 +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
|
@ -2367,6 +2367,8 @@ 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)))
|
||||||
|
{
|
||||||
|
if (mAllowVirtualCursor)
|
||||||
{
|
{
|
||||||
var lineAndCol = CursorLineAndColumn;
|
var lineAndCol = CursorLineAndColumn;
|
||||||
var usePos = (aDir < 0) ? (int32)mSelection.Value.MinPos : mSelection.Value.MaxPos;
|
var usePos = (aDir < 0) ? (int32)mSelection.Value.MinPos : mSelection.Value.MaxPos;
|
||||||
|
@ -2374,6 +2376,9 @@ namespace Beefy.widgets
|
||||||
CursorLineAndColumn = .(selLine, lineAndCol.mColumn);
|
CursorLineAndColumn = .(selLine, lineAndCol.mColumn);
|
||||||
mSelection = null;
|
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