From 884e53f75d775f5074a0de85becb3653069dd3d8 Mon Sep 17 00:00:00 2001 From: Romain Goyet Date: Wed, 8 Apr 2020 21:31:49 -0400 Subject: [PATCH] [escher/layout_field] Add a comment --- escher/include/escher/layout_field.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/escher/include/escher/layout_field.h b/escher/include/escher/layout_field.h index 7642d8b2a..436298b18 100644 --- a/escher/include/escher/layout_field.h +++ b/escher/include/escher/layout_field.h @@ -101,6 +101,14 @@ private: void useInsertionCursor(); KDRect selectionRect() const; Poincare::LayoutCursor m_cursor; + /* The insertion cursor is a secondary cursor that determines where text + * should be inserted. Most of the time this cursor is useless (and is + * therefore disabled), but in an interface where the user can navigate out + * of the field, it's important to keep track of where inserted text should + * go even if the main cursor was moved. + * For instance, this is useful in the Calculation app when the user wants + * to type a division and scroll up the history to insert something at the + * denominator. */ Poincare::LayoutCursor m_insertionCursor; ExpressionView m_expressionView; TextCursorView m_cursorView;