From eaef26c1aa3114bd139d88e55127ef21959d1997 Mon Sep 17 00:00:00 2001 From: redgl0w <43498612+RedGl0w@users.noreply.github.com> Date: Mon, 17 Feb 2020 09:53:30 +0100 Subject: [PATCH] Update editor_controller.cpp --- apps/code/editor_controller.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/apps/code/editor_controller.cpp b/apps/code/editor_controller.cpp index b4fd1ff2a..aa000fa24 100644 --- a/apps/code/editor_controller.cpp +++ b/apps/code/editor_controller.cpp @@ -77,6 +77,15 @@ bool EditorController::textAreaDidReceiveEvent(TextArea * textArea, Ion::Events: return true; } + if(event.hasText()){ + if(event.text() == "%" && Ion::Events::isLockActive() ){ + return textArea->removePreviousGlyph(); + } else { + return textArea->handleEventWithText(event.text(), true, false); + } + } + + if (event == Ion::Events::Backspace && textArea->selectionIsEmpty()) { /* If the cursor is on the left of the text of a line, backspace one * indentation space at a time. */