Bug 468151 - Force text direction
Summary: Force text direction
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: application (show other bugs)
Version: 22.12.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-04 18:44 UTC by AvidSeeker
Modified: 2023-04-06 12:20 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description AvidSeeker 2023-04-04 18:44:14 UTC
SUMMARY
Some text editors and browsers have support for temporarily changing text alignment typically by pressing RCtrl+RShift or Ctrl+Shift+X (in Firefox).

This feature (toggling RTL, LTR directions) is essential for Bidi support, and it's helpful when dealing with console output of RTL language.

Currently Krita and Kwrite switch text direction depending on the language of the starting text. If it is e.g Arabic, the whole line would be RTL. Which becomes annoying in case of a mixed text where the desired layout is to force alignment to be all to the right or all to the left.
Comment 1 AvidSeeker 2023-04-04 18:52:07 UTC
More background on this issue in gedit: https://gitlab.gnome.org/GNOME/gedit/-/issues/468
Comment 2 Bug Janitor Service 2023-04-04 20:31:02 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/ktexteditor/-/merge_requests/537
Comment 3 Christoph Cullmann 2023-04-06 12:20:37 UTC
Git commit 8c814351a7a6685790d3488b7e8f3a3c776af937 by Christoph Cullmann, on behalf of Waqar Ahmed.
Committed on 06/04/2023 at 12:20.
Pushed by cullmann into branch 'master'.

Allow forcing RTL direction

The option is available under the "View" menu. Once the option is
checked, all the text is forced to the right. Having "Dynamic Word
Enabled" is necessary for this to work correctly. Reason being that
with static wrapping there is no "right" to which we can force the lines
to, "right" is infinity/INT_MAX.
Related: bug 433926

M  +2    -1    src/data/katepart5ui.rc
M  +5    -1    src/render/katerenderer.cpp
M  +19   -0    src/view/kateview.cpp
M  +3    -0    src/view/kateview.h

https://invent.kde.org/frameworks/ktexteditor/commit/8c814351a7a6685790d3488b7e8f3a3c776af937