diff --git a/IDE/src/ui/SourceEditWidgetContent.bf b/IDE/src/ui/SourceEditWidgetContent.bf index 755484b5..8666bbe6 100644 --- a/IDE/src/ui/SourceEditWidgetContent.bf +++ b/IDE/src/ui/SourceEditWidgetContent.bf @@ -2318,6 +2318,7 @@ namespace IDE.ui if (CheckReadOnly()) return false; bool noStar = false; + var prevSelection = mSelection; var startLineAndCol = CursorLineAndColumn; if ((!HasSelection()) && (doComment != null)) @@ -2448,6 +2449,10 @@ namespace IDE.ui } mSelection = EditSelection(minPos, maxPos + q); } + else + { + mSelection = prevSelection; + } if (undoBatchStart != null) mData.mUndoManager.Add(undoBatchStart.mBatchEnd);