winaccessibility/source/UAccCOM/AccTextBase.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit cf118143d6fd74ecce76fda74bb3c899d08f7ed1
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Thu Aug 14 12:00:09 2025 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Thu Aug 14 15:44:11 2025 +0200

    tdf#167930 wina11y: Keep caret pos when removing selection
    
    This is the Windows version of
    
        Change-Id: Ieca9dff66eef366bf2a3845e5fdb53b3bfa70df9
        Author: Michael Weghorn <m.wegh...@posteo.de>
        Date:   Thu Aug 14 11:19:14 2025 +0200
    
            tdf#167930 gtk3 a11y: Keep caret pos when removing selection
    
    Change-Id: I3cc3fb781ffc036d7f4df4552aee766378fdb0c5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189581
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/winaccessibility/source/UAccCOM/AccTextBase.cxx 
b/winaccessibility/source/UAccCOM/AccTextBase.cxx
index 0971b698c281..0b8ea278f105 100644
--- a/winaccessibility/source/UAccCOM/AccTextBase.cxx
+++ b/winaccessibility/source/UAccCOM/AccTextBase.cxx
@@ -616,7 +616,8 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP 
CAccTextBase::removeSelection(long selectionIn
     }
     else
     {
-        pRXText->setSelection(0, 0);
+        const sal_Int32 nCaretPos = pRXText->getCaretPosition();
+        pRXText->setSelection(nCaretPos, nCaretPos);
         return S_OK;
     }
 

Reply via email to