Bidi reordering works with wrapping.

This commit is contained in:
Hojjat 2022-12-16 16:49:29 -07:00 committed by Jeremy Soller
parent 82d5fc02a5
commit 089a926615
4 changed files with 272 additions and 136 deletions

View file

@ -482,7 +482,7 @@ impl<'a> Buffer<'a> {
new_cursor_char = egc_i;
let right_half = x >= (egc_x + egc_w / 2.0) as i32;
if right_half != glyph.rtl {
if right_half != glyph.level.is_rtl() {
// If clicking on last half of glyph, move cursor past glyph
new_cursor_char += egc.len();
}
@ -492,7 +492,7 @@ impl<'a> Buffer<'a> {
}
let right_half = x >= (glyph.x + glyph.w / 2.0) as i32;
if right_half != glyph.rtl {
if right_half != glyph.level.is_rtl() {
// If clicking on last half of glyph, move cursor past glyph
new_cursor_char = cluster.len();
}