sc/source/ui/view/tabview3.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 93a3f142bf46eb7b4309cd168354fe2a971e196d
Author:     Eike Rathke <er...@redhat.com>
AuthorDate: Tue May 31 20:25:37 2022 +0200
Commit:     Eike Rathke <er...@redhat.com>
CommitDate: Tue May 31 22:40:23 2022 +0200

    MoveCursorAbs: do not reset selection marks while editing a formula
    
    i.e. when moving the cursor for reference selection, so an
    existing mark is preserved for Alt+Enter or Shift+Ctrl+Enter.
    
    Change-Id: I3a73145b4e3e299fa9eb28e2198338e76ffe5093
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135202
    Reviewed-by: Eike Rathke <er...@redhat.com>
    Tested-by: Jenkins

diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index 5c706bab5f11..b261f04e0119 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -1236,9 +1236,10 @@ void ScTabView::MoveCursorAbs( SCCOL nCurX, SCROW nCurY, 
ScFollowMode eMode,
     }
     else
     {
-        if (!bShift)
+        if (!bShift && !SC_MOD()->IsFormulaMode())
         {
-            // Remove all marked data on cursor movement unless the Shift is 
locked.
+            // Remove all marked data on cursor movement unless the Shift is
+            // locked or while editing a formula.
             ScMarkData& rMark = aViewData.GetMarkData();
             bool bMarked = rMark.IsMarked() || rMark.IsMultiMarked();
             if (bMarked)

Reply via email to