1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

HasSelection fix for cursor up/down

This commit is contained in:
Brian Fiete 2021-12-27 09:35:54 -05:00
parent fe9286f41c
commit da58610736

View file

@ -2366,7 +2366,7 @@ namespace Beefy.widgets
case KeyCode.Down:
{
int32 aDir = (keyCode == KeyCode.Up) ? -1 : 1;
if ((mSelection != null) && (!mWidgetWindow.IsKeyDown(KeyCode.Shift)))
if ((HasSelection()) && (!mWidgetWindow.IsKeyDown(KeyCode.Shift)))
{
var lineAndCol = CursorLineAndColumn;
var usePos = (aDir < 0) ? (int32)mSelection.Value.MinPos : mSelection.Value.MaxPos;