summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2022-05-31 20:25:37 +0200
committerEike Rathke <erack@redhat.com>2022-05-31 22:40:23 +0200
commit93a3f142bf46eb7b4309cd168354fe2a971e196d (patch)
treecbd77e1db74cbe95afddd8e2527bc2d1e5f222f6 /sc
parent09847cdbd435c1f6ac8c0ac0256f8be488edd194 (diff)
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 <erack@redhat.com> Tested-by: Jenkins
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/view/tabview3.cxx5
1 files changed, 3 insertions, 2 deletions
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)