mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/code] Put cursor inside parentheses when inserting function
In Code::VariableBoxController. Change-Id: Ib129781d46159c017bcb02e97c6667b6084f5b67
This commit is contained in:
committed by
EmilieNumworks
parent
291958a901
commit
99f6d73e19
@@ -87,7 +87,7 @@ bool VariableBoxController::ContentViewController::handleEvent(Ion::Events::Even
|
||||
ScriptNode selectedScriptNode = m_scriptNodes[m_selectableTableView.selectedRow()];
|
||||
insertTextInCaller(selectedScriptNode.name());
|
||||
if (selectedScriptNode.type() == ScriptNode::Type::Function) {
|
||||
insertTextInCaller(ScriptNodeCell::k_parentheses);
|
||||
insertTextInCaller(ScriptNodeCell::k_parenthesesWithEmpty);
|
||||
}
|
||||
m_selectableTableView.deselectTable();
|
||||
app()->dismissModalViewController();
|
||||
@@ -117,7 +117,7 @@ void VariableBoxController::ContentViewController::willDisplayCellForIndex(Highl
|
||||
void VariableBoxController::ContentViewController::insertTextInCaller(const char * text) {
|
||||
int commandBufferMaxSize = strlen(text)+1;
|
||||
char commandBuffer[commandBufferMaxSize];
|
||||
Shared::ToolboxHelpers::TextToInsertForCommandText(text, commandBuffer, commandBufferMaxSize);
|
||||
Shared::ToolboxHelpers::TextToInsertForCommandText(text, commandBuffer, commandBufferMaxSize, true);
|
||||
m_textInputCaller->handleEventWithText(commandBuffer);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user