This commit is contained in:
Hojjat 2022-12-16 19:15:04 -07:00 committed by Jeremy Soller
parent 089a926615
commit cb958c63f8
2 changed files with 9 additions and 10 deletions

View file

@ -358,7 +358,7 @@ impl<'a> Edit<'a> for ViEditor<'a> {
let (start_x, end_x) = match run.glyphs.get(cursor_glyph) {
Some(glyph) => {
// Start of detected glyph
if glyph.rtl {
if glyph.level.is_rtl() {
(
(glyph.x + glyph.w - cursor_glyph_offset) as i32,
(glyph.x + glyph.w - cursor_glyph_offset - cursor_glyph_width) as i32,
@ -373,7 +373,7 @@ impl<'a> Edit<'a> for ViEditor<'a> {
None => match run.glyphs.last() {
Some(glyph) => {
// End of last glyph
if glyph.rtl {
if glyph.level.is_rtl() {
(
glyph.x as i32,
(glyph.x - cursor_glyph_width) as i32