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

Selection fix

This commit is contained in:
Brian Fiete 2021-12-21 07:49:40 -05:00
parent f029419cea
commit dc1a7f9cbb

View file

@ -2318,6 +2318,7 @@ namespace IDE.ui
if (CheckReadOnly()) if (CheckReadOnly())
return false; return false;
bool noStar = false; bool noStar = false;
var prevSelection = mSelection;
var startLineAndCol = CursorLineAndColumn; var startLineAndCol = CursorLineAndColumn;
if ((!HasSelection()) && (doComment != null)) if ((!HasSelection()) && (doComment != null))
@ -2448,6 +2449,10 @@ namespace IDE.ui
} }
mSelection = EditSelection(minPos, maxPos + q); mSelection = EditSelection(minPos, maxPos + q);
} }
else
{
mSelection = prevSelection;
}
if (undoBatchStart != null) if (undoBatchStart != null)
mData.mUndoManager.Add(undoBatchStart.mBatchEnd); mData.mUndoManager.Add(undoBatchStart.mBatchEnd);