From dc1a7f9cbb99106cb44fd70e52c2df482a641975 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Tue, 21 Dec 2021 07:49:40 -0500 Subject: [PATCH] Selection fix --- IDE/src/ui/SourceEditWidgetContent.bf | 5 +++++ 1 file changed, 5 insertions(+) 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);