mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-25 05:55:34 +00:00
Fix bug #7518: Assert when selecting in RTL text
If we are in rtl text, we *need* to check whether the first character is a
space. We can't use the rtl variable for this because this is only
computed on the last row.
This bug was introduced in [0a137e31/lyxgit] to fix the computation for
freespacing paragraphs. We better can just check whether the paragraph is
freespacing or not.
(cherry picked from commit d7f68078cf
)
This commit is contained in:
parent
0665673d03
commit
39f06f37c3
@ -1230,8 +1230,9 @@ pos_type TextMetrics::getColumnNearX(pit_type const pit,
|
|||||||
|
|
||||||
// if the first character is a separator, and we are in RTL
|
// if the first character is a separator, and we are in RTL
|
||||||
// text, this character will not be painted on screen
|
// text, this character will not be painted on screen
|
||||||
// and thus we should not count it and skip to the next.
|
// and thus we should not count it and skip to the next. Only
|
||||||
if (rtl && par.isSeparator(bidi.vis2log(vc)))
|
// in freespacing paragraphs, this first character is painted.
|
||||||
|
if (!par.isFreeSpacing() && par.isSeparator(bidi.vis2log(vc)))
|
||||||
++vc;
|
++vc;
|
||||||
|
|
||||||
while (vc < end && tmpx <= x) {
|
while (vc < end && tmpx <= x) {
|
||||||
|
@ -107,6 +107,8 @@ What's new
|
|||||||
- Fixed crash when modifying or pasting an equation label and there
|
- Fixed crash when modifying or pasting an equation label and there
|
||||||
are references to that label in math (bug 8095).
|
are references to that label in math (bug 8095).
|
||||||
|
|
||||||
|
- Fixed assertion on selection of insets in RTL text (bug 7518).
|
||||||
|
|
||||||
- Don't reset the selected format each time we click into a new paragraph
|
- Don't reset the selected format each time we click into a new paragraph
|
||||||
in View->Source (bug 7997).
|
in View->Source (bug 7997).
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user