[apps/code] Fix cursor position when inserting Python commands

Change-Id: I2f5cdc72220cc61b0c8830d746c63f705a7c928e
This commit is contained in:
Léa Saviot
2018-04-26 17:52:11 +02:00
parent 87becaa854
commit 8801b9f383
3 changed files with 17 additions and 17 deletions

View File

@@ -293,7 +293,7 @@ bool PythonToolbox::selectLeaf(ToolboxMessageTree * selectedMessageTree) {
const char * editedText = I18n::translate(node->insertedText());
int strippedEditedTextMaxLength = strlen(editedText)+1;
char strippedEditedText[strippedEditedTextMaxLength];
Shared::ToolboxHelpers::TextToInsertForCommandMessage(node->insertedText(), strippedEditedText, strippedEditedTextMaxLength);
Shared::ToolboxHelpers::TextToInsertForCommandMessage(node->insertedText(), strippedEditedText, strippedEditedTextMaxLength, true);
sender()->handleEventWithText(strippedEditedText, true);
app()->dismissModalViewController();
return true;