sw/source/core/crsr/viscrs.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
New commits: commit 40fad57d097d2e2856e8e4f76ca2d5d6bc689e2f Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Wed May 4 08:33:31 2022 +0200 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Wed May 4 09:43:55 2022 +0200 sw content controls: enable indicator on the RHS of the content control end To be consistent with the SwTextContentControl ctor, which calls SetDontExpand(false). This way typing expands the content control exactly when the indicator is visible. Change-Id: I44dc3e0a68643bc670b75da21110914e5c4f8f59 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133801 Reviewed-by: Miklos Vajna <vmik...@collabora.com> Tested-by: Jenkins diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx index b73b157d1b36..10ef16eae754 100644 --- a/sw/source/core/crsr/viscrs.cxx +++ b/sw/source/core/crsr/viscrs.cxx @@ -645,10 +645,10 @@ void SwSelPaintRects::HighlightContentControl() SwTextContentControl* pCurContentControlAtCursor = nullptr; if (pTextNode) { - // SwTextNode::PARENT because this way we highlight when the cursor is on the right side - // of the dummy character: ideally the end of the range would have the same behavior. + // SwTextNode::EXPAND because the LHS of the dummy character doesn't count, the RHS of + // the start of the LHS of the end counts. SwTextAttr* pAttr = pTextNode->GetTextAttrAt( - pStart->nContent.GetIndex(), RES_TXTATR_CONTENTCONTROL, SwTextNode::PARENT); + pStart->nContent.GetIndex(), RES_TXTATR_CONTENTCONTROL, SwTextNode::EXPAND); if (pAttr) { pCurContentControlAtCursor = static_txtattr_cast<SwTextContentControl*>(pAttr);