From 3ac3fba4683ae228087e1d6352518da9154a9d77 Mon Sep 17 00:00:00 2001 From: Hugo Saint-Vignes Date: Thu, 19 Nov 2020 15:24:14 +0100 Subject: [PATCH] [poincare] Prevent system parenthesis text insertion Change-Id: I5963d2fda37ed9776059b29edced75f88b4ccb2b --- poincare/src/layout_cursor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/poincare/src/layout_cursor.cpp b/poincare/src/layout_cursor.cpp index 17fc57fc5..b90c6922e 100644 --- a/poincare/src/layout_cursor.cpp +++ b/poincare/src/layout_cursor.cpp @@ -223,12 +223,12 @@ void LayoutCursor::insertText(const char * text, bool forceCursorRightOfText) { } if (codePoint == UCodePointMultiplicationSign) { newChild = CodePointLayout::Builder(UCodePointMultiplicationSign); - } else if (codePoint == '(') { + } else if (codePoint == '(' || codePoint == UCodePointLeftSystemParenthesis) { newChild = LeftParenthesisLayout::Builder(); if (pointedChild.isUninitialized()) { pointedChild = newChild; } - } else if (codePoint == ')') { + } else if (codePoint == ')' || codePoint == UCodePointRightSystemParenthesis) { newChild = RightParenthesisLayout::Builder(); } /* We never insert text with brackets for now. Removing this code saves the