Cursor keys move cursor to the opposite direction in RTL text. To reproduce: 1. Open a writer document (I use the gtk3 rendering - it may be related). 2. Type in some text in an RTL language, such as Hebrew or Arabic. Make sure that the paragraph language is properly identified. 3. Try to move the cursor with the keys. The cursor moves in the opposite direction. This is a regression from the 5.1 series. This renders writer unusable for RTL texts.
I can confirm this. Changing “Tools → Options → Language Settings → Complex Text → Layout → Cursor Control” from Logical to Visual has no effect either.
*** Bug 101441 has been marked as a duplicate of this bug. ***
Confirmed regression LO5.2.0.4 on Mint 17.3 Mate. Note that 5.2 tooltip for "Logical" cursor control describes the observed cursor behavior for logical movement. However, this movement is different from previous LO versions for logical, which was paragraph directionality dependent (and rightfully so). The new tooltip for Logical described LTR logical behavior, and misses the RTL logical behavior. This is independent of "Visual", which again has a tooltip that describes the LTR visual behavior, but not the RTL visual behavior. Changing CTL Cursor Control between Logical and Visual works fine (you must have mixed LTR and RTL characters in the same sentence to see that), however, the bug of not switching the roles of the left and right arrows for RTL paragraphs (in both Logical and Visual modes) indeed exists and is a regression from previous LO versions.
I did some digging and found a change that fixes this issue for my limited testing: diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx index 63d8994..1babc48 100644 --- a/sw/source/core/text/frmcrsr.cxx +++ b/sw/source/core/text/frmcrsr.cxx @@ -905,7 +905,7 @@ static void lcl_VisualMoveRecursion( const SwLineLayout& rCurrLine, sal_Int32 nI pPor = pPor->GetPortion(); } - if ( bRight ) + if ( !bRight ) { bool bRecurse = pPor && pPor->IsMultiPortion() && static_cast<const SwMultiPortion*>(pPor)->IsBidi(); However this code have not been changed since almost forever, so I’m puzzled why it broke now. It would be very helpful if we can get a bisect here, or at least the exact release where it broke, any one volunteering? PS. The issue happens also without GTK, and happens only in Writer.
Regression of: commit a215cec969f7401b08cabb686c5b2b1d803399d0 Author: Jaskaran <jvsg1303@gmail.com> Date: Thu Mar 10 08:33:39 2016 +0530 tdf#32531 Fix for key movement in table cell of different directionality Change-Id: I7bd864176c9766dc8d030dd73d9b8ddd81ea2ee5 Reviewed-on: https://gerrit.libreoffice.org/23107 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Thanks Maxim, much appreciated.
Khaled Hosny committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=67192b3cfa54be7b0b60d450783ac2ac4c38bbc6 tdf#101361: Fix cursor key movement in RTL text It will be available in 5.3.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Khaled Hosny committed a patch related to this issue. It has been pushed to "libreoffice-5-2": http://cgit.freedesktop.org/libreoffice/core/commit/?id=438a76a9a261b9ada7b2758a66cd935d1760da39&h=libreoffice-5-2 tdf#101361: Fix cursor key movement in RTL text It will be available in 5.2.2. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
*** Bug 101969 has been marked as a duplicate of this bug. ***