Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 46b7d441 authored by Gilles Debunne's avatar Gilles Debunne
Browse files

Composing span is removed when insertion point is moved

Bug 3457633

Change-Id: I8896823b7e700dd52acec180c2a1d8e2f6ac5ae1
parent 3ca6d6bb
Loading
Loading
Loading
Loading
+8 −7
Original line number Diff line number Diff line
@@ -4403,12 +4403,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
                                    (mCurrentAlpha * Color.alpha(cursorcolor)) / 255);
                        }
                        mHighlightPaint.setStyle(Paint.Style.STROKE);

                        if (mCursorCount > 0) {
                            drawCursor = true;
                        } else {
                        highlight = mHighlightPath;
                        }
                        drawCursor = true;
                    }
                } else {
                    if (mHighlightPathBogus) {
@@ -4491,7 +4487,12 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
            mCorrectionHighlighter.draw(canvas, cursorOffsetVertical);
        }

        if (drawCursor) drawCursor(canvas, cursorOffsetVertical);
        if (drawCursor) {
            drawCursor(canvas, cursorOffsetVertical);
            // Rely on the drawable entirely, do not draw the cursor line.
            // Has to be done after the IMM related code above which relies on the highlight.
            highlight = null;
        }

        layout.draw(canvas, highlight, mHighlightPaint, cursorOffsetVertical);